spatial.assign_container - support batching #4474

This commit is contained in:
Andrej730
2024-04-05 14:57:11 +05:00
parent 78abca16e6
commit 109787d869
32 changed files with 157 additions and 119 deletions
+4 -1
View File
@@ -190,7 +190,10 @@ class IFC_Sv_write_file(bpy.types.Operator):
for element in elements:
if element not in elements_in_buildings:
ifcopenshell.api.run(
"spatial.assign_container", file, product=element, relating_structure=file.by_type("IfcBuilding")[0]
"spatial.assign_container",
file,
products=[element],
relating_structure=file.by_type("IfcBuilding")[0],
)
for building in file.by_type("IfcBuilding"):
@@ -142,7 +142,7 @@ class SvIfcAddSpatialElement(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.h
ifcopenshell.api.run(
"spatial.assign_container",
self.file,
product=items,
products=[items],
relating_structure=result,
)
SvIfcStore.id_map.setdefault(self.node_id, []).append(result.id())
@@ -195,7 +195,7 @@ class SvIfcAddSpatialElement(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.h
ifcopenshell.api.run(
"spatial.assign_container",
self.file,
product=added_element,
products=[added_element],
relating_structure=result,
)
spatial_ids.append(result.id())
+1 -1
View File
@@ -108,7 +108,7 @@ class SvIfcWriteFile(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.Sv
ifcopenshell.api.run(
"spatial.assign_container",
file,
product=element,
products=[element],
relating_structure=file.by_type("IfcBuilding")[0],
)