@@ -2265,7 +2265,6 @@ def execute(self, context):
22652265 project .collection .children .link (aggregates )
22662266 for aggregate_collection in [c for c in project .children if "Aggregates" in c .name ]:
22672267 aggregate_collection .collection .children .link (aggregate )
2268- aggregate_collection .children [aggregate .name ].hide_viewport = True
22692268 break
22702269 break
22712270 for obj in bpy .context .selected_objects :
@@ -2296,9 +2295,7 @@ def execute(self, context):
22962295 bpy .context .view_layer .objects [obj .name ].hide_viewport = True
22972296 for project in [c for c in bpy .context .view_layer .layer_collection .children if "IfcProject" in c .name ]:
22982297 for aggregate_collection in [c for c in project .children if "Aggregates" in c .name ]:
2299- for aggregate in [c for c in aggregate_collection .children if c .name == obj .instance_collection .name ]:
2300- aggregate .hide_viewport = False
2301- break
2298+ aggregate_collection .hide_viewport = False
23022299 return {"FINISHED" }
23032300
23042301
@@ -2312,8 +2309,8 @@ def execute(self, context):
23122309 names = [c .name for c in obj .users_collection ]
23132310 for project in [c for c in bpy .context .view_layer .layer_collection .children if "IfcProject" in c .name ]:
23142311 for aggregate_collection in [c for c in project .children if "Aggregates" in c .name ]:
2312+ aggregate_collection .hide_viewport = True
23152313 for collection in [c for c in aggregate_collection .children if c .name in names ]:
2316- collection .hide_viewport = True
23172314 aggregate = collection .collection
23182315 break
23192316 if not aggregate :
0 commit comments