mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
Polytool, fixed error with setting the plane method
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user