[Bf-blender-cvs] [14af27e63d3] master: Fix T77194: Force global orientation on select constraint (Shift MMB) not working

Germano Cavalcante noreply at git.blender.org
Sun May 31 23:29:02 CEST 2020


Commit: 14af27e63d38d736f8287897df223bad4d5c9501
Author: Germano Cavalcante
Date:   Sun May 31 15:19:29 2020 -0300
Branches: master
https://developer.blender.org/rB14af27e63d38d736f8287897df223bad4d5c9501

Fix T77194: Force global orientation on select constraint (Shift MMB) not working

This feature was a hack to prevent mmb select to print the orientation from menu in pre 2.80 versions.
Removing this feature as it is no longer an issue.

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

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

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

diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 5fc65522fe6..c9df210ccc2 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -1195,7 +1195,7 @@ int transformEvent(TransInfo *t, const wmEvent *event)
               stopConstraint(t);
             }
             else {
-              initSelectConstraint(t, event->shift);
+              initSelectConstraint(t);
               postSelectConstraint(t);
             }
           }
diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c
index 228e8d58162..0347522b8e8 100644
--- a/source/blender/editors/transform/transform_constraints.c
+++ b/source/blender/editors/transform/transform_constraints.c
@@ -876,21 +876,15 @@ void stopConstraint(TransInfo *t)
 
 /*------------------------- MMB Select -------------------------------*/
 
-void initSelectConstraint(TransInfo *t, bool force_global)
+void initSelectConstraint(TransInfo *t)
 {
-  short orientation;
-  if (force_global) {
-    orientation = V3D_ORIENT_GLOBAL;
-  }
-  else {
-    if (t->orient_curr == 0) {
-      t->orient_curr = 1;
-      transform_orientations_current_set(t, t->orient_curr);
-    }
-    orientation = t->orient[t->orient_curr].type;
+  if (t->orient_curr == 0) {
+    t->orient_curr = 1;
+    transform_orientations_current_set(t, t->orient_curr);
   }
 
-  setUserConstraint(t, orientation, CON_APPLY | CON_SELECT, "");
+  short orientation = t->orient[t->orient_curr].type;
+  setUserConstraint(t, orientation, CON_APPLY | CON_SELECT, "%s");
   setNearestAxis(t);
 }
 
diff --git a/source/blender/editors/transform/transform_constraints.h b/source/blender/editors/transform/transform_constraints.h
index b57a7599321..c41b9361ca4 100644
--- a/source/blender/editors/transform/transform_constraints.h
+++ b/source/blender/editors/transform/transform_constraints.h
@@ -35,7 +35,7 @@ void drawConstraint(TransInfo *t);
 void drawPropCircle(const struct bContext *C, TransInfo *t);
 void startConstraint(TransInfo *t);
 void stopConstraint(TransInfo *t);
-void initSelectConstraint(TransInfo *t, bool force_global);
+void initSelectConstraint(TransInfo *t);
 void selectConstraint(TransInfo *t);
 void postSelectConstraint(TransInfo *t);
 void setNearestAxis(TransInfo *t);



More information about the Bf-blender-cvs mailing list