Fix bug where auto assignment in the collection hierarchy failed if you had filtered out aggregates and you were assigning a subelement of an aggregate

This commit is contained in:
Dion Moult
2021-10-20 19:56:46 +11:00
parent 503f0399ff
commit 575de12d79
2 changed files with 45 additions and 3 deletions
+4 -3
View File
@@ -82,9 +82,10 @@ class Collector(blenderbim.core.tool.Collector):
aggregate = ifcopenshell.util.element.get_aggregate(element)
if aggregate:
aggregate_obj = tool.Ifc.get_object(aggregate)
collection = bpy.data.collections.get(aggregate_obj.name)
if collection:
return collection
if aggregate_obj:
collection = bpy.data.collections.get(aggregate_obj.name)
if collection:
return collection
container = ifcopenshell.util.element.get_container(element)
if container: