mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-11 22:31:55 +00:00
typing
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user