Accumulated uncommitted work: GHOST Web backend, WebGL/GPU web layer, web workflow engine and protocol, tooling, docs and task records. Large generated evidence, user-testing archives, build snapshots and imported test assets remain untracked. Co-Authored-By: Claude Code <noreply@anthropic.com>
38 lines
1.3 KiB
Python
38 lines
1.3 KiB
Python
"""Read canonical object/scene Main state from Chromium-saved blend artifacts."""
|
|
import json
|
|
import pathlib
|
|
import sys
|
|
|
|
import bpy
|
|
|
|
|
|
directory = pathlib.Path(sys.argv[sys.argv.index("--") + 1])
|
|
snapshots = {}
|
|
for blend in sorted(directory.glob("*.blend")):
|
|
bpy.ops.wm.open_mainfile(filepath=str(blend), load_ui=False)
|
|
# Names bind ID references without serializing process-specific addresses.
|
|
snapshots[blend.stem] = {
|
|
"objects": [
|
|
{
|
|
"name": obj.name,
|
|
"type": obj.type,
|
|
"data": obj.data.name if obj.data else None,
|
|
"parent": obj.parent.name if obj.parent else None,
|
|
"matrix": [list(row) for row in obj.matrix_world],
|
|
"collections": sorted(collection.name for collection in obj.users_collection),
|
|
}
|
|
for obj in sorted(bpy.data.objects, key=lambda item: item.name)
|
|
],
|
|
"scenes": [
|
|
{
|
|
"name": scene.name,
|
|
"frame": scene.frame_current,
|
|
"objects": sorted(obj.name for obj in scene.objects),
|
|
}
|
|
for scene in sorted(bpy.data.scenes, key=lambda item: item.name)
|
|
],
|
|
}
|
|
(directory / "native-main-snapshots.json").write_text(
|
|
json.dumps(snapshots, sort_keys=True, separators=(",", ":")), encoding="utf-8"
|
|
)
|