Live patch refactor

This commit is contained in:
2026-07-18 19:49:25 -07:00
parent 1239145da4
commit 50ad462318
2 changed files with 63 additions and 3 deletions

View File

@ -68,9 +68,10 @@ def on_depsgraph_update_post(self):
# Send last operator to Krom
wrd = bpy.data.worlds['Lnx']
if state.proc_play is not None and state.target == 'krom' and wrd.lnx_live_patch:
ops = bpy.context.window_manager.operators
if len(ops) > 0 and ops[-1] is not None:
live_patch.on_operator(ops[-1].bl_idname)
if not live_patch.on_depsgraph_update(depsgraph.updates):
ops = bpy.context.window_manager.operators
if len(ops) > 0 and ops[-1] is not None:
live_patch.on_operator(ops[-1].bl_idname)
# Hacky solution to update leenkx props after operator executions.
# bpy.context.active_operator doesn't always exist, in some cases