[fix] scene variable to global
this prevents failure of access in case the scene is refreshed by blender
This commit is contained in:
parent
f41808adc3
commit
9276ad4fac
2 changed files with 9 additions and 9 deletions
|
@ -1652,15 +1652,12 @@ def on_depsgraph_update(scene, depsgraph):
|
|||
lock_depsgraph_updates()
|
||||
|
||||
def later():
|
||||
if (
|
||||
"lock_depsgraph_update_ntimes" not in scene.abc3d_data
|
||||
or scene.abc3d_data["lock_depsgraph_update_ntimes"] <= 0
|
||||
):
|
||||
if butils.lock_depsgraph_update_n_times <= 0:
|
||||
butils.set_text_on_curve(
|
||||
scene.abc3d_data.available_texts[linked_textobject]
|
||||
)
|
||||
elif scene.abc3d_data["lock_depsgraph_update_ntimes"] > 0:
|
||||
scene.abc3d_data["lock_depsgraph_update_ntimes"] -= 1
|
||||
elif butils.lock_depsgraph_update_n_times <= 0:
|
||||
butils.lock_depsgraph_update_n_times -= 1
|
||||
|
||||
butils.run_in_main_thread(later)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue