Page MenuHome

Node Editor: Support cancelation of node_resize
ClosedPublic

Authored by Matthias Ellerbeck (voyager25) on Mon, Feb 10, 5:09 PM.

Details

Summary

Right mouse button now cancels node_resize, just like other operators function.

Diff Detail

Repository
rB Blender

Event Timeline

Brecht Van Lommel (brecht) requested changes to this revision.Tue, Feb 11, 12:03 PM

Thanks for the patch. I think right mouse release should still apply the resize, in case there is a keymap that starts resize with right mouse button.

This revision now requires changes to proceed.Tue, Feb 11, 12:03 PM

I agree now.
(Just discovered that there is a keybinding for node.resize and it is not hardcoded to left mouse)

I'll look for a generic solution (without adding more keybindings).

I think the approach in the patch is actually fine, just needs a minor adjustment to be:

case LEFTMOUSE:
case MIDDLEMOUSE:
case RIGHTMOUSE:
  if(event->val == KM_RELEASE) {
    ..
  }
  else if (event->type == RIGHTMOUSE && event->val == KM_PRESS) {
   ..
 }

Updated the diff to work with any keymap, based on feeback.
Any mouse release event now confirms, and any press event aborts.

Thanks brecht!

This revision is now accepted and ready to land.Tue, Feb 11, 3:33 PM