This commit is contained in:
Andrej730
2025-05-22 11:19:14 +05:00
parent 09e07c80c5
commit 441e2ddbd6
3 changed files with 8 additions and 10 deletions
+3 -5
View File
@@ -122,6 +122,7 @@ class ExtendWallsToWall(bpy.types.Operator, tool.Ifc.Operator):
else: else:
self.report({"ERROR"}, "Please select at least one LAYER2 element and one active LAYER2 element") self.report({"ERROR"}, "Please select at least one LAYER2 element and one active LAYER2 element")
class ExtendWallsToPolylinePoint(bpy.types.Operator, PolylineOperator, tool.Ifc.Operator): class ExtendWallsToPolylinePoint(bpy.types.Operator, PolylineOperator, tool.Ifc.Operator):
bl_idname = "bim.extend_walls_to_polyline_point" bl_idname = "bim.extend_walls_to_polyline_point"
bl_label = "Extend Walls To Polyline Point" bl_label = "Extend Walls To Polyline Point"
@@ -197,10 +198,7 @@ class ExtendWallsToPolylinePoint(bpy.types.Operator, PolylineOperator, tool.Ifc.
self.connection = "ATSTART" if self.connection == "ATEND" else "ATEND" self.connection = "ATSTART" if self.connection == "ATEND" else "ATEND"
self.set_origin(context, event, self.connection) self.set_origin(context, event, self.connection)
if ( if event.value == "RELEASE" and event.type in {"RET", "NUMPAD_ENTER", "RIGHTMOUSE", "LEFTMOUSE"}:
event.value == "RELEASE"
and event.type in {"RET", "NUMPAD_ENTER", "RIGHTMOUSE", "LEFTMOUSE"}
):
if self.tool_state.is_input_on: if self.tool_state.is_input_on:
is_valid = self.recalculate_inputs(context) is_valid = self.recalculate_inputs(context)
if is_valid: if is_valid:
@@ -235,7 +233,6 @@ class ExtendWallsToPolylinePoint(bpy.types.Operator, PolylineOperator, tool.Ifc.
tool.Blender.update_viewport() tool.Blender.update_viewport()
return {"FINISHED"} return {"FINISHED"}
self.handle_keyboard_input(context, event) self.handle_keyboard_input(context, event)
cancel = self.handle_cancelation(context, event) cancel = self.handle_cancelation(context, event)
@@ -256,6 +253,7 @@ class ExtendWallsToPolylinePoint(bpy.types.Operator, PolylineOperator, tool.Ifc.
tool.Blender.update_viewport() tool.Blender.update_viewport()
return {"RUNNING_MODAL"} return {"RUNNING_MODAL"}
class AlignWall(bpy.types.Operator): class AlignWall(bpy.types.Operator):
bl_idname = "bim.align_wall" bl_idname = "bim.align_wall"
bl_label = "Align Wall" bl_label = "Align Wall"
@@ -733,7 +733,7 @@ class SelectSimilar(Operator, tool.Ifc.Operator):
objects = context.selected_objects or [context.active_object] objects = context.selected_objects or [context.active_object]
if not objects: if not objects:
self.report({"WARNING"}, "No selected or active object found.") self.report({"WARNING"}, "No selected or active object found.")
return {'CANCELLED'} return {"CANCELLED"}
for obj in objects: for obj in objects:
element = tool.Ifc.get_entity(obj) element = tool.Ifc.get_entity(obj)
key = self.key key = self.key