[Bf-blender-cvs] [a4a9f4b3d19] blender2.8: Transform: fix redundant gizmo constraint axis

Campbell Barton noreply at git.blender.org
Thu Aug 30 01:10:41 CEST 2018


Commit: a4a9f4b3d1979798506141f7dfcd9f928fe07d1b
Author: Campbell Barton
Date:   Thu Aug 30 09:15:19 2018 +1000
Branches: blender2.8
https://developer.blender.org/rBa4a9f4b3d1979798506141f7dfcd9f928fe07d1b

Transform: fix redundant gizmo constraint axis

Setting the constraint caused the redo to show
redundant XYZ constraints UI.

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

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

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

diff --git a/source/blender/editors/transform/transform_gizmo_3d.c b/source/blender/editors/transform/transform_gizmo_3d.c
index b831012ba23..845f361a869 100644
--- a/source/blender/editors/transform/transform_gizmo_3d.c
+++ b/source/blender/editors/transform/transform_gizmo_3d.c
@@ -1459,8 +1459,10 @@ static void gizmogroup_init_properties_from_twtype(wmGizmoGroup *gzgroup)
 
 		if (ptr) {
 			PropertyRNA *prop;
-			if ((prop = RNA_struct_find_property(ptr, "constraint_axis"))) {
-				RNA_property_boolean_set_array(ptr, prop, constraint_axis);
+			if (ELEM(true, UNPACK3(constraint_axis))) {
+				if ((prop = RNA_struct_find_property(ptr, "constraint_axis"))) {
+					RNA_property_boolean_set_array(ptr, prop, constraint_axis);
+				}
 			}
 
 			RNA_boolean_set(ptr, "release_confirm", 1);



More information about the Bf-blender-cvs mailing list