Continue Blender Web parity task handoff
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

This commit is contained in:
mes123456
2026-08-23 05:47:21 -04:00
parent 0a22992a13
commit 9f43244982
962 changed files with 60772 additions and 297 deletions

View File

@@ -0,0 +1,50 @@
#!/usr/bin/env python3
import pathlib
import sys
import bpy
ARMATURE_NAME = "WebGapArmatureCollectionUnsoloAllArmature"
OBJECT_NAME = "WebGapArmatureCollectionUnsoloAllObject"
FIRST_COLLECTION = "WebGapArmatureCollectionUnsoloAllFirst"
SOLO_COLLECTION = "WebGapArmatureCollectionUnsoloAllSolo"
LAST_COLLECTION = "WebGapArmatureCollectionUnsoloAllLast"
FIRST_BONE = "WebGapArmatureCollectionUnsoloAllFirstBone"
SOLO_BONE = "WebGapArmatureCollectionUnsoloAllSoloBone"
LAST_BONE = "WebGapArmatureCollectionUnsoloAllLastBone"
def main():
arguments = sys.argv[sys.argv.index("--") + 1 :]
if len(arguments) != 1:
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00232.py -- OUTPUT")
bpy.ops.wm.read_factory_settings(use_empty=True)
armature = bpy.data.armatures.new(ARMATURE_NAME)
obj = bpy.data.objects.new(OBJECT_NAME, armature)
bpy.context.scene.collection.objects.link(obj)
first = armature.collections.new(FIRST_COLLECTION)
solo = armature.collections.new(SOLO_COLLECTION)
last = armature.collections.new(LAST_COLLECTION)
bpy.context.view_layer.objects.active = obj
obj.select_set(True)
bpy.ops.object.mode_set(mode="EDIT")
edit_bones = {}
for name, x in ((FIRST_BONE, 0.0), (SOLO_BONE, 1.0), (LAST_BONE, 2.0)):
bone = armature.edit_bones.new(name)
bone.head = (x, 0.0, 0.0)
bone.tail = (x, 1.0, 0.0)
edit_bones[name] = bone
bpy.ops.object.mode_set(mode="OBJECT")
first.assign(armature.bones[FIRST_BONE])
solo.assign(armature.bones[SOLO_BONE])
last.assign(armature.bones[LAST_BONE])
solo.is_solo = True
armature.collections.active_index = 1
bpy.ops.wm.save_as_mainfile(
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
)
if __name__ == "__main__":
main()