Unlinking elements to clear Blender listeners

to prevent unnecessary callbacks
This commit is contained in:
Andrej730
2024-10-23 14:19:59 +05:00
parent db0a72c794
commit 86edd52894
+3
View File
@@ -383,6 +383,9 @@ class IfcStore:
obj.BIMStyleProperties.ifc_definition_id = 0
else: # bpy.types.Object
obj.BIMObjectProperties.ifc_definition_id = 0
# NOTE: in theory this will also remove listeners added by other addons
# though never had a report when this would be a problem.
bpy.msgbus.clear_by_owner(obj)
@staticmethod
def execute_ifc_operator(operator: tool.Ifc.Operator, context: bpy.types.Context, is_invoke=False) -> set[str]: