Files
workinf_Blender_Wasm/tools/web/generate-wbv2-move-fixture.py
mes123456 7549b9a15c
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
feat(web): switch to implementation-first capability wave
2026-08-29 01:22:03 +08:00

17 lines
657 B
Python

import bpy
bpy.ops.wm.read_factory_settings(use_empty=True)
scene = bpy.context.scene
root = scene.collection
source = bpy.data.collections.new("SourceCollection")
target = bpy.data.collections.new("MoveTargetCollection")
root.children.link(source)
root.children.link(target)
bpy.ops.mesh.primitive_cube_add(location=(1.0, 2.0, 3.0))
obj = bpy.context.object
for collection in list(obj.users_collection):
collection.objects.unlink(obj)
source.objects.link(obj)
obj.name = "WBV2P2401Cube"
bpy.ops.wm.save_as_mainfile(filepath=bpy.context.scene.get("_wbv2_fixture_path", "tests/files/web/generated/WBV2-P24-001-OBJECT_OPERATIONS.MOVE_COLLECTION.blend"))