mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 01:11:40 +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", "")],
|
||||
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}
|
||||
extrusion_depth: bpy.props.FloatProperty(min=0.001, default=42.0, subtype="DISTANCE")
|
||||
cardinal_point: bpy.props.EnumProperty(
|
||||
|
||||
@@ -240,8 +240,9 @@ class BIM_ADDON_preferences(bpy.types.AddonPreferences):
|
||||
|
||||
row = layout.row()
|
||||
row.prop(context.scene.BIMModelProperties, "occurrence_name_style")
|
||||
row = layout.row()
|
||||
row.prop(context.scene.BIMModelProperties, "occurrence_name_function")
|
||||
if context.scene.BIMModelProperties == "CUSTOM":
|
||||
row = layout.row()
|
||||
row.prop(context.scene.BIMModelProperties, "occurrence_name_function")
|
||||
|
||||
row = self.layout.row()
|
||||
row.prop(self, "decorations_colour")
|
||||
|
||||
Reference in New Issue
Block a user