mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
See #5799. Fix segfault in upstream Blender when unlinking material objects in specific scenario.
I can't explain this one so I'm pretty embarrassed to commit this, but it crashes (see situation in #5799) on my machine and I can't recreate it outside this scenario. In any case I think as a general strategy we should: 1. Minimise reliance on msgbus 2. Msgbus listeners themselves should be wary of invalid state (e.g. if object is now unlinked) 3. Not clear listeners (don't overreach)
This commit is contained in:
@@ -404,9 +404,6 @@ 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]:
|
||||
|
||||
Reference in New Issue
Block a user