Scene Manager: fixes from the first run against a real Libreflow

- Update / version switch: Blender 5.2 replaces the library on reload
  (renamed after its file, custom properties gone); find it by path and
  restore its name and tags.
- Remove the libraries an asset linked indirectly when it is removed or
  fails to load (remove_unused_libraries), never a managed one.
- Config: real Kitsu asset types for link modes and Shot Viewer groups,
  setdress_low files for bg_location, "environments" collection fallback.
- Dev fake server and test use the real asset types; rock links a node
  group from the essentials to cover the indirect library cleanup.
- README and CLAUDE.md updated with the live findings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
NDemaerschalkandClaude Opus 5.5 committed 2026-10-27 11:30:46 +01:00
1 parent 017bdfc2fd
commit 9ee7710479
7 files changed
+109 -35

No files matched your search

+23 -5
View File
@@ -65,14 +65,32 @@ that contains this repo on `sys.path` and importing the repo folder name (see
properties when they resync, so instances are traced back to their library (empty →
`instance_collection.library`, override → `override_library.reference.library`).
- `library.reload()` invalidates every Python reference to linked and override data:
look IDs up again afterwards.
look IDs up again afterwards. In Blender 5.2 it also replaces the Library itself (renamed
after its file, custom properties gone): `library.update()` finds it by path and restores
the name and tags.
- Removing a library leaves the libraries it linked indirectly (e.g. Blender's
`geometry_nodes_essentials.blend`): `remove_unused_libraries()` drops the ones whose data
is no longer used, never a managed library.
- Background requests (`scene_manager.ipc.run`) hand results back through a timer;
in callbacks, find scenes by name (`bpy.context.scene` is not reliable in timers).
## Real Libreflow (first run, 2026-10-27)
- Kitsu asset types: `main_character`, `secondary_character`, `tertiary_character`,
`main_props`, `secondary_props`, `set_props`, `vehicles`, `bg_location`, `bg_set`,
`skies`, `setdress_bank`. The fake server uses the same names.
- Paths come back as Windows paths with backslashes; `comment` can be `null`.
- Set dressing publishes (`setdress_low`) hold a whole layout scene: the set is the
`environments` collection, next to `lights`, `cameras`, `characters`, `_unused`.
- Tested live: connection, context, casting, load (instance and override), version switch
and update, remove, assetize errors. Not tested: an actual assetize publish (it writes
to production).
## Open points
- First run of the Scene Manager against a real Libreflow (only tested with the fake
server): connection, casting, load, update, assetize, Windows paths.
- Asset type names assumed `chars` / `props` / `sets` (`SCENE_MANAGER_LINK_MODES`,
`SHOT_VIEWER_ASSET_TYPE_GROUPS`): confirm with Kitsu.
- Override vs instance per asset type (`SCENE_MANAGER_LINK_MODES`), and the file patterns
of sets (`setdress_low` seen on one asset only): confirm with production.
- The server picks the first file matching a pattern even when it is not on this site,
while another matching file is (e.g. `car_paul`: `modeling/modeling.blend` v001 not
available, `modeling/tes_modeling.blend` v002 available).
- Values marked TODO in `config.py` wait for production specs.