[Bf-blender-cvs] [ea77584d36b] master: Fix orientation change in Redo

Germano Cavalcante noreply at git.blender.org
Thu Apr 30 13:52:57 CEST 2020


Commit: ea77584d36b0e1e495f1a5b0d294752069bc2cbe
Author: Germano Cavalcante
Date:   Thu Apr 30 08:52:38 2020 -0300
Branches: master
https://developer.blender.org/rBea77584d36b0e1e495f1a5b0d294752069bc2cbe

Fix orientation change in Redo

Some transform redo operations require contraint to be enabled.
Issue introduced in rBc57e4418bb85.

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

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

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

diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 26f108cbf33..843c60ec87c 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -1746,11 +1746,9 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
   }
 
   if ((prop = RNA_struct_find_property(op->ptr, "constraint_axis"))) {
-    if (t->con.mode & CON_APPLY) {
-      bool constraint_axis[3] = {false, false, false};
-      if (t->idx_max == 0) {
-        /* Only set if needed, so we can hide in the UI when nothing is set.
-         * See 'transform_poll_property'. */
+    bool constraint_axis[3] = {false, false, false};
+    if (t->idx_max == 0) {
+      if (t->con.mode & CON_APPLY) {
         if (t->con.mode & CON_AXIS0) {
           constraint_axis[0] = true;
         }
@@ -1760,16 +1758,17 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
         if (t->con.mode & CON_AXIS2) {
           constraint_axis[2] = true;
         }
+        RNA_property_boolean_set_array(op->ptr, prop, constraint_axis);
       }
       else {
-        constraint_axis[0] = true;
-        constraint_axis[1] = true;
-        constraint_axis[2] = true;
+        RNA_property_unset(op->ptr, prop);
       }
-      RNA_property_boolean_set_array(op->ptr, prop, constraint_axis);
     }
     else {
-      RNA_property_unset(op->ptr, prop);
+      constraint_axis[0] = true;
+      constraint_axis[1] = true;
+      constraint_axis[2] = true;
+      RNA_property_boolean_set_array(op->ptr, prop, constraint_axis);
     }
   }



More information about the Bf-blender-cvs mailing list