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:
Gorgious56
2023-07-17 14:48:01 +02:00
parent 79e67c3f12
commit 7aab0ccfd7
12 changed files with 41 additions and 41 deletions
@@ -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)