Files
workinf_Blender_Wasm/tools/web/native_startup_resources.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

14 lines
612 B
Python

"""Relocate temporary resource paths in an isolated copy of a saved startup Main."""
from pathlib import Path
import sys
import bpy
sys.path.insert(0,str(Path(__file__).resolve().parent))
from native_resources import portable_resource_paths
startup,workspace,destination=map(Path,sys.argv[sys.argv.index('--')+1:])
bpy.ops.wm.open_mainfile(filepath=str(startup),load_ui=True,use_scripts=False)
portable_resource_paths(workspace,destination)
state=bpy.ops.wm.save_as_mainfile(filepath=str(startup),copy=True,relative_remap=False)
if 'FINISHED' not in state:raise RuntimeError('STARTUP_RESOURCE_REWRITE_FAILED')