[Bf-blender-cvs] [827e9ccb29d] master: Revert "Fix T96728: 'Automatic Constraint' using the wrong orientation"
Germano Cavalcante
noreply at git.blender.org
Wed Mar 23 16:27:05 CET 2022
Commit: 827e9ccb29dd50d155972444d608c35cf4698d6a
Author: Germano Cavalcante
Date: Wed Mar 23 12:25:32 2022 -0300
Branches: master
https://developer.blender.org/rB827e9ccb29dd50d155972444d608c35cf4698d6a
Revert "Fix T96728: 'Automatic Constraint' using the wrong orientation"
This reverts commit 6cc83f9079de11ddb53af5bab3e0442a234aadb2.
That commit removed the feature of cancel the 'Auto Constraint'
if it is enabled without drag.
===================================================================
M source/blender/editors/transform/transform.c
M source/blender/editors/transform/transform_constraints.c
===================================================================
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index df36acf5c1f..975f4370425 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -845,6 +845,10 @@ int transformEvent(TransInfo *t, const wmEvent *event)
handled = true;
}
else if (event->type == MOUSEMOVE) {
+ if (t->modifiers & (MOD_CONSTRAINT_SELECT_AXIS | MOD_CONSTRAINT_SELECT_PLANE)) {
+ t->con.mode |= CON_SELECT;
+ }
+
copy_v2_v2_int(t->mval, event->mval);
/* Use this for soft redraw. Might cause flicker in object mode */
@@ -1112,8 +1116,10 @@ int transformEvent(TransInfo *t, const wmEvent *event)
if (t->con.mode & CON_APPLY) {
stopConstraint(t);
}
-
- initSelectConstraint(t);
+ else {
+ initSelectConstraint(t);
+ postSelectConstraint(t);
+ }
}
}
t->redraw |= TREDRAW_HARD;
diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c
index 0ccabf5798f..81b35e4539b 100644
--- a/source/blender/editors/transform/transform_constraints.c
+++ b/source/blender/editors/transform/transform_constraints.c
@@ -984,7 +984,6 @@ void initSelectConstraint(TransInfo *t)
}
setUserConstraint(t, CON_APPLY | CON_SELECT, "%s");
- selectConstraint(t);
}
void selectConstraint(TransInfo *t)
@@ -997,7 +996,19 @@ void selectConstraint(TransInfo *t)
void postSelectConstraint(TransInfo *t)
{
+ if (!(t->con.mode & CON_SELECT)) {
+ return;
+ }
+
+ t->con.mode &= ~CON_AXIS0;
+ t->con.mode &= ~CON_AXIS1;
+ t->con.mode &= ~CON_AXIS2;
t->con.mode &= ~CON_SELECT;
+
+ setNearestAxis(t);
+
+ startConstraint(t);
+ t->redraw = TREDRAW_HARD;
}
static void setNearestAxis2d(TransInfo *t)
More information about the Bf-blender-cvs
mailing list