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.
This commit is contained in:
Campbell Barton 2022-05-26 15:53:17 +10:00
parent 841a354412
commit 3131107ba3
Notes: blender-bot 2023-02-14 00:37:17 +01:00
Referenced by issue #94857, Regression: 'Gizmo Operator' from python templates is spining in accumulative way, when dragged.
1 changed files with 3 additions and 2 deletions

View File

@ -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