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-05-19 18:23:23 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2022-05-19 18:23:23 +0300
commit65e13cc2d232f85da6c2e437c5fc5cc5debd914e (patch)
treecfc230a7532a454087a7086866f7263bce3d9dcc
parent436a7ee65176090ee44de6dbf38d4eb512ffaf9e (diff)
parentbc6965cb981e12855354bbdcf5dcdd5edff3ff4a (diff)
Merge branch 'blender-v3.2-release'
-rw-r--r--source/blender/editors/transform/transform.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 7a2a2a8a5e8..7ae041f2b2f 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -1172,12 +1172,20 @@ int transformEvent(TransInfo *t, const wmEvent *event)
MOD_CONSTRAINT_SELECT_PLANE;
if (t->con.mode & CON_APPLY) {
stopConstraint(t);
+ initSelectConstraint(t);
+
+ /* In this case we might just want to remove the contraint,
+ * so set #TREDRAW_SOFT to only select the constraint on the next mouse move event.
+ * This way we can kind of "cancel" due to confirmation without constraint. */
+ t->redraw = TREDRAW_SOFT;
}
+ else {
+ initSelectConstraint(t);
- initSelectConstraint(t);
- /* Use #TREDRAW_SOFT so that #selectConstraint is only called on the next event.
- * This allows us to "deselect" the constraint. */
- t->redraw = TREDRAW_SOFT;
+ /* When first called, set #TREDRAW_HARD to select constraint immediately in
+ * #selectConstraint. */
+ BLI_assert(t->redraw == TREDRAW_HARD);
+ }
}
}
handled = true;