[Bf-blender-cvs] [3131107ba3a] blender-v3.2-release: Fix T94857: 'Gizmo Operator' from python templates spins when dragged
Campbell Barton
noreply at git.blender.org
Thu May 26 07:58:56 CEST 2022
Commit: 3131107ba3aa66a9389a422424c9cde1fdd1b70d
Author: Campbell Barton
Date: Thu May 26 15:53:17 2022 +1000
Branches: blender-v3.2-release
https://developer.blender.org/rB3131107ba3aa66a9389a422424c9cde1fdd1b70d
Fix T94857: 'Gizmo Operator' from python templates spins when dragged
Callbacks used in the gizmo operator template don't support updating
while being dragged, set the EXCLUDE_MODAL flag so the offsets
aren't accumulated. Also fix the offset being applied twice to the
move gizmo.
===================================================================
M release/scripts/templates_py/gizmo_operator.py
===================================================================
diff --git a/release/scripts/templates_py/gizmo_operator.py b/release/scripts/templates_py/gizmo_operator.py
index 450f67ba3a4..75595b0c5ea 100644
--- a/release/scripts/templates_py/gizmo_operator.py
+++ b/release/scripts/templates_py/gizmo_operator.py
@@ -84,7 +84,7 @@ class SelectSideOfPlaneGizmoGroup(GizmoGroup):
bl_label = "Side of Plane Gizmo"
bl_space_type = 'VIEW_3D'
bl_region_type = 'WINDOW'
- bl_options = {'3D'}
+ bl_options = {'3D', 'EXCLUDE_MODAL'}
# Helper functions
@staticmethod
@@ -199,7 +199,8 @@ class SelectSideOfPlaneGizmoGroup(GizmoGroup):
matrix.col[0].xyz = no_x
matrix.col[1].xyz = no_y
matrix.col[2].xyz = no_z
- matrix.col[3].xyz = co
+ # The location callback handles the location.
+ # `matrix.col[3].xyz = co`.
# Dial
no_z = self.rotate_axis
More information about the Bf-blender-cvs
mailing list