mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-16 21:42:19 +00:00
Fixed Polyline Wall after changes in Measure tool input
This commit is contained in:
@@ -378,7 +378,7 @@ class DrawPolylineWall(bpy.types.Operator):
|
|||||||
tool.Blender.update_viewport()
|
tool.Blender.update_viewport()
|
||||||
|
|
||||||
if event.value == "RELEASE" and event.type == "LEFTMOUSE":
|
if event.value == "RELEASE" and event.type == "LEFTMOUSE":
|
||||||
tool.Snap.insert_polyline_point()
|
tool.Snap.insert_polyline_point(self.input_panel)
|
||||||
tool.Blender.update_viewport()
|
tool.Blender.update_viewport()
|
||||||
|
|
||||||
if event.value == "PRESS" and event.type == "C":
|
if event.value == "PRESS" and event.type == "C":
|
||||||
@@ -448,7 +448,7 @@ class DrawPolylineWall(bpy.types.Operator):
|
|||||||
|
|
||||||
if self.is_input_on and event.value == "RELEASE" and event.type in {"RET", "NUMPAD_ENTER", "RIGHTMOUSE"}:
|
if self.is_input_on and event.value == "RELEASE" and event.type in {"RET", "NUMPAD_ENTER", "RIGHTMOUSE"}:
|
||||||
self.recalculate_inputs(context)
|
self.recalculate_inputs(context)
|
||||||
tool.Snap.insert_polyline_point(float(self.input_panel["X"]), float(self.input_panel["Y"]))
|
tool.Snap.insert_polyline_point(self.input_panel)
|
||||||
self.is_input_on = False
|
self.is_input_on = False
|
||||||
self.input_type = "OFF"
|
self.input_type = "OFF"
|
||||||
self.number_input = []
|
self.number_input = []
|
||||||
|
|||||||
@@ -118,11 +118,14 @@ class Snap(bonsai.core.tool.Snap):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def insert_polyline_point(cls, input_panel):
|
def insert_polyline_point(cls, input_panel):
|
||||||
x = float(input_panel['X'])
|
x = float(input_panel["X"])
|
||||||
y = float(input_panel['Y'])
|
y = float(input_panel["Y"])
|
||||||
z = float(input_panel['Z'])
|
try:
|
||||||
d = input_panel['D']
|
z = float(input_panel["Z"])
|
||||||
a = input_panel['A']
|
except:
|
||||||
|
z = Vector((0, 0, 0))
|
||||||
|
d = input_panel["D"]
|
||||||
|
a = input_panel["A"]
|
||||||
|
|
||||||
snap_vertex = bpy.context.scene.BIMModelProperties.snap_mouse_point[0]
|
snap_vertex = bpy.context.scene.BIMModelProperties.snap_mouse_point[0]
|
||||||
if cls.use_default_container:
|
if cls.use_default_container:
|
||||||
@@ -371,7 +374,6 @@ class Snap(bonsai.core.tool.Snap):
|
|||||||
else:
|
else:
|
||||||
return None, None, None
|
return None, None, None
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
polyline_data = bpy.context.scene.BIMModelProperties.polyline_point
|
polyline_data = bpy.context.scene.BIMModelProperties.polyline_point
|
||||||
last_polyline_point = polyline_data[len(polyline_data) - 1]
|
last_polyline_point = polyline_data[len(polyline_data) - 1]
|
||||||
|
|||||||
Reference in New Issue
Block a user