Fix #3349. Allow inserting a filling into an uncontained building element.

This commit is contained in:
Dion Moult
2023-07-06 13:40:10 +10:00
parent 7100a7fa8e
commit f9173700a6
@@ -154,6 +154,7 @@ class AddConstrTypeInstance(bpy.types.Operator):
) )
else: else:
parent = ifcopenshell.util.element.get_container(building_element) parent = ifcopenshell.util.element.get_container(building_element)
if parent:
parent_obj = tool.Ifc.get_object(parent) parent_obj = tool.Ifc.get_object(parent)
blenderbim.core.spatial.assign_container( blenderbim.core.spatial.assign_container(
tool.Ifc, tool.Collector, tool.Spatial, structure_obj=parent_obj, element_obj=obj tool.Ifc, tool.Collector, tool.Spatial, structure_obj=parent_obj, element_obj=obj