Files
workinf_Blender_Wasm/web/tests/fixtures/node-graph-main-snapshots.py
mes123456 f3e21c6b98
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled
chore: checkpoint web Blender migration source, tools and docs
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>
2026-11-10 11:18:01 +08:00

20 lines
909 B
Python

import bpy
import json
import pathlib
import sys
arguments = sys.argv[sys.argv.index("--") + 1:]
destination = pathlib.Path(arguments[0])
tree = bpy.data.node_groups[arguments[1] if len(arguments) > 1 else "Web Authored Geometry"]
transform = next((node for node in tree.nodes if node.bl_idname == "GeometryNodeTransform"), None)
destination.write_text(json.dumps({
"name": tree.name,
"treeCount": len(bpy.data.node_groups),
"nodes": sorted(node.bl_idname for node in tree.nodes),
"links": len(tree.links),
"interfaceSockets": len([item for item in tree.interface.items_tree if item.item_type == "SOCKET"]),
"translation": list(transform.inputs["Translation"].default_value) if transform else None,
"owners": sorted(obj.name for obj in bpy.data.objects if any(
modifier.type == "NODES" and modifier.node_group == tree for modifier in obj.modifiers)),
}, indent=2) + "\n")