fix: enforce complete building and offline viewer gates
This commit is contained in:
@@ -914,9 +914,12 @@ def main() -> int:
|
||||
|
||||
blend_path = out_dir / f"{args.name}.blend"
|
||||
glb_path = out_dir / f"{args.name}.glb"
|
||||
raw_glb_path = out_dir / f"{args.name}.raw.glb"
|
||||
png_path = out_dir / f"{args.name}.png"
|
||||
metadata_path = out_dir / "model_metadata.json"
|
||||
bpy.ops.wm.save_as_mainfile(filepath=str(blend_path))
|
||||
# Retain a decoder-free GLB for the self-contained r147 offline viewer.
|
||||
bpy.ops.export_scene.gltf(filepath=str(raw_glb_path), export_format="GLB")
|
||||
# Draco compression keeps the Web GLB lightweight (typically -85~92% size).
|
||||
# The Web template registers a DRACOLoader to decode it; keep both in sync.
|
||||
bpy.ops.export_scene.gltf(
|
||||
@@ -939,6 +942,7 @@ def main() -> int:
|
||||
{
|
||||
"blend": str(blend_path),
|
||||
"glb": str(glb_path),
|
||||
"raw_glb": str(raw_glb_path),
|
||||
"png": str(png_path),
|
||||
"metadata": str(metadata_path),
|
||||
"objects": len(bpy.data.objects),
|
||||
|
||||
Reference in New Issue
Block a user