Reorganize Blender Web execution around capabilities
Some checks are pending
M6 deployable RC / quick (push) Waiting to run
M6 deployable RC / chromium (push) Blocked by required conditions
M6 deployable RC / release (push) Blocked by required conditions

This commit is contained in:
mes123456
2026-08-24 18:37:46 -04:00
parent 0b2c3ba0dd
commit a081c68c87
2530 changed files with 763976 additions and 79 deletions

View File

@@ -0,0 +1,36 @@
#!/usr/bin/env python3
import pathlib
import sys
import bpy
OBJECT_NAME = "WebGapAssetMarkObject"
MESH_NAME = "WebGapAssetMarkMesh"
def main():
arguments = sys.argv[sys.argv.index("--") + 1 :]
if len(arguments) != 1:
raise SystemExit(
"usage: blender -b --factory-startup --python M16-GAP-00279.py -- OUTPUT"
)
output = pathlib.Path(arguments[0]).resolve()
bpy.ops.wm.read_factory_settings(use_empty=True)
mesh = bpy.data.meshes.new(MESH_NAME)
mesh.from_pydata(((-1.0, 0.0, 0.0), (1.0, 0.0, 0.0), (0.0, 1.0, 0.0)), (), ((0, 1, 2),))
obj = bpy.data.objects.new(OBJECT_NAME, mesh)
bpy.context.scene.collection.objects.link(obj)
# Background mode has no editor ID context for the operator. Seed the persisted asset record
# with the same data API used by Blender's asset system.
obj.asset_mark()
obj.asset_data.author = "M16 Fixture"
obj.asset_data.description = "Asset mark operator fixture"
obj.asset_data.tags.new("operator-mark")
bpy.ops.wm.save_as_mainfile(filepath=str(output), check_existing=False, compress=True)
if __name__ == "__main__":
main()