[Bf-blender-cvs] [a96283ba511] master: Fix assert when cleaning constraints in the transform tool

Germano Cavalcante noreply at git.blender.org
Thu Sep 3 22:58:24 CEST 2020


Commit: a96283ba511d7ebf2c2ec2db16815b5a4b2979df
Author: Germano Cavalcante
Date:   Thu Sep 3 17:57:58 2020 -0300
Branches: master
https://developer.blender.org/rBa96283ba511d7ebf2c2ec2db16815b5a4b2979df

Fix assert when cleaning constraints in the transform tool

When enabled, the modal key item "Clear Constraint" did not reset
the default orientation.

This does not bring changes in the user's point of view.

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

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

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

diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c
index 8fdee0e8eec..54a3ebb8c0c 100644
--- a/source/blender/editors/transform/transform_constraints.c
+++ b/source/blender/editors/transform/transform_constraints.c
@@ -976,6 +976,11 @@ void startConstraint(TransInfo *t)
 
 void stopConstraint(TransInfo *t)
 {
+  if (t->orient_curr != 0) {
+    t->orient_curr = 0;
+    transform_orientations_current_set(t, t->orient_curr);
+  }
+
   t->con.mode &= ~(CON_APPLY | CON_SELECT);
   *t->con.text = '\0';
   t->num.idx_max = t->idx_max;



More information about the Bf-blender-cvs mailing list