This commit is contained in:
Andrej730
2024-10-28 11:23:35 +05:00
parent 86d0139f41
commit bdbe91f043
6 changed files with 25 additions and 21 deletions
+3 -2
View File
@@ -185,8 +185,8 @@ class IFC_Sv_write_file(bpy.types.Operator):
def poll(cls, context):
return any("IFC" in n for n in context.space_data.edit_tree.nodes.keys())
def ensure_hirarchy(self, file):
elements_in_buildings = set()
def ensure_hirarchy(self, file: ifcopenshell.file) -> None:
elements_in_buildings: set[ifcopenshell.entity_instance] = set()
if len(file.by_type("IfcBuilding")) == 0:
my_building = ifcopenshell.api.run("root.create_entity", file, ifc_class="IfcBuilding", name="My Building")
elements = ifcopenshell.util.element.get_decomposition(my_building)
@@ -269,6 +269,7 @@ class IFC_PT_write_file_panel(bpy.types.Panel):
def poll(cls, context):
if context.space_data.edit_tree and any("IFC" in n for n in context.space_data.edit_tree.nodes.keys()):
return True
return False
def draw(self, context):
ng = context.space_data.node_tree