# SPDX-License-Identifier: GPL-2.0-or-later bl_info = { "name": "VSE ToolBox", "description": "In-House Video editing Tools", "author": "Samuel Bernou, Clement Ducarteron, Christophe Seux", "version": (0, 1, 0), "blender": (3, 4, 1), "location": "Sequencer", "warning": "", "category": "Sequencer", } # "doc_url": "https://github.com/Pullusb/REPONAME", # "tracker_url": "https://github.com/Pullusb/REPONAME/issues", import sys from pathlib import Path #sys.modules['vse_toolbox'] = sys.modules.pop(Path(__file__).parent.name) from vse_toolbox import ui from vse_toolbox import operators from vse_toolbox.constants import ASSET_PREVIEWS from vse_toolbox.sequencer_utils import set_active_strip, update_text_strips modules = ( operators, ui, ) if 'bpy' in locals(): import importlib for mod in modules: importlib.reload(mod) import bpy def register(): if bpy.app.background: return for module in modules: module.register() bpy.app.handlers.frame_change_post.append(set_active_strip) bpy.app.handlers.frame_change_post.append(update_text_strips) def unregister(): try: bpy.utils.previews.remove(ASSET_PREVIEWS) except Exception as e: pass # print(f"!-- {e} --!") # print(f"No preview collection found. {ASSET_PREVIEWS} can't be remove.") if bpy.app.background: return bpy.app.handlers.frame_change_post.remove(set_active_strip) bpy.app.handlers.frame_change_post.remove(update_text_strips) for module in reversed(modules): module.unregister() if __name__ == "__main__": register()