Fix X, Y and Z axis snapping after e673226ea1249a2432ff7b00a7581d750825b544

This commit is contained in:
Bruno Perdigão
2024-10-10 17:36:05 -03:00
parent 3f2efcc846
commit 014edcdadc
2 changed files with 4 additions and 1 deletions
@@ -126,17 +126,20 @@ class PolylineOperator:
if x:
if event.value == "PRESS" and event.type == "X":
self.tool_state.axis_method = "X" if self.tool_state.axis_method != event.type else None
self.tool_state.lock_axis = False if self.tool_state.lock_axis else True
PolylineDecorator.update(event, self.tool_state, self.input_ui, self.snapping_points[0])
tool.Blender.update_viewport()
if y:
if event.value == "PRESS" and event.type == "Y":
self.tool_state.axis_method = "Y" if self.tool_state.axis_method != event.type else None
self.tool_state.lock_axis = False if self.tool_state.lock_axis else True
PolylineDecorator.update(event, self.tool_state, self.input_ui, self.snapping_points[0])
tool.Blender.update_viewport()
if z:
if event.value == "PRESS" and event.type == "Z":
self.tool_state.axis_method = "Z" if self.tool_state.axis_method != event.type else None
self.tool_state.lock_axis = False if self.tool_state.lock_axis else True
PolylineDecorator.update(event, self.tool_state, self.input_ui, self.snapping_points[0])
tool.Blender.update_viewport()
+1 -1
View File
@@ -89,7 +89,7 @@ class Polyline(bonsai.core.tool.Polyline):
C: Close
Backspace: Remove
X Y: Axis
Shift: Lock axis
L: Lock axis
"""
snap_info: str = None
mode: str = None