Page MenuHome

Cannot rotate view while using Knife tool with Maya preset
Closed, ResolvedPublic

Description

--- Operating System, Graphics card ---

Windows 7, and graphics card


--- Blender version with error, and version that worked ---

2.66a, never worked


--- Short description of error ---

While using the default Blender keyboard shortcuts, it is possible (and extremely useful) to rotate the 3D view while using the knife tool. This is impossible to do while using the Maya keys.


--- Steps for others to reproduce the error (preferably based on attached .blend file) ---

Start Blender and select the Maya preset
Select the default box mesh object.
Enter Edit mode.
Select the Knife tool
Attempt to rotate the 3d view. Note that the view does not rotate as the Knife tool appears to be blocking input.

Details

Type
Bug

Event Timeline

Maya view rotations use leftmouse, so do does the knife tool. Blender's default is to use middlemouse and scrollwheel. That is still hardcoded in the knife tool.

Campbell: the knife tool has a "MODE_PANNING" state, it could be nice to set this in the modal map as well, to define the shortcut(s) that have to be passed on.

Any non-default controls for rotate and pan view have this problem. I hope someone is working on this. It wasn't fixed in 2.67.

Just to add to the issue, OSX navigation devices (trackpad, magic mouse) can't navigate during the operator either.
Only MMB scrollwheel and MMB click are free to work (unless you set 'emulate-3-button mouse')

(for the records, OSX navigation issue fixed on rev. 60204)

Attached is a patch that solves this problem. Campbell, can you review it?

I looked a bit further in other related fixes, and I'm confident the patch (with small change to set space_type='EMPTY', region_type='WINDOW') is correct.
@Cambpell, feel free to adjust it on trunk or to poke me.

fiexd on rev.60207

Dalai Felinto (dfelinto) closed this task as Resolved.Sep 17 2013, 10:36 PM

@Campbell Barton (campbellbarton)

I'm experiencing this issue on the latest Blender 2.8 beta. Specifically when I change the keymap for rotate view to (Alt Left Mouse). In an attempt to avoid making a duplicate bug I wanted to comment on here first and see what I should do to re-open ? this bug. Thanks!

In Blender2.8 the knife keymap uses "any", see:

release/scripts/presets/keyconfig/keymap_data/blender_default.py

("ADD_CUT", {"type": 'LEFTMOUSE', "value": 'ANY', "any": True}, None),

The solution here would be to expand this to allow for all modifier combinations (shift & ctrl):

("ADD_CUT", {"type": 'LEFTMOUSE', "value": 'ANY'}, None),
("ADD_CUT", {"type": 'LEFTMOUSE', "value": 'ANY', "ctrl": True}, None),
("ADD_CUT", {"type": 'LEFTMOUSE', "value": 'ANY', "shift": True}, None),
("ADD_CUT", {"type": 'LEFTMOUSE', "value": 'ANY', "ctrl": True, "shift": True}, None),

This is needed because ctrl and shift keys are used in this modal map.