mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-28 15:53:00 +00:00
New UI to show inherited materials from related types
This commit is contained in:
@@ -494,7 +494,7 @@ def getMaterialTypes(self, context):
|
|||||||
global materialtypes_enum
|
global materialtypes_enum
|
||||||
materialtypes_enum.clear()
|
materialtypes_enum.clear()
|
||||||
materialtypes_enum = [
|
materialtypes_enum = [
|
||||||
(m, m, "") for m in ["IfcMaterial", "IfcMaterialConstituentSet", "IfcMaterialLayerSet", "IfcMaterialProfileSet"]
|
(m, m, "") for m in ["None", "IfcMaterial", "IfcMaterialConstituentSet", "IfcMaterialLayerSet", "IfcMaterialProfileSet"]
|
||||||
]
|
]
|
||||||
return materialtypes_enum
|
return materialtypes_enum
|
||||||
|
|
||||||
@@ -1646,7 +1646,7 @@ class IfcParameter(PropertyGroup):
|
|||||||
class PsetQto(PropertyGroup):
|
class PsetQto(PropertyGroup):
|
||||||
name: StringProperty(name="Name")
|
name: StringProperty(name="Name")
|
||||||
properties: CollectionProperty(name="Properties", type=Attribute)
|
properties: CollectionProperty(name="Properties", type=Attribute)
|
||||||
is_expanded: BoolProperty(name="Is Expanded")
|
is_expanded: BoolProperty(name="Is Expanded", default=True)
|
||||||
is_editable: BoolProperty(name="Is Editable")
|
is_editable: BoolProperty(name="Is Editable")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -122,7 +122,18 @@ class BIM_PT_object_material(Panel):
|
|||||||
row = layout.row()
|
row = layout.row()
|
||||||
row.prop(props, "material_type")
|
row.prop(props, "material_type")
|
||||||
|
|
||||||
if props.material_type == "IfcMaterial":
|
if props.material_type == "None" and props.relating_type:
|
||||||
|
props = props.relating_type.BIMObjectProperties
|
||||||
|
if props.material_type == "None":
|
||||||
|
pass
|
||||||
|
elif props.material_type == "IfcMaterial" and props.material:
|
||||||
|
layout.label(text="Inherited Material:")
|
||||||
|
elif props.material_set:
|
||||||
|
layout.label(text="Inherited Material Set:")
|
||||||
|
|
||||||
|
if props.material_type == "None":
|
||||||
|
pass
|
||||||
|
elif props.material_type == "IfcMaterial":
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
row.prop(props, "material")
|
row.prop(props, "material")
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user