[Bf-blender-cvs] [6fda30cc54d] master: Fix T83177: Industry Compatible keymap: MMB-dragging to transform engages axis-constraining on release

Germano Cavalcante noreply at git.blender.org
Fri Dec 4 14:50:08 CET 2020


Commit: 6fda30cc54d24730d81b96b2e3b542bf94f52137
Author: Germano Cavalcante
Date:   Fri Dec 4 10:49:45 2020 -0300
Branches: master
https://developer.blender.org/rB6fda30cc54d24730d81b96b2e3b542bf94f52137

Fix T83177: Industry Compatible keymap: MMB-dragging to transform engages axis-constraining on release

With rBc0677b662f4b, we try to track all modal events in order to detect the
one corresponding to the release.

But modifier keys can mask the modal event and thus confirm realease ends up
being skipped.

This resulted in the T83387.

With this commit we now read the actual key drop value in the modal event.

This fixes T83387

===================================================================

M	source/blender/editors/transform/transform.c

===================================================================

diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index bba0b750d0c..3b8f7f90edc 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -1082,7 +1082,12 @@ int transformEvent(TransInfo *t, const wmEvent *event)
         break;
       case TFM_MODAL_AUTOCONSTRAINT:
       case TFM_MODAL_AUTOCONSTRAINTPLANE:
-        if ((t->flag & T_NO_CONSTRAINT) == 0) {
+        if ((t->flag & T_RELEASE_CONFIRM) && (event->prevval == KM_RELEASE) &&
+            event->prevtype == t->launch_event) {
+          /* Confirm transform if launch key is released after mouse move. */
+          t->state = TRANS_CONFIRM;
+        }
+        else if ((t->flag & T_NO_CONSTRAINT) == 0) {
           if (t->modifiers & (MOD_CONSTRAINT_SELECT | MOD_CONSTRAINT_PLANE)) {
             /* Confirm. */
             postSelectConstraint(t);



More information about the Bf-blender-cvs mailing list