mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
Decomposed elements collected via get_decomposition may not have a
corresponding Blender object if they are not loaded into the scene.
Guard against None before calling collector.assign.
Regression introduced in ff35666ad.
Generated with the assistance of an AI coding tool.
This commit is contained in:
@@ -67,7 +67,8 @@ def assign_container(
|
||||
if products := [e for e in root_elements if spatial.can_contain(container, root_element)]:
|
||||
ifc.run("spatial.assign_container", products=products, relating_structure=container)
|
||||
for element in all_elements:
|
||||
collector.assign(ifc.get_object(element))
|
||||
if obj := ifc.get_object(element):
|
||||
collector.assign(obj)
|
||||
|
||||
|
||||
def enable_editing_container(spatial: type[tool.Spatial], obj: bpy.types.Object) -> None:
|
||||
|
||||
Reference in New Issue
Block a user