diff --git a/src/bonsai/bonsai/bim/module/model/wall.py b/src/bonsai/bonsai/bim/module/model/wall.py index f58f64c11e..98f70c0901 100644 --- a/src/bonsai/bonsai/bim/module/model/wall.py +++ b/src/bonsai/bonsai/bim/module/model/wall.py @@ -512,6 +512,7 @@ class DrawPolylineWall(bpy.types.Operator): tool.Blender.update_viewport() else: if event.value == "RELEASE" and event.type in {"ESC"}: + tool.Snap.set_snap_axis_method(None) PolylineDecorator.uninstall() tool.Snap.clear_polyline() tool.Blender.update_viewport() diff --git a/src/bonsai/bonsai/bim/module/project/operator.py b/src/bonsai/bonsai/bim/module/project/operator.py index 1b7af87064..29abb21190 100644 --- a/src/bonsai/bonsai/bim/module/project/operator.py +++ b/src/bonsai/bonsai/bim/module/project/operator.py @@ -2485,21 +2485,21 @@ class MeasureTool(bpy.types.Operator): if event.shift and event.value == "PRESS" and event.type == "X": tool.Snap.set_use_default_container(False) PolylineDecorator.set_use_default_container(False) - tool.Snap.set_snap_plane_method("YZ") + tool.Snap.cycle_snap_plane_method("YZ") tool.Snap.set_snap_axis_method(None) tool.Blender.update_viewport() if event.shift and event.value == "PRESS" and event.type == "Y": tool.Snap.set_use_default_container(False) PolylineDecorator.set_use_default_container(False) - tool.Snap.set_snap_plane_method("XZ") + tool.Snap.cycle_snap_plane_method("XZ") tool.Snap.set_snap_axis_method(None) tool.Blender.update_viewport() if event.shift and event.value == "PRESS" and event.type == "Z": tool.Snap.set_use_default_container(False) PolylineDecorator.set_use_default_container(False) - tool.Snap.set_snap_plane_method("XY") + tool.Snap.cycle_snap_plane_method("XY") tool.Snap.set_snap_axis_method(None) tool.Blender.update_viewport() @@ -2514,6 +2514,8 @@ class MeasureTool(bpy.types.Operator): tool.Blender.update_viewport() else: if event.value == "RELEASE" and event.type in {"ESC"}: + tool.Snap.set_snap_plane_method(None) + tool.Snap.set_snap_axis_method(None) PolylineDecorator.uninstall() tool.Snap.clear_polyline() tool.Blender.update_viewport() diff --git a/src/bonsai/bonsai/tool/snap.py b/src/bonsai/bonsai/tool/snap.py index 23e999d51e..eb2fd56ec2 100644 --- a/src/bonsai/bonsai/tool/snap.py +++ b/src/bonsai/bonsai/tool/snap.py @@ -39,6 +39,10 @@ class Snap(bonsai.core.tool.Snap): @classmethod def set_snap_plane_method(cls, value=True): + cls.snap_plane_method = value + + @classmethod + def cycle_snap_plane_method(cls, value=True): if cls.snap_plane_method == value: cls.snap_plane_method = None return