Release 0.1

This commit is contained in:
Stefan Cepko
2026-06-05 04:45:35 -04:00
parent b6d0eeffbb
commit 31e464f5cd
6 changed files with 289 additions and 54 deletions
+41
View File
@@ -0,0 +1,41 @@
import sys
import os
import bpy
# Get the directory of this script (workspace root) and append it to sys.path
dir_path = os.path.dirname(os.path.abspath(__file__))
if dir_path not in sys.path:
sys.path.append(dir_path)
# Try to register the pr3tz module
try:
# If the module was already imported, reload it to pick up changes
if "pr3tz" in sys.modules:
import importlib
import pr3tz
# Trigger reload inside pr3tz to refresh its submodules
importlib.reload(pr3tz)
else:
import pr3tz
# Unregister first to clean up any leftover handlers or UI components
try:
pr3tz.unregister()
except Exception:
pass
# Register the addon components
pr3tz.register()
# Run the initial scene setup (creates camera, light, and default playlist)
pr3tz.setup_scene()
# Generate the torus knot for the current frame immediately
pr3tz.knot_frame_handler(bpy.context.scene)
print("[Pr3tz] Registered and scene set up successfully!")
print("[Pr3tz] Scrub the timeline or press Space in the Viewport to animate.")
except Exception as e:
print(f"[Pr3tz] Failed to register: {e}")
import traceback
traceback.print_exc()