Clean-up add set stamps

This commit is contained in:
Christophe SEUX
2023-04-14 18:55:00 +02:00
parent c00041005f
commit 08885f8c59
7 changed files with 426 additions and 212 deletions
+13 -10
View File
@@ -22,10 +22,10 @@ from vse_toolbox import preferences
from vse_toolbox import properties
from vse_toolbox import operators
from vse_toolbox.constants import ASSET_PREVIEWS
from vse_toolbox.sequencer_utils import get_active_strip
from vse_toolbox.sequencer_utils import set_active_strip, update_text_strips
mods = (
modules = (
properties,
preferences,
operators,
@@ -34,8 +34,8 @@ mods = (
if 'bpy' in locals():
import importlib
for mod in mods:
importlib.reload(mod)
for module in modules:
importlib.reload(module)
import bpy
@@ -43,10 +43,11 @@ def register():
if bpy.app.background:
return
for mod in mods:
mod.register()
for module in modules:
module.register()
bpy.app.handlers.frame_change_post.append(get_active_strip)
bpy.app.handlers.frame_change_post.append(set_active_strip)
bpy.app.handlers.frame_change_post.append(update_text_strips)
def unregister():
@@ -60,9 +61,11 @@ def unregister():
if bpy.app.background:
return
bpy.app.handlers.frame_change_post.remove(get_active_strip)
for mod in reversed(mods):
mod.unregister()
bpy.app.handlers.frame_change_post.remove(set_active_strip)
bpy.app.handlers.frame_change_post.remove(set_active_strip)
for module in reversed(modules):
module.unregister()
if __name__ == "__main__":
register()