mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-13 19:07:57 +00:00
Fix Ifc modifier error after #3393064 because of legacy context.object
For some reason in the scene properties context.object returns None even if an object is active in the viewport, so ifc modifiers would randomly throw errors. AFAIK functionally they are supposed to point to the same thing, but active_object seems to be the superior one and context.object deprecated and kept for legacy reasons. Couldn't find dev quote but I'm sure I saw it at some point
This commit is contained in:
@@ -106,7 +106,7 @@ def update_geonodes_modifier():
|
||||
bm.edges.index_update()
|
||||
bm.faces.index_update()
|
||||
|
||||
if bpy.context.object.mode == "EDIT":
|
||||
if bpy.context.active_object.mode == "EDIT":
|
||||
bmesh.update_edit_mesh(obj.data)
|
||||
else:
|
||||
bm.to_mesh(obj.data)
|
||||
|
||||
Reference in New Issue
Block a user