mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 06:39:13 +00:00
Fix #5336
This commit is contained in:
committed by
Bruno Perdigão
parent
d63961d840
commit
e48050af4b
@@ -543,9 +543,11 @@ class DrawPolylineWall(bpy.types.Operator):
|
|||||||
def invoke(self, context, event):
|
def invoke(self, context, event):
|
||||||
if context.space_data.type == "VIEW_3D":
|
if context.space_data.type == "VIEW_3D":
|
||||||
PolylineDecorator.install(context)
|
PolylineDecorator.install(context)
|
||||||
|
tool.Snap.clear_snapping_point()
|
||||||
tool.Snap.set_use_default_container(True)
|
tool.Snap.set_use_default_container(True)
|
||||||
PolylineDecorator.set_use_default_container(True)
|
PolylineDecorator.set_use_default_container(True)
|
||||||
tool.Polyline.set_use_default_container(True)
|
tool.Polyline.set_use_default_container(True)
|
||||||
|
tool.Snap.set_snap_axis_method(None)
|
||||||
tool.Snap.set_snap_plane_method("XY")
|
tool.Snap.set_snap_plane_method("XY")
|
||||||
PolylineDecorator.set_instructions(self.instructions)
|
PolylineDecorator.set_instructions(self.instructions)
|
||||||
PolylineDecorator.set_input_ui(self.input_ui, self.input_type)
|
PolylineDecorator.set_input_ui(self.input_ui, self.input_type)
|
||||||
|
|||||||
@@ -2527,6 +2527,7 @@ class MeasureTool(bpy.types.Operator):
|
|||||||
def invoke(self, context, event):
|
def invoke(self, context, event):
|
||||||
if context.space_data.type == "VIEW_3D":
|
if context.space_data.type == "VIEW_3D":
|
||||||
PolylineDecorator.install(context)
|
PolylineDecorator.install(context)
|
||||||
|
tool.Snap.clear_snapping_point()
|
||||||
tool.Snap.set_use_default_container(False)
|
tool.Snap.set_use_default_container(False)
|
||||||
PolylineDecorator.set_use_default_container(False)
|
PolylineDecorator.set_use_default_container(False)
|
||||||
tool.Polyline.set_use_default_container(False)
|
tool.Polyline.set_use_default_container(False)
|
||||||
|
|||||||
@@ -109,6 +109,10 @@ class Snap(bonsai.core.tool.Snap):
|
|||||||
snap_vertex.z = snap_point[2]
|
snap_vertex.z = snap_point[2]
|
||||||
snap_vertex.snap_type = snap_type
|
snap_vertex.snap_type = snap_type
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def clear_snapping_point(cls):
|
||||||
|
bpy.context.scene.BIMModelProperties.snap_mouse_point.clear()
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def update_snapping_ref(cls, snap_point, snap_type):
|
def update_snapping_ref(cls, snap_point, snap_type):
|
||||||
try:
|
try:
|
||||||
@@ -413,6 +417,7 @@ class Snap(bonsai.core.tool.Snap):
|
|||||||
|
|
||||||
# TODO It only work for XY plane. Make it work also for None plane_method
|
# TODO It only work for XY plane. Make it work also for None plane_method
|
||||||
rot_intersection = None
|
rot_intersection = None
|
||||||
|
cls.snap_angle = None
|
||||||
if not cls.snap_plane_method:
|
if not cls.snap_plane_method:
|
||||||
if cls.snap_axis_method == "X":
|
if cls.snap_axis_method == "X":
|
||||||
cls.snap_angle = 180
|
cls.snap_angle = 180
|
||||||
|
|||||||
Reference in New Issue
Block a user