Created
March 11, 2019 13:27
-
-
Save zeffii/7966e8a9c70de78007deafee654beca2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@persistent | |
def sv_update_handler(scene): | |
""" | |
Update sverchok node groups on frame change events. | |
""" | |
if not has_frame_changed(scene): | |
return | |
for ng in sverchok_trees(): | |
try: | |
# print('sv_update_handler') | |
ng.process_ani() | |
except Exception as e: | |
print('Failed to update:', str(e)) #name, | |
# something like this | |
if sverchok.settings.dont_loop_animation: | |
if scene.last_frame == scene.frame_current: | |
bpy.ops.screen.animation_cancel() # restore_frame=True) | |
return | |
scene.update() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment