mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-10 22:16:41 +00:00
spatial.assign_container - support batching #4474
This commit is contained in:
@@ -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())
|
||||
|
||||
@@ -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],
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user