mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
show occurrence name function in prefs only for custom name style
This commit is contained in:
@@ -99,7 +99,10 @@ class BIMModelProperties(PropertyGroup):
|
|||||||
items=[("CLASS", "By Class", ""), ("TYPE", "By Type", ""), ("CUSTOM", "Custom", "")],
|
items=[("CLASS", "By Class", ""), ("TYPE", "By Type", ""), ("CUSTOM", "Custom", "")],
|
||||||
name="Occurrence Name Style",
|
name="Occurrence Name Style",
|
||||||
)
|
)
|
||||||
occurrence_name_function: bpy.props.StringProperty(name="Occurrence Name Function")
|
occurrence_name_function: bpy.props.StringProperty(
|
||||||
|
name="Occurrence Name Function",
|
||||||
|
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}
|
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(min=0.001, default=42.0, subtype="DISTANCE")
|
||||||
cardinal_point: bpy.props.EnumProperty(
|
cardinal_point: bpy.props.EnumProperty(
|
||||||
|
|||||||
@@ -240,8 +240,9 @@ class BIM_ADDON_preferences(bpy.types.AddonPreferences):
|
|||||||
|
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
row.prop(context.scene.BIMModelProperties, "occurrence_name_style")
|
row.prop(context.scene.BIMModelProperties, "occurrence_name_style")
|
||||||
row = layout.row()
|
if context.scene.BIMModelProperties == "CUSTOM":
|
||||||
row.prop(context.scene.BIMModelProperties, "occurrence_name_function")
|
row = layout.row()
|
||||||
|
row.prop(context.scene.BIMModelProperties, "occurrence_name_function")
|
||||||
|
|
||||||
row = self.layout.row()
|
row = self.layout.row()
|
||||||
row.prop(self, "decorations_colour")
|
row.prop(self, "decorations_colour")
|
||||||
|
|||||||
Reference in New Issue
Block a user