Probably have met this issue before - https://i.imgur.com/EOCSGg2.png
It occurred when you would remove e.g. IfcBuildingStorey's (or other aggregate's) collection from outliner. Deletion operator removes objects first and removing aggregate's main object is automatically removing it's collection. Then it would start removing collections and will break meeting an invalid collection.
Most of the times it was scary but harmless since all collections are probably removed either way but it's critical for batch removal as it would be never finished, possibly leaving unlinked ifc data (e.g. representations and it's items) that's not removed completely until batch removal is finalized.
Traceback:
Error: Python: Traceback (most recent call last):
File "\blenderbim\bim\ifc.py", line 360, in execute_ifc_operator
result = getattr(operator, "_execute")(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\blenderbim\bim\module\geometry\operator.py", line 720, in _execute
bpy.data.collections.remove(collection)
ReferenceError: StructRNA of type Collection has been removed
Issue occurred when cost item would have no quantities but had controlled objects with quantities.
1) just added a check to ensure that cost_item.CostQuantities are present
2) removed possible None return value in get_cost_item_quantity as it actually will break process_cost_data and it's never used anywhere else
3) has_changed_name was unused
4) fix possible similar issue in cost.data (though _get_object_quantities method is unused)
Base qtos shouldn't be too special, it should be based off a calculation mapping. This means we can also support IFC2X3 better (which has no base qtos)
1) e.g. in ifc4x3 previously for IfcWall it would prioritize Qto_BodyGeometryValidation over Qto_WallBaseQuantities
2) It would also prioritize general Qto_BodyGeometryValidation over Qto_BuildingElementProxyQuantities.
3) removed "Qto_" check as we do qto_only in get_applicable_names
This is a more flexible, non-Blender approach to doing QTO which allows:
- Doing QTO without Blender
- Doing QTO using query filters
- Using config files for QTOs
- Choosing your calculation engine, either built-in or creating your own
Example - https://imgur.com/a/kIiqk3R
Now you can drag'n'drop files to Blender and they will get loaded as projects (currently there is no safe check whether current project is saved) or you can hold ALT while drag'n'dropping and link single or multiple IFC files.
Actually, it's possible to set it up that way so multiple files won't need ALT modifier (as we can't load multiple projects, only link them) but I've kept ALT modifier for that case too to avoid confusing situations.
Blender 4.1+ only as there wasn't bpy.types.FileHandler before.
The default is now everything is saved which should be 90% of the usecase. If you want to discard changes, there is now a button in the top right next to the IFC mode.