Files
wtd-libreflow-addon/__init__.py
T
Nero Frame 13andClaude Opus 5.5 1a1767c984 Added Rename and Shot Viewer tools
Rename panel: batch rename selected objects (or their materials) as
prefix_name_side_number_suffix. Numbering continues after existing names,
object data follows its object, and a preview shows the result.

Shot Viewer (button in the Tools panel): opens a window with its own
workspace showing the shots (sequencer scene strips) through their camera,
with the edit's sequencer at the bottom. Scrubbing the edit switches shots,
playing a shot moves the edit playhead, Loop Shot loops playback on the
shot. Shots can be added and deleted, and character / prop rigs selected
in pose mode from the sidebar.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 14:30:00 +02:00

86 lines
2.2 KiB
Python

import sys
# Reload support: drop our cached submodules so "Reload Scripts" and
# disable/enable pick up edits in every file, not only this one.
for _name in [name for name in sys.modules if name.startswith(__name__ + ".")]:
del sys.modules[_name]
import bpy # noqa: E402
from bpy.app.handlers import persistent # noqa: E402
from . import checks, core, rename, shot_viewer, tools_ops, ui # noqa: E402
from .core import runner # noqa: E402
api = core
# Old bl_info to be able to develop on live code
bl_info = {
"name": "Melvile Tools",
"author": "Walking The Dog (WTD)",
"version": (0, 1, 0),
"blender": (5, 2, 0),
"description": "Tools for the Melvile Pipeline",
"location": "",
"warning": "",
"wiki_url": "",
"tracker_url": "",
"category": [],
}
@persistent
def _on_load_post(*_args):
runner.clear()
def _load_config_override():
prefs = ui.properties.get_prefs()
ui.properties.load_config_override(prefs.config_path if prefs else "")
# Register modules
def register() -> None:
# Register tool operators
tools_ops.register()
# Register the rename tool (settings and operator, before its panel)
rename.register()
# Register the shot viewer (settings and operators, before its panel)
shot_viewer.register()
# Load all the sanity checks into the sanity REGISTRY
checks.load_all()
# Register the UI for all panels
ui.register()
# Load the configuration for sanity checks
_load_config_override()
# Load it natively
bpy.app.handlers.load_post.append(_on_load_post)
# Unregister modules
def unregister() -> None:
# Unregister tool operators
tools_ops.unregister()
# Destroy the post loader
if _on_load_post in bpy.app.handlers.load_post:
bpy.app.handlers.load_post.remove(_on_load_post)
# Unregister all panels
ui.unregister()
# Unregister the rename tool (after its panel)
rename.unregister()
# Unregister the shot viewer (after its panel)
shot_viewer.unregister()
runner.clear()
# The check registry is plain Python and is rebuilt with the modules on
# re-import, so it is kept as is (enable/disable without re-import).