mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 18:43:26 +00:00
Update tooltips for UI elements (#5348)
* Update documentation * Add further documentation * Update tooltip after discussion 1. Change void to opening 2. Add blank bl_label fields * Make missed out correction
This commit is contained in:
@@ -648,7 +648,7 @@ class MEPAddTransition(bpy.types.Operator, tool.Ifc.Operator):
|
||||
bl_idname = "bim.mep_add_transition"
|
||||
bl_label = "Add Transition"
|
||||
bl_description = (
|
||||
"Adds transition between two MEP elements. Elements are either provided by ID or selected in Blender"
|
||||
"Adds transition between two selected MEP Elements"
|
||||
)
|
||||
bl_options = {"REGISTER", "UNDO"}
|
||||
start_length: bpy.props.FloatProperty(
|
||||
@@ -892,7 +892,7 @@ class MEPAddTransition(bpy.types.Operator, tool.Ifc.Operator):
|
||||
class MEPAddBend(bpy.types.Operator, tool.Ifc.Operator):
|
||||
bl_idname = "bim.mep_add_bend"
|
||||
bl_label = "Add Bend"
|
||||
bl_description = "Adds a bend between two MEP elements. Elements are either provided by ID or selected in Blender"
|
||||
bl_description = "Adds a bend between two selected MEP Elements"
|
||||
bl_options = {"REGISTER", "UNDO"}
|
||||
start_length: bpy.props.FloatProperty(
|
||||
name="Start Length", description="Bend start length in SI units", default=0.1, subtype="DISTANCE", min=0
|
||||
|
||||
@@ -431,7 +431,8 @@ class FlipFill(bpy.types.Operator, tool.Ifc.Operator):
|
||||
|
||||
class AddPotentialOpening(Operator, AddObjectHelper):
|
||||
bl_idname = "bim.add_potential_opening"
|
||||
bl_label = "Add Potential Opening"
|
||||
bl_label = "Add Opening"
|
||||
bl_description = "Add an Opening object which can be applied on an Element"
|
||||
bl_options = {"REGISTER", "UNDO"}
|
||||
x: FloatProperty(name="X", default=0.5)
|
||||
y: FloatProperty(name="Y", default=0.5)
|
||||
@@ -726,7 +727,8 @@ class RemoveBooleans(Operator, tool.Ifc.Operator, AddObjectHelper):
|
||||
|
||||
class ShowOpenings(Operator, tool.Ifc.Operator):
|
||||
bl_idname = "bim.show_openings"
|
||||
bl_label = "Show Openings"
|
||||
bl_label = "Show"
|
||||
bl_description = "Show Openings"
|
||||
bl_options = {"REGISTER", "UNDO"}
|
||||
|
||||
def _execute(self, context):
|
||||
@@ -753,7 +755,8 @@ class ShowOpenings(Operator, tool.Ifc.Operator):
|
||||
|
||||
class HideOpenings(Operator, tool.Ifc.Operator):
|
||||
bl_idname = "bim.hide_openings"
|
||||
bl_label = "Hide Openings"
|
||||
bl_label = "Hide"
|
||||
bl_description = "Hide Openings"
|
||||
bl_options = {"REGISTER", "UNDO"}
|
||||
|
||||
def _execute(self, context):
|
||||
@@ -779,7 +782,8 @@ class HideOpenings(Operator, tool.Ifc.Operator):
|
||||
|
||||
class EditOpenings(Operator, tool.Ifc.Operator):
|
||||
bl_idname = "bim.edit_openings"
|
||||
bl_label = "Edit Openings"
|
||||
bl_label = "Edit"
|
||||
bl_description = "Edit Openings"
|
||||
bl_options = {"REGISTER", "UNDO"}
|
||||
|
||||
def _execute(self, context):
|
||||
@@ -843,8 +847,8 @@ class EditOpenings(Operator, tool.Ifc.Operator):
|
||||
class CloneOpening(Operator, tool.Ifc.Operator):
|
||||
bl_idname = "bim.clone_opening"
|
||||
bl_label = "Clone Opening"
|
||||
bl_description = "Clone the selected Opening and assign to the selected Element"
|
||||
bl_options = {"REGISTER", "UNDO"}
|
||||
bl_description = "Create and assign to the selected element the selected opening and assign to it the same representation and object placement"
|
||||
|
||||
def _execute(self, context):
|
||||
objects = bpy.context.selected_objects
|
||||
|
||||
@@ -74,7 +74,8 @@ class AddEmptyType(bpy.types.Operator, AddObjectHelper):
|
||||
|
||||
class AddDefaultType(bpy.types.Operator, tool.Ifc.Operator):
|
||||
bl_idname = "bim.add_default_type"
|
||||
bl_label = "Add Default Type"
|
||||
bl_label = "Create"
|
||||
bl_description = "Create Construction Type"
|
||||
bl_options = {"REGISTER", "UNDO"}
|
||||
ifc_element_type: bpy.props.StringProperty()
|
||||
|
||||
@@ -116,7 +117,7 @@ class AddConstrTypeInstance(bpy.types.Operator, tool.Ifc.Operator):
|
||||
bl_idname = "bim.add_constr_type_instance"
|
||||
bl_label = "Add"
|
||||
bl_options = {"REGISTER", "UNDO"}
|
||||
bl_description = "Add Type Instance to the model"
|
||||
bl_description = "Add Type Instance"
|
||||
relating_type_id: bpy.props.IntProperty(default=0, options={"SKIP_SAVE"})
|
||||
from_invoke: bpy.props.BoolProperty(default=False, options={"SKIP_SAVE"})
|
||||
|
||||
|
||||
@@ -844,7 +844,8 @@ class DumbProfileRecalculator:
|
||||
|
||||
class ChangeProfileDepth(bpy.types.Operator, tool.Ifc.Operator):
|
||||
bl_idname = "bim.change_profile_depth"
|
||||
bl_label = "Change Profile Length"
|
||||
bl_label = "Update"
|
||||
bl_description = "Update Profile Length"
|
||||
bl_options = {"REGISTER", "UNDO"}
|
||||
depth: bpy.props.FloatProperty(subtype="DISTANCE")
|
||||
|
||||
@@ -861,7 +862,8 @@ class ChangeProfileDepth(bpy.types.Operator, tool.Ifc.Operator):
|
||||
|
||||
class ChangeCardinalPoint(bpy.types.Operator, tool.Ifc.Operator):
|
||||
bl_idname = "bim.change_cardinal_point"
|
||||
bl_label = "Change Cardinal Point"
|
||||
bl_label = "Update"
|
||||
bl_description = "Update Cardinal Point"
|
||||
bl_options = {"REGISTER", "UNDO"}
|
||||
cardinal_point: bpy.props.IntProperty()
|
||||
|
||||
|
||||
@@ -135,7 +135,7 @@ class BIMModelProperties(PropertyGroup):
|
||||
description="Code that will be evaluated to generate occurrence name for CUSTOM occurrence name style",
|
||||
)
|
||||
getter_enum = {"ifc_class": get_ifc_class, "relating_type": get_relating_type_id}
|
||||
extrusion_depth: bpy.props.FloatProperty(min=0.001, default=42.0, subtype="DISTANCE")
|
||||
extrusion_depth: bpy.props.FloatProperty(name="Extrusion Depth", min=0.001, default=42.0, subtype="DISTANCE")
|
||||
cardinal_point: bpy.props.EnumProperty(
|
||||
items=(
|
||||
# TODO: complain to buildingSMART
|
||||
@@ -162,7 +162,7 @@ class BIMModelProperties(PropertyGroup):
|
||||
name="Cardinal Point",
|
||||
default="5",
|
||||
)
|
||||
length: bpy.props.FloatProperty(default=42.0, subtype="DISTANCE")
|
||||
length: bpy.props.FloatProperty(name="Length", default=42.0, subtype="DISTANCE")
|
||||
openings: bpy.props.CollectionProperty(type=ObjProperty)
|
||||
x: bpy.props.FloatProperty(name="X", default=0.5, subtype="DISTANCE", description="Size by X axis for the opening")
|
||||
y: bpy.props.FloatProperty(name="Y", default=0.5, subtype="DISTANCE", description="Size by Y axis for the opening")
|
||||
|
||||
@@ -446,7 +446,8 @@ class FlipRailingPathOrder(bpy.types.Operator, tool.Ifc.Operator):
|
||||
|
||||
class EnableEditingRailingPath(bpy.types.Operator, tool.Ifc.Operator):
|
||||
bl_idname = "bim.enable_editing_railing_path"
|
||||
bl_label = "Enable Editing Railing Path"
|
||||
bl_label = "Edit Railing"
|
||||
bl_description = "Enable Editing Railing Path"
|
||||
bl_options = {"REGISTER"}
|
||||
|
||||
def _execute(self, context):
|
||||
|
||||
@@ -640,7 +640,8 @@ class FinishEditingRoof(bpy.types.Operator, tool.Ifc.Operator):
|
||||
|
||||
class EnableEditingRoofPath(bpy.types.Operator, tool.Ifc.Operator):
|
||||
bl_idname = "bim.enable_editing_roof_path"
|
||||
bl_label = "Enable Editing Roof Path"
|
||||
bl_label = "Edit Roof"
|
||||
bl_description = "Enable Editing Roof Path"
|
||||
bl_options = {"REGISTER"}
|
||||
|
||||
def _execute(self, context):
|
||||
|
||||
@@ -45,6 +45,7 @@ from lark import Lark, Transformer
|
||||
class UnjoinWalls(bpy.types.Operator, tool.Ifc.Operator):
|
||||
bl_idname = "bim.unjoin_walls"
|
||||
bl_label = "Unjoin Walls"
|
||||
bl_description = "Unjoin the selected walls"
|
||||
bl_options = {"REGISTER", "UNDO"}
|
||||
|
||||
@classmethod
|
||||
@@ -156,7 +157,8 @@ class RecalculateWall(bpy.types.Operator, tool.Ifc.Operator):
|
||||
|
||||
class ChangeExtrusionDepth(bpy.types.Operator, tool.Ifc.Operator):
|
||||
bl_idname = "bim.change_extrusion_depth"
|
||||
bl_label = "Change Extrusion Depth"
|
||||
bl_label = "Update"
|
||||
bl_description = "Update Height"
|
||||
bl_options = {"REGISTER", "UNDO"}
|
||||
depth: bpy.props.FloatProperty()
|
||||
|
||||
@@ -197,7 +199,8 @@ class ChangeExtrusionDepth(bpy.types.Operator, tool.Ifc.Operator):
|
||||
|
||||
class ChangeExtrusionXAngle(bpy.types.Operator, tool.Ifc.Operator):
|
||||
bl_idname = "bim.change_extrusion_x_angle"
|
||||
bl_label = "Change Extrusion X Angle"
|
||||
bl_label = "Update"
|
||||
bl_description = "Update Angle"
|
||||
bl_options = {"REGISTER", "UNDO"}
|
||||
x_angle: bpy.props.FloatProperty(name="X Angle", default=0, subtype="ANGLE")
|
||||
|
||||
@@ -250,7 +253,8 @@ class ChangeExtrusionXAngle(bpy.types.Operator, tool.Ifc.Operator):
|
||||
|
||||
class ChangeLayerLength(bpy.types.Operator, tool.Ifc.Operator):
|
||||
bl_idname = "bim.change_layer_length"
|
||||
bl_label = "Change Layer Length"
|
||||
bl_label = "Update"
|
||||
bl_description = "Update Length"
|
||||
bl_options = {"REGISTER", "UNDO"}
|
||||
length: bpy.props.FloatProperty()
|
||||
|
||||
|
||||
@@ -284,7 +284,10 @@ def add_layout_hotkey_operator(layout, text, hotkey, description, ui_context="")
|
||||
description += hotkey_description
|
||||
|
||||
op.hotkey = hotkey
|
||||
op.description = description
|
||||
if ui_context == "TOOL_HEADER":
|
||||
op.description = text + "\n" + description
|
||||
else:
|
||||
op.description = description
|
||||
return op
|
||||
|
||||
|
||||
@@ -367,7 +370,11 @@ class BimToolUI:
|
||||
row = cls.layout.row(align=True)
|
||||
row.prop(data=cls.props, property="rl2", text="RL")
|
||||
elif cls.props.ifc_class in ("IfcSpaceType"):
|
||||
add_layout_hotkey_operator(cls.layout, "Generate", "S_G", bpy.ops.bim.generate_space.__doc__)
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout,
|
||||
"Generate",
|
||||
"S_G",
|
||||
"Generate a space at the cursor position")
|
||||
else:
|
||||
row = cls.layout.row(align=True)
|
||||
row.prop(data=cls.props, property="rl_mode", text="RL")
|
||||
@@ -393,7 +400,12 @@ class BimToolUI:
|
||||
|
||||
cls.layout.separator()
|
||||
|
||||
add_layout_hotkey_operator(cls.layout, "Regen", "S_G", bpy.ops.bim.recalculate_wall.__doc__, ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout,
|
||||
"Regen",
|
||||
"S_G",
|
||||
"Regenerate selected Element",
|
||||
ui_context)
|
||||
|
||||
cls.layout.separator()
|
||||
|
||||
@@ -401,21 +413,21 @@ class BimToolUI:
|
||||
cls.layout,
|
||||
"Extend",
|
||||
"S_E",
|
||||
"Extends/reduces element to 3D cursor",
|
||||
"Extends/ reduces Element to 3D cursor",
|
||||
ui_context,
|
||||
)
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout,
|
||||
"Butt",
|
||||
"S_T",
|
||||
"Intersects two non-parallel elements to a butt corner junction",
|
||||
"Intersects two non-parallel Elements to a butt corner junction",
|
||||
ui_context,
|
||||
)
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout,
|
||||
"Mitre",
|
||||
"S_Y",
|
||||
"Intersects two non-parallel elements to a mitred corner junction",
|
||||
"Intersects two non-parallel Elements to a mitred corner junction",
|
||||
ui_context,
|
||||
)
|
||||
|
||||
@@ -425,18 +437,48 @@ class BimToolUI:
|
||||
)
|
||||
cls.layout.separator()
|
||||
|
||||
add_layout_hotkey_operator(cls.layout, "Merge", "S_M", bpy.ops.bim.merge_wall.__doc__, ui_context)
|
||||
add_layout_hotkey_operator(cls.layout, "Split", "S_K", bpy.ops.bim.split_wall.__doc__, ui_context)
|
||||
add_layout_hotkey_operator(cls.layout, "Rotate 90", "S_R", bpy.ops.bim.rotate_90.__doc__, ui_context)
|
||||
add_layout_hotkey_operator(cls.layout, "Flip", "S_F", bpy.ops.bim.flip_wall.__doc__, ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout,
|
||||
"Merge",
|
||||
"S_M",
|
||||
"Merge selected Elements",
|
||||
ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout,
|
||||
"Split",
|
||||
"S_K",
|
||||
"Split selected Element into two Elements at the cursor location",
|
||||
ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout,
|
||||
"Rotate 90",
|
||||
"S_R",
|
||||
"Rotate the selected Element by 90 degrees",
|
||||
ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout,
|
||||
"Flip",
|
||||
"S_F",
|
||||
"Flip Element about its local axes, keep the position",
|
||||
ui_context)
|
||||
|
||||
# row.operator("bim.unjoin_walls", icon="X", text="")
|
||||
|
||||
elif AuthoringData.data["active_material_usage"] == "LAYER3":
|
||||
if len(context.selected_objects) == 1:
|
||||
add_layout_hotkey_operator(cls.layout, "Edit Profile", "S_E", "", ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout,
|
||||
"Edit Profile",
|
||||
"S_E",
|
||||
"Edit associated Profile Element",
|
||||
ui_context)
|
||||
elif "LAYER2" in AuthoringData.data["selected_material_usages"]:
|
||||
add_layout_hotkey_operator(cls.layout, "Extend Wall To Slab", "S_E", "", ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout,
|
||||
"Extend Wall To Slab",
|
||||
"S_E",
|
||||
"Extend the selected Wall to the selected Slab",
|
||||
ui_context)
|
||||
|
||||
row = cls.layout.row(align=True)
|
||||
row.prop(data=cls.props, property="x_angle", text="Angle")
|
||||
@@ -461,10 +503,15 @@ class BimToolUI:
|
||||
cls.layout,
|
||||
"Extend",
|
||||
"S_E",
|
||||
"",
|
||||
"Extends/ reduces element to 3D cursor",
|
||||
ui_context,
|
||||
)
|
||||
add_layout_hotkey_operator(cls.layout, "Flip", "S_F", bpy.ops.bim.flip_object.__doc__, ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout,
|
||||
"Flip",
|
||||
"S_F",
|
||||
"Flip object about its local axes, keep the position",
|
||||
ui_context)
|
||||
|
||||
if AuthoringData.data["active_class"] in (
|
||||
"IfcCableCarrierSegment",
|
||||
@@ -473,7 +520,12 @@ class BimToolUI:
|
||||
"IfcPipeSegment",
|
||||
):
|
||||
|
||||
add_layout_hotkey_operator(cls.layout, "Add Fitting", "S_Y", "", ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout,
|
||||
"Add Fitting",
|
||||
"S_Y",
|
||||
"Add a Fitting based on currently selected Elements and cursor",
|
||||
ui_context)
|
||||
cls.layout.operator("bim.mep_add_bend")
|
||||
cls.layout.operator("bim.mep_add_transition")
|
||||
cls.layout.operator("bim.mep_add_obstruction")
|
||||
@@ -483,26 +535,35 @@ class BimToolUI:
|
||||
cls.layout,
|
||||
"Edit Axis",
|
||||
"A_E",
|
||||
"",
|
||||
"Edit axis of element",
|
||||
ui_context,
|
||||
)
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout,
|
||||
"Butt",
|
||||
"S_T",
|
||||
"",
|
||||
"Intersects two non-parallel Elements to a butt corner junction",
|
||||
ui_context,
|
||||
)
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout,
|
||||
"Mitre",
|
||||
"S_Y",
|
||||
"",
|
||||
"Intersects two non-parallel Elements to a mitred corner junction",
|
||||
ui_context,
|
||||
)
|
||||
add_layout_hotkey_operator(cls.layout, "Rotate 90", "S_R", bpy.ops.bim.rotate_90.__doc__, ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout, "Regen", "S_G", bpy.ops.bim.recalculate_profile.__doc__, ui_context
|
||||
cls.layout,
|
||||
"Rotate 90",
|
||||
"S_R",
|
||||
"Rotate the selected element by 90 degrees",
|
||||
ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout,
|
||||
"Regen",
|
||||
"S_G",
|
||||
"Regenerate selected element",
|
||||
ui_context
|
||||
)
|
||||
row.operator("bim.extend_profile", icon="X", text="").join_type = ""
|
||||
|
||||
@@ -528,15 +589,35 @@ class BimToolUI:
|
||||
row = cls.layout.row(align=True)
|
||||
row.prop(data=cls.props, property="rl1", text="RL")
|
||||
|
||||
add_layout_hotkey_operator(cls.layout, "Regen", "S_G", bpy.ops.bim.recalculate_fill.__doc__, ui_context)
|
||||
add_layout_hotkey_operator(cls.layout, "Flip", "S_F", "", ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout,
|
||||
"Regen",
|
||||
"S_G",
|
||||
"Regenerate selected Element",
|
||||
ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout,
|
||||
"Flip",
|
||||
"S_F",
|
||||
"Flip object about its local axes, keep the position",
|
||||
ui_context)
|
||||
|
||||
elif AuthoringData.data["active_representation_type"] == "SweptSolid":
|
||||
if not tool.Model.is_parametric_window_active() and not tool.Model.is_parametric_door_active():
|
||||
add_layout_hotkey_operator(cls.layout, "Edit Profile", "S_E", "", ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout,
|
||||
"Edit Profile",
|
||||
"S_E",
|
||||
"Edit assosiated Profile Element",
|
||||
ui_context)
|
||||
|
||||
elif AuthoringData.data["active_class"] in ("IfcSpace",):
|
||||
add_layout_hotkey_operator(cls.layout, "Regen", "S_G", bpy.ops.bim.generate_space.__doc__, ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout,
|
||||
"Regen",
|
||||
"S_G",
|
||||
"Regenerate selected Space",
|
||||
ui_context)
|
||||
|
||||
elif tool.Model.is_parametric_roof_active() and not context.active_object.BIMRoofProperties.is_editing_path:
|
||||
row = cls.layout.row(align=True)
|
||||
@@ -545,16 +626,20 @@ class BimToolUI:
|
||||
|
||||
if context.region.type != "TOOL_HEADER" and PortData.data["total_ports"] > 0:
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout, "Regen MEP", "S_G", bpy.ops.bim.regenerate_distribution_element.__doc__, ui_context
|
||||
cls.layout,
|
||||
"Regen MEP",
|
||||
"S_G",
|
||||
"Regenerates the positions and segment lengths of a distribution element and all connected elements",
|
||||
ui_context
|
||||
)
|
||||
cls.layout.operator("bim.mep_connect_elements")
|
||||
|
||||
row = cls.layout.row(align=True)
|
||||
if len(context.selected_objects) > 1:
|
||||
row.operator("bim.add_opening", text="Apply Void", icon_value=custom_icon_previews["VOID"].icon_id)
|
||||
row.operator("bim.add_opening", text="Apply Opening", icon_value=custom_icon_previews["VOID"].icon_id)
|
||||
else:
|
||||
row.operator(
|
||||
"bim.add_potential_opening", text="Add Void", icon_value=custom_icon_previews["ADD_VOID"].icon_id
|
||||
"bim.add_potential_opening", text="Add Opening", icon_value=custom_icon_previews["ADD_VOID"].icon_id
|
||||
)
|
||||
row.label(text="", icon="EVENT_SHIFT")
|
||||
row.label(text="", icon="EVENT_O")
|
||||
@@ -575,24 +660,67 @@ class BimToolUI:
|
||||
row.operator("bim.clone_opening", text="Clone Opening")
|
||||
|
||||
cls.layout.row(align=True).label(text="Align")
|
||||
add_layout_hotkey_operator(cls.layout, "Exterior", "S_X", "", ui_context)
|
||||
add_layout_hotkey_operator(cls.layout, "Centerline", "S_C", "", ui_context)
|
||||
add_layout_hotkey_operator(cls.layout, "Interior", "S_V", "", ui_context)
|
||||
add_layout_hotkey_operator(cls.layout, "Mirror", "S_M", bpy.ops.bim.mirror_elements.__doc__, ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout,
|
||||
"Exterior",
|
||||
"S_X",
|
||||
"Align selected Elements to the Exterior of the last selected object",
|
||||
ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout,
|
||||
"Centerline",
|
||||
"S_C",
|
||||
"Align selected Elements to the Centerline of the last selected object",
|
||||
ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout,
|
||||
"Interior",
|
||||
"S_V",
|
||||
"Align selected Elements to the Interior of the last selected object",
|
||||
ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout,
|
||||
"Mirror",
|
||||
"S_M",
|
||||
"Mirrors the selected Elements along a mirror plane set by the last selected object",
|
||||
ui_context)
|
||||
|
||||
cls.layout.row(align=True).label(text="Mode")
|
||||
add_layout_hotkey_operator(cls.layout, "Void", "A_O", "Toggle openings", ui_context)
|
||||
add_layout_hotkey_operator(cls.layout, "Decomposition", "A_D", "Select decomposition", ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout,
|
||||
"Opening",
|
||||
"A_O",
|
||||
"Toggle display of Openings in the selected Elements",
|
||||
ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout,
|
||||
"Decomposition",
|
||||
"A_D",
|
||||
"Select decomposition",
|
||||
ui_context)
|
||||
|
||||
cls.layout.row(align=True).label(text="Aggregation")
|
||||
add_layout_hotkey_operator(cls.layout, "Assign", "C_P", bpy.ops.bim.aggregate_assign_object.__doc__, ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout, "Unassign", "A_P", bpy.ops.bim.aggregate_unassign_object.__doc__, ui_context
|
||||
cls.layout,
|
||||
"Assign",
|
||||
"C_P",
|
||||
"Assign element to Aggregation",
|
||||
ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout,
|
||||
"Unassign",
|
||||
"A_P",
|
||||
"Unassign element from Aggregation",
|
||||
ui_context
|
||||
)
|
||||
|
||||
cls.layout.row(align=True).label(text="Qto")
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout, "Perform Quantity Take-off", "S_Q", bpy.ops.bim.perform_quantity_take_off.__doc__, ui_context
|
||||
cls.layout,
|
||||
"Perform Quantity Take-off",
|
||||
"S_Q",
|
||||
"Perform a quantity take off on selected objects based of a QTO rule configuration",
|
||||
ui_context
|
||||
)
|
||||
|
||||
@classmethod
|
||||
@@ -615,43 +743,78 @@ class BimToolUI:
|
||||
op.x_angle = cls.props.x_angle
|
||||
|
||||
row = cls.layout.row()
|
||||
add_layout_hotkey_operator(row, "Regen", "S_G", bpy.ops.bim.recalculate_wall.__doc__, ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
row,
|
||||
"Regen",
|
||||
"S_G",
|
||||
"Regenerate selected Element",
|
||||
ui_context)
|
||||
|
||||
row = cls.layout.row(align=True)
|
||||
add_layout_hotkey_operator(
|
||||
row,
|
||||
"Extend",
|
||||
"S_E",
|
||||
"Extends/reduces element to 3D cursor",
|
||||
"Extends/reduces Element to 3D cursor",
|
||||
ui_context,
|
||||
)
|
||||
add_layout_hotkey_operator(
|
||||
row,
|
||||
"Butt",
|
||||
"S_T",
|
||||
"Intersects two non-parallel elements to a butt corner junction",
|
||||
"Intersects two non-parallel Elements to a butt corner junction",
|
||||
ui_context,
|
||||
)
|
||||
add_layout_hotkey_operator(
|
||||
row,
|
||||
"Mitre",
|
||||
"S_Y",
|
||||
"Intersects two non-parallel elements to a mitred corner junction",
|
||||
"Intersects two non-parallel Elements to a mitred corner junction",
|
||||
ui_context,
|
||||
)
|
||||
row.operator("bim.unjoin_walls", text="", icon_value=custom_icon_previews["UNJOIN_WALLS"].icon_id)
|
||||
|
||||
row = cls.layout.row(align=True)
|
||||
add_layout_hotkey_operator(row, "Merge", "S_M", bpy.ops.bim.merge_wall.__doc__, ui_context)
|
||||
add_layout_hotkey_operator(row, "Split", "S_K", bpy.ops.bim.split_wall.__doc__, ui_context)
|
||||
add_layout_hotkey_operator(row, "Rotate 90", "S_R", bpy.ops.bim.rotate_90.__doc__, ui_context)
|
||||
add_layout_hotkey_operator(row, "Flip", "S_F", bpy.ops.bim.flip_wall.__doc__, ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
row,
|
||||
"Merge",
|
||||
"S_M",
|
||||
"Merge selected Elements",
|
||||
ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
row,
|
||||
"Split",
|
||||
"S_K",
|
||||
"Split selected Element into two Elements at the cursor location",
|
||||
ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
row,
|
||||
"Rotate 90",
|
||||
"S_R",
|
||||
"Rotate the selected Element by 90 degrees",
|
||||
ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
row,
|
||||
"Flip",
|
||||
"S_F",
|
||||
"Flip Element about its local axes, keep the position",
|
||||
ui_context)
|
||||
|
||||
elif AuthoringData.data["active_material_usage"] == "LAYER3":
|
||||
if len(context.selected_objects) == 1:
|
||||
add_layout_hotkey_operator(cls.layout, "Edit Profile", "S_E", "", ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout,
|
||||
"Edit Profile",
|
||||
"S_E",
|
||||
"Edit associated Profile Element",
|
||||
ui_context)
|
||||
elif "LAYER2" in AuthoringData.data["selected_material_usages"]:
|
||||
add_layout_hotkey_operator(cls.layout, "Extend Wall To Slab", "S_E", "", ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout,
|
||||
"Extend Wall To Slab",
|
||||
"S_E",
|
||||
"Extend the selected Wall to the selected Slab",
|
||||
ui_context)
|
||||
|
||||
row = cls.layout.row(align=True)
|
||||
row.prop(data=cls.props, property="x_angle", text="Angle")
|
||||
@@ -676,10 +839,15 @@ class BimToolUI:
|
||||
cls.layout,
|
||||
"Extend",
|
||||
"S_E",
|
||||
"",
|
||||
"Extends/ reduces element to 3D cursor",
|
||||
ui_context,
|
||||
)
|
||||
add_layout_hotkey_operator(cls.layout, "Flip", "S_F", bpy.ops.bim.flip_object.__doc__, ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout,
|
||||
"Flip",
|
||||
"S_F",
|
||||
"Flip object about its local axes, keep the position",
|
||||
ui_context)
|
||||
|
||||
if AuthoringData.data["active_class"] in (
|
||||
"IfcCableCarrierSegment",
|
||||
@@ -688,7 +856,12 @@ class BimToolUI:
|
||||
"IfcPipeSegment",
|
||||
):
|
||||
|
||||
add_layout_hotkey_operator(cls.layout, "Add Fitting", "S_Y", "", ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout,
|
||||
"Add Fitting",
|
||||
"S_Y",
|
||||
"Add a Fitting based on currently selected Elements and cursor",
|
||||
ui_context)
|
||||
if context.region.type != "TOOL_HEADER":
|
||||
cls.layout.operator("bim.mep_add_bend")
|
||||
cls.layout.operator("bim.mep_add_transition")
|
||||
@@ -699,26 +872,35 @@ class BimToolUI:
|
||||
cls.layout,
|
||||
"Edit Axis",
|
||||
"A_E",
|
||||
"",
|
||||
"Edit axis of Element",
|
||||
ui_context,
|
||||
)
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout,
|
||||
"Butt",
|
||||
"S_T",
|
||||
"",
|
||||
"Intersects two non-parallel Elements to a butt corner junction",
|
||||
ui_context,
|
||||
)
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout,
|
||||
"Mitre",
|
||||
"S_Y",
|
||||
"",
|
||||
"Intersects two non-parallel Elements to a mitred corner junction",
|
||||
ui_context,
|
||||
)
|
||||
add_layout_hotkey_operator(cls.layout, "Rotate 90", "S_R", bpy.ops.bim.rotate_90.__doc__, ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout, "Regen", "S_G", bpy.ops.bim.recalculate_profile.__doc__, ui_context
|
||||
cls.layout,
|
||||
"Rotate 90",
|
||||
"S_R",
|
||||
"Rotate the selected element by 90 degrees",
|
||||
ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout,
|
||||
"Regen",
|
||||
"S_G",
|
||||
"Regenerate selected element",
|
||||
ui_context
|
||||
)
|
||||
row.operator("bim.extend_profile", icon="X", text="").join_type = ""
|
||||
|
||||
@@ -744,15 +926,35 @@ class BimToolUI:
|
||||
row = cls.layout.row(align=True)
|
||||
row.prop(data=cls.props, property="rl1", text="RL")
|
||||
|
||||
add_layout_hotkey_operator(cls.layout, "Regen", "S_G", bpy.ops.bim.recalculate_fill.__doc__, ui_context)
|
||||
add_layout_hotkey_operator(cls.layout, "Flip", "S_F", "", ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout,
|
||||
"Regen",
|
||||
"S_G",
|
||||
"Regenerate selected Element",
|
||||
ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout,
|
||||
"Flip",
|
||||
"S_F",
|
||||
"Flip object about its local axes, keep the position",
|
||||
ui_context)
|
||||
|
||||
elif AuthoringData.data["active_representation_type"] == "SweptSolid":
|
||||
if not tool.Model.is_parametric_window_active() and not tool.Model.is_parametric_door_active():
|
||||
add_layout_hotkey_operator(cls.layout, "Edit Profile", "S_E", "", ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout,
|
||||
"Edit Profile",
|
||||
"S_E",
|
||||
"Edit assosiated Profile Element",
|
||||
ui_context)
|
||||
|
||||
elif AuthoringData.data["active_class"] in ("IfcSpace",):
|
||||
add_layout_hotkey_operator(cls.layout, "Regen", "S_G", bpy.ops.bim.generate_space.__doc__, ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout,
|
||||
"Regen",
|
||||
"S_G",
|
||||
"Regenerate selected Space",
|
||||
ui_context)
|
||||
|
||||
elif tool.Model.is_parametric_roof_active() and not context.active_object.BIMRoofProperties.is_editing_path:
|
||||
row = cls.layout.row(align=True)
|
||||
@@ -761,8 +963,11 @@ class BimToolUI:
|
||||
|
||||
if context.region.type != "TOOL_HEADER" and PortData.data["total_ports"] > 0:
|
||||
add_layout_hotkey_operator(
|
||||
cls.layout, "Regen MEP", "S_G", bpy.ops.bim.regenerate_distribution_element.__doc__, ui_context
|
||||
)
|
||||
cls.layout,
|
||||
"Regen MEP",
|
||||
"S_G",
|
||||
"Regenerates the positions and segment lengths of a distribution element and all connected elements",
|
||||
ui_context)
|
||||
cls.layout.operator("bim.mep_connect_elements")
|
||||
|
||||
row = cls.layout.row(align=True)
|
||||
@@ -787,23 +992,66 @@ class BimToolUI:
|
||||
row.operator("bim.clone_opening", text="Clone Opening")
|
||||
|
||||
row = cls.layout.row(align=True)
|
||||
add_layout_hotkey_operator(row, "Exterior", "S_X", "", ui_context)
|
||||
add_layout_hotkey_operator(row, "Centerline", "S_C", "", ui_context)
|
||||
add_layout_hotkey_operator(row, "Interior", "S_V", "", ui_context)
|
||||
add_layout_hotkey_operator(row, "Mirror", "S_M", bpy.ops.bim.mirror_elements.__doc__, ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
row,
|
||||
"Exterior",
|
||||
"S_X",
|
||||
"Align selected Elements to the Exterior of the last selected object",
|
||||
ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
row,
|
||||
"Centerline",
|
||||
"S_C",
|
||||
"Align selected Elements to the Centerline of the last selected object",
|
||||
ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
row,
|
||||
"Interior",
|
||||
"S_V",
|
||||
"Align selected Elements to the Interior of the last selected object",
|
||||
ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
row,
|
||||
"Mirror",
|
||||
"S_M",
|
||||
"Mirrors the selected Elements along a mirror plane set by the last selected object",
|
||||
ui_context)
|
||||
|
||||
row = cls.layout.row(align=True)
|
||||
add_layout_hotkey_operator(row, "Void", "A_O", "Toggle openings", ui_context)
|
||||
add_layout_hotkey_operator(row, "Decomposition", "A_D", "Select decomposition", ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
row,
|
||||
"Opening",
|
||||
"A_O",
|
||||
"Toggle display of Openings in the selected Elements",
|
||||
ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
row,
|
||||
"Decomposition",
|
||||
"A_D",
|
||||
"Select decomposition",
|
||||
ui_context)
|
||||
|
||||
row = cls.layout.row(align=True)
|
||||
add_layout_hotkey_operator(row, "Assign", "C_P", bpy.ops.bim.aggregate_assign_object.__doc__, ui_context)
|
||||
add_layout_hotkey_operator(row, "Unassign", "A_P", bpy.ops.bim.aggregate_unassign_object.__doc__, ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
row,
|
||||
"Assign",
|
||||
"C_P",
|
||||
"Assign element to Aggregation",
|
||||
ui_context)
|
||||
add_layout_hotkey_operator(
|
||||
row,
|
||||
"Unassign",
|
||||
"A_P",
|
||||
"Unassign element from Aggregation",
|
||||
ui_context)
|
||||
|
||||
row = cls.layout.row()
|
||||
add_layout_hotkey_operator(
|
||||
row, "Perform Quantity Take-off", "S_Q", bpy.ops.bim.perform_quantity_take_off.__doc__, ui_context
|
||||
)
|
||||
row,
|
||||
"Perform Quantity Take-off",
|
||||
"S_Q",
|
||||
"Perform a quantity take off on selected objects based of a QTO rule configuration",
|
||||
ui_context)
|
||||
|
||||
@classmethod
|
||||
def draw_container(cls, context):
|
||||
|
||||
@@ -30,10 +30,11 @@ from bonsai.bim.module.model.opening import FilledOpeningGenerator
|
||||
|
||||
class AddOpening(bpy.types.Operator, tool.Ifc.Operator):
|
||||
bl_idname = "bim.add_opening"
|
||||
bl_label = "Add Opening"
|
||||
bl_label = "Apply Opening"
|
||||
bl_options = {"REGISTER", "UNDO"}
|
||||
bl_description = (
|
||||
"Adds an opening to an element.\n" "Need to select two elements, order of selection is not important"
|
||||
"Apply an Opening object on an Element. "
|
||||
"The Element and the Opening to be applied should be selected. The order of selection is not important"
|
||||
)
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -879,7 +879,8 @@ def update_enum_property_search_prop(self, context):
|
||||
|
||||
class BIM_OT_enum_property_search(bpy.types.Operator):
|
||||
bl_idname = "bim.enum_property_search"
|
||||
bl_label = "Search For Property"
|
||||
bl_label = "Search"
|
||||
bl_description = "Search For Property"
|
||||
bl_options = {"REGISTER", "UNDO"}
|
||||
first_launch: bpy.props.BoolProperty(default=True, options={"SKIP_SAVE"})
|
||||
dummy_name: bpy.props.StringProperty(name="Property", update=update_enum_property_search_prop)
|
||||
|
||||
Reference in New Issue
Block a user