Page MenuHome

Masking Keymap
ClosedPublic

Authored by Sebastian Koenig (sebastian_k) on Jun 13 2019, 10:44 AM.

Details

Summary

I have updated the masking keymap to be functional again. At least in my tests it works good with both configurations, 2.80 and 2.79, both RMB and LMB select.
In the future (hopefully 2.81) the masking tools will be updated anyway, to make use of the 2.8 tool system. Until then we should have an intuitive set of controls for mask creation and manipulation that is close to what we have in 2.79. So this is more a temporary solution anyway.

I have forced LEFTMOUSE for some settings that were bound to params.select_mouse before.
That way we get the same behavior as before, regardless of the mouse button configuration, so rightclickers and leftclickers can use the masking tools in the same way, similar to 2.79, where we also used the left mouse button to tweak the spline and spline curvature, as well as create new mask points.

Diff Detail

Repository
rB Blender

Event Timeline

Brecht Van Lommel (brecht) requested changes to this revision.Jun 13 2019, 11:08 AM
Brecht Van Lommel (brecht) added inline comments.
release/scripts/presets/keyconfig/keymap_data/blender_default.py
1185–1188

Fixing mask select to RMB seems wrong to me, especially since shift to extend is still params.select_mouse.

This revision now requires changes to proceed.Jun 13 2019, 11:08 AM

I know, it's a bit weird, but when select is set to select_mouse (LMB by default), there is a conflict with the tweak functionality, so when you try to slide a single mask point, you slide the entire mask.
We had 2 different select modes in 2.79 as well: left-clicking would do a select + move when dragggin, right-clicking would select as well, and, if mouse dragged, would start a transform as well. However, only with RMB you could also extend the selection by holding shift.

Well, somehow the closest functionality seems to be nodes, somehow. At least that is another big area where we allow selection, dragging, select-and-drag.
Shall we stick to the same rules for masking?

Well, somehow the closest functionality seems to be nodes, somehow. At least that is another big area where we allow selection, dragging, select-and-drag.
Shall we stick to the same rules for masking?

Is this something I can test by editing the keymap or does that require bigger surgery?

I am not sure from the top of my head what is involved here, would need to check myself.
Or maybe you can try implementing that behaviour and poke me with missing bits?

@Brecht Van Lommel (brecht), does the suggestion of trying to mimmic nodes behaviour sound reasonable to you?

It appears that mask.slide_point also does selection, which means putting mask.select on RMB keeps selection on LMB working.

What this does break is the context menu for LMB select. It's not clear to me what is most important for RMB, the context menu or "select" + "move".

What I don't even understand is the difference is between "slide" without modifier keys and "select" + "move", they appear to do the same thing?

So as far as we can tell, "select" + "move" is mostly there for historical reasons and "slide" is really enough. So for the Blender LMB and industry compatible keymap we can have the context menu on RMB overriding it.

This revision is now accepted and ready to land.Jun 28 2019, 1:08 PM

@Brecht Van Lommel (brecht) @Sergey Sharybin (sergey) Thanks so much for helping out with this. It also works great! :)
I am just not so sure about line 1191. When using the 27x keymap and rightclicking on a curve point it goes directly into transform mode. This feels a bit odd, since it should just select the point. If I want to drag a curve point with RMB I can simply rightclick and drag.