mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 14:41:25 +00:00
Exposed some MEP operators in BIM Tool UI
https://i.imgur.com/U61QqlQ.png
This commit is contained in:
@@ -347,14 +347,21 @@ class BimToolUI:
|
|||||||
"IfcDuctSegment",
|
"IfcDuctSegment",
|
||||||
"IfcPipeSegment",
|
"IfcPipeSegment",
|
||||||
):
|
):
|
||||||
add_layout_hotkey_operator(cls.layout, "Extend", "S_E", "")
|
|
||||||
add_layout_hotkey_operator(cls.layout, "Add Fitting", "S_F", "")
|
add_layout_hotkey_operator(cls.layout, "Add Fitting", "S_F", "")
|
||||||
|
add_layout_hotkey_operator(
|
||||||
|
cls.layout, "Regen MEP", "S_G", bpy.ops.bim.regenerate_distribution_element.__doc__
|
||||||
|
)
|
||||||
|
if context.region.type != "TOOL_HEADER":
|
||||||
|
cls.layout.operator("bim.mep_add_bend")
|
||||||
|
cls.layout.operator("bim.mep_add_transition")
|
||||||
|
cls.layout.operator("bim.mep_add_obstruction")
|
||||||
|
cls.layout.operator("bim.mep_connect_elements")
|
||||||
else:
|
else:
|
||||||
add_layout_hotkey_operator(cls.layout, "Edit Axis", "A_E", "")
|
add_layout_hotkey_operator(cls.layout, "Edit Axis", "A_E", "")
|
||||||
add_layout_hotkey_operator(cls.layout, "Butt", "S_T", "")
|
add_layout_hotkey_operator(cls.layout, "Butt", "S_T", "")
|
||||||
add_layout_hotkey_operator(cls.layout, "Mitre", "S_Y", "")
|
add_layout_hotkey_operator(cls.layout, "Mitre", "S_Y", "")
|
||||||
add_layout_hotkey_operator(cls.layout, "Rotate 90", "S_R", bpy.ops.bim.rotate_90.__doc__)
|
add_layout_hotkey_operator(cls.layout, "Rotate 90", "S_R", bpy.ops.bim.rotate_90.__doc__)
|
||||||
add_layout_hotkey_operator(cls.layout, "Regen", "S_G", bpy.ops.bim.recalculate_profile.__doc__)
|
add_layout_hotkey_operator(cls.layout, "Regen", "S_G", bpy.ops.bim.recalculate_profile.__doc__)
|
||||||
row.operator("bim.extend_profile", icon="X", text="").join_type = ""
|
row.operator("bim.extend_profile", icon="X", text="").join_type = ""
|
||||||
|
|
||||||
elif (
|
elif (
|
||||||
@@ -667,7 +674,15 @@ class Hotkey(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
if self.active_material_usage == "LAYER2":
|
if self.active_material_usage == "LAYER2":
|
||||||
bpy.ops.bim.recalculate_wall()
|
bpy.ops.bim.recalculate_wall()
|
||||||
elif self.active_material_usage == "PROFILE":
|
elif self.active_material_usage == "PROFILE":
|
||||||
bpy.ops.bim.recalculate_profile()
|
if self.active_class in (
|
||||||
|
"IfcCableCarrierSegment",
|
||||||
|
"IfcCableSegment",
|
||||||
|
"IfcDuctSegment",
|
||||||
|
"IfcPipeSegment",
|
||||||
|
):
|
||||||
|
bpy.ops.bim.regenerate_distribution_element()
|
||||||
|
else:
|
||||||
|
bpy.ops.bim.recalculate_profile()
|
||||||
elif self.active_class in ("IfcWindow", "IfcWindowStandardCase", "IfcDoor", "IfcDoorStandardCase"):
|
elif self.active_class in ("IfcWindow", "IfcWindowStandardCase", "IfcDoor", "IfcDoorStandardCase"):
|
||||||
bpy.ops.bim.recalculate_fill()
|
bpy.ops.bim.recalculate_fill()
|
||||||
elif self.active_class in ("IfcSpace"):
|
elif self.active_class in ("IfcSpace"):
|
||||||
|
|||||||
Reference in New Issue
Block a user