mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-24 20:50:02 +00:00
Unlinking elements to clear Blender listeners
to prevent unnecessary callbacks
This commit is contained in:
@@ -383,6 +383,9 @@ class IfcStore:
|
|||||||
obj.BIMStyleProperties.ifc_definition_id = 0
|
obj.BIMStyleProperties.ifc_definition_id = 0
|
||||||
else: # bpy.types.Object
|
else: # bpy.types.Object
|
||||||
obj.BIMObjectProperties.ifc_definition_id = 0
|
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
|
@staticmethod
|
||||||
def execute_ifc_operator(operator: tool.Ifc.Operator, context: bpy.types.Context, is_invoke=False) -> set[str]:
|
def execute_ifc_operator(operator: tool.Ifc.Operator, context: bpy.types.Context, is_invoke=False) -> set[str]:
|
||||||
|
|||||||
Reference in New Issue
Block a user