Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGermano Cavalcante <germano.costa@ig.com.br>2022-03-28 20:21:33 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2022-03-28 20:21:33 +0300
commit21e72496a6297a1cee4fcb77f3efa24b7ee3c418 (patch)
treed14c6ef2024414fda24b88ff05e9dcdd7eee64db /source/blender/editors/transform/transform_constraints.c
parentdf4d6c22cfa266d52d178b79e6145a871761846d (diff)
Fix T96728: 'Automatic Constraint' using the wrong orientation
If the `Automatic Constraint` modifier was activated while an axis constraint was already set, the orientation used would be the default orientation of the mode and not that of the scene. This was because the `initSelectConstraint` function was not called in this case and the `Automatic Constraint` mode was enabled by other indirect means. So the solution is to call `initSelectConstraint` in either case and remove these "indirect means" of enabling `Automatic Constraint`.
Diffstat (limited to 'source/blender/editors/transform/transform_constraints.c')
-rw-r--r--source/blender/editors/transform/transform_constraints.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c
index 81b35e4539b..0bb00032561 100644
--- a/source/blender/editors/transform/transform_constraints.c
+++ b/source/blender/editors/transform/transform_constraints.c
@@ -996,19 +996,10 @@ 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;
+ if (!(t->con.mode & (CON_AXIS0 | CON_AXIS1 | CON_AXIS2))) {
+ t->con.mode &= ~CON_APPLY;
+ }
}
static void setNearestAxis2d(TransInfo *t)