mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-12 22:43:41 +00:00
You can now import profile definitions from a library
This commit is contained in:
@@ -172,7 +172,7 @@ class RefreshLibrary(bpy.types.Operator):
|
||||
self.props.active_library_element = ""
|
||||
|
||||
types = IfcStore.library_file.wrapped_data.types_with_super()
|
||||
for importable_type in ["IfcTypeProduct", "IfcMaterial", "IfcCostSchedule"]:
|
||||
for importable_type in ["IfcTypeProduct", "IfcMaterial", "IfcCostSchedule", "IfcProfileDef"]:
|
||||
if importable_type in types:
|
||||
new = self.props.library_elements.add()
|
||||
new.name = importable_type
|
||||
@@ -198,7 +198,10 @@ class ChangeLibraryElement(bpy.types.Operator):
|
||||
if len(ifc_classes) == 1 and list(ifc_classes)[0] == self.element_name:
|
||||
for element in elements:
|
||||
new = self.props.library_elements.add()
|
||||
new.name = element.Name or "Unnamed"
|
||||
if element.is_a("IfcProfileDef"):
|
||||
new.name = element.ProfileName or "Unnamed"
|
||||
else:
|
||||
new.name = element.Name or "Unnamed"
|
||||
new.ifc_definition_id = element.id()
|
||||
if IfcStore.library_file.schema == "IFC2X3" or not IfcStore.library_file.by_type("IfcProjectLibrary"):
|
||||
new.is_declared = False
|
||||
|
||||
Reference in New Issue
Block a user