Continue Blender Web parity task handoff
This commit is contained in:
36
tools/web/generated/M16-GAP-00175.py
Normal file
36
tools/web/generated/M16-GAP-00175.py
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00175.py -- OUTPUT")
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
mesh = bpy.data.meshes.new("WebGapAnimDriverButtonEditMesh")
|
||||
mesh.from_pydata(
|
||||
[(-1.0, -1.0, 0.0), (1.0, -1.0, 0.0), (1.0, 1.0, 0.0), (-1.0, 1.0, 0.0)],
|
||||
[],
|
||||
[(0, 1, 2, 3)],
|
||||
)
|
||||
obj = bpy.data.objects.new("WebGapAnimDriverButtonEditObject", mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
obj["drive_target"] = 7.25
|
||||
driver = obj.driver_add('["drive_target"]')
|
||||
driver.driver.type = "SCRIPTED"
|
||||
driver.driver.expression = "frame * 2.5 + 1.25"
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.context.scene.frame_start = 1
|
||||
bpy.context.scene.frame_end = 5
|
||||
bpy.context.scene.frame_set(1)
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
36
tools/web/generated/M16-GAP-00176.py
Normal file
36
tools/web/generated/M16-GAP-00176.py
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00176.py -- OUTPUT")
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
mesh = bpy.data.meshes.new("WebGapAnimDriverButtonRemoveMesh")
|
||||
mesh.from_pydata(
|
||||
[(-1.0, -1.0, 0.0), (1.0, -1.0, 0.0), (1.0, 1.0, 0.0), (-1.0, 1.0, 0.0)],
|
||||
[],
|
||||
[(0, 1, 2, 3)],
|
||||
)
|
||||
obj = bpy.data.objects.new("WebGapAnimDriverButtonRemoveObject", mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
obj["drive_target"] = 7.25
|
||||
driver = obj.driver_add('["drive_target"]')
|
||||
driver.driver.type = "SCRIPTED"
|
||||
driver.driver.expression = "frame * 2.5 + 1.25"
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.context.scene.frame_start = 1
|
||||
bpy.context.scene.frame_end = 5
|
||||
bpy.context.scene.frame_set(1)
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
23
tools/web/generated/M16-GAP-00177.py
Normal file
23
tools/web/generated/M16-GAP-00177.py
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00177.py -- OUTPUT")
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
scene = bpy.context.scene
|
||||
scene.frame_start = 1
|
||||
scene.frame_end = 120
|
||||
scene.frame_set(42)
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
39
tools/web/generated/M16-GAP-00178.py
Normal file
39
tools/web/generated/M16-GAP-00178.py
Normal file
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00178.py -- OUTPUT")
|
||||
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
mesh = bpy.data.meshes.new("WebGapAnimKeyframeClearButtonMesh")
|
||||
mesh.from_pydata(
|
||||
[(-1.0, -1.0, 0.0), (1.0, -1.0, 0.0), (1.0, 1.0, 0.0), (-1.0, 1.0, 0.0)],
|
||||
[],
|
||||
[(0, 1, 2, 3)],
|
||||
)
|
||||
obj = bpy.data.objects.new("WebGapAnimKeyframeClearButtonObject", mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
obj["clear_target"] = 3.0
|
||||
for frame, value in ((1, 1.0), (3, 3.0), (5, 5.0)):
|
||||
bpy.context.scene.frame_set(frame)
|
||||
obj["clear_target"] = value
|
||||
obj.keyframe_insert(data_path='["clear_target"]', frame=frame)
|
||||
obj.animation_data.action.name = "WebGapAnimKeyframeClearButtonAction"
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.context.scene.frame_start = 1
|
||||
bpy.context.scene.frame_end = 5
|
||||
bpy.context.scene.frame_set(3)
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
39
tools/web/generated/M16-GAP-00179.py
Normal file
39
tools/web/generated/M16-GAP-00179.py
Normal file
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00179.py -- OUTPUT")
|
||||
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
mesh = bpy.data.meshes.new("WebGapAnimKeyframeClearV3DMesh")
|
||||
mesh.from_pydata(
|
||||
[(-1.0, -1.0, 0.0), (1.0, -1.0, 0.0), (1.0, 1.0, 0.0), (-1.0, 1.0, 0.0)],
|
||||
[],
|
||||
[(0, 1, 2, 3)],
|
||||
)
|
||||
obj = bpy.data.objects.new("WebGapAnimKeyframeClearV3DObject", mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
obj["clear_target"] = 3.0
|
||||
for frame, value in ((1, 1.0), (3, 3.0), (5, 5.0)):
|
||||
bpy.context.scene.frame_set(frame)
|
||||
obj["clear_target"] = value
|
||||
obj.keyframe_insert(data_path='["clear_target"]', frame=frame)
|
||||
obj.animation_data.action.name = "WebGapAnimKeyframeClearV3DAction"
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.context.scene.frame_start = 1
|
||||
bpy.context.scene.frame_end = 5
|
||||
bpy.context.scene.frame_set(3)
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
41
tools/web/generated/M16-GAP-00180.py
Normal file
41
tools/web/generated/M16-GAP-00180.py
Normal file
@@ -0,0 +1,41 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00180.py -- OUTPUT")
|
||||
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
scene = bpy.context.scene
|
||||
sequence_editor = scene.sequence_editor_create()
|
||||
source = pathlib.Path(__file__).resolve().parents[3] / "tests/files/web/media/sequencer-frame.png"
|
||||
strip = sequence_editor.strips.new_image(
|
||||
name="WebGapAnimKeyframeClearVSEStrip",
|
||||
filepath=str(source),
|
||||
channel=1,
|
||||
frame_start=1,
|
||||
)
|
||||
strip.directory = "//../media/"
|
||||
strip.frame_final_duration = 6
|
||||
strip.select = True
|
||||
sequence_editor.active_strip = strip
|
||||
for frame, value in ((1, 0.25), (3, 0.5), (5, 0.75)):
|
||||
scene.frame_set(frame)
|
||||
strip.blend_alpha = value
|
||||
strip.keyframe_insert(data_path="blend_alpha", frame=frame)
|
||||
scene.animation_data.action.name = "WebGapAnimKeyframeClearVSEAction"
|
||||
scene.frame_start = 1
|
||||
scene.frame_end = 6
|
||||
scene.frame_set(3)
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
49
tools/web/generated/M16-GAP-00181.py
Normal file
49
tools/web/generated/M16-GAP-00181.py
Normal file
@@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
OBJECT_NAME = "WebGapAnimKeyframeDeleteObject"
|
||||
ACTION_NAME = "WebGapAnimKeyframeDeleteAction"
|
||||
KEYING_SET_NAME = "WebGapAnimKeyframeDeleteSet"
|
||||
DATA_PATH = '["delete_target"]'
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00181.py -- OUTPUT")
|
||||
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
mesh = bpy.data.meshes.new("WebGapAnimKeyframeDeleteMesh")
|
||||
mesh.from_pydata(
|
||||
[(-1.0, -1.0, 0.0), (1.0, -1.0, 0.0), (1.0, 1.0, 0.0), (-1.0, 1.0, 0.0)],
|
||||
[],
|
||||
[(0, 1, 2, 3)],
|
||||
)
|
||||
obj = bpy.data.objects.new(OBJECT_NAME, mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
obj["delete_target"] = 3.0
|
||||
for frame, value in ((1, 1.0), (3, 3.0), (5, 5.0)):
|
||||
bpy.context.scene.frame_set(frame)
|
||||
obj["delete_target"] = value
|
||||
obj.keyframe_insert(data_path=DATA_PATH, frame=frame)
|
||||
obj.animation_data.action.name = ACTION_NAME
|
||||
|
||||
keying_set = bpy.context.scene.keying_sets.new(idname=KEYING_SET_NAME, name=KEYING_SET_NAME)
|
||||
keying_set.paths.add(obj, DATA_PATH, index=0)
|
||||
bpy.context.scene.keying_sets.active_index = 0
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.context.scene.frame_start = 1
|
||||
bpy.context.scene.frame_end = 5
|
||||
bpy.context.scene.frame_set(3)
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
39
tools/web/generated/M16-GAP-00182.py
Normal file
39
tools/web/generated/M16-GAP-00182.py
Normal file
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00182.py -- OUTPUT")
|
||||
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
mesh = bpy.data.meshes.new("WebGapAnimKeyframeDeleteButtonMesh")
|
||||
mesh.from_pydata(
|
||||
[(-1.0, -1.0, 0.0), (1.0, -1.0, 0.0), (1.0, 1.0, 0.0), (-1.0, 1.0, 0.0)],
|
||||
[],
|
||||
[(0, 1, 2, 3)],
|
||||
)
|
||||
obj = bpy.data.objects.new("WebGapAnimKeyframeDeleteButtonObject", mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
obj["delete_target"] = 3.0
|
||||
for frame, value in ((1, 1.0), (3, 3.0), (5, 5.0)):
|
||||
bpy.context.scene.frame_set(frame)
|
||||
obj["delete_target"] = value
|
||||
obj.keyframe_insert(data_path='["delete_target"]', frame=frame)
|
||||
obj.animation_data.action.name = "WebGapAnimKeyframeDeleteButtonAction"
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.context.scene.frame_start = 1
|
||||
bpy.context.scene.frame_end = 5
|
||||
bpy.context.scene.frame_set(3)
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
49
tools/web/generated/M16-GAP-00183.py
Normal file
49
tools/web/generated/M16-GAP-00183.py
Normal file
@@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
OBJECT_NAME = "WebGapAnimKeyframeDeleteByNameObject"
|
||||
ACTION_NAME = "WebGapAnimKeyframeDeleteByNameAction"
|
||||
KEYING_SET_NAME = "WebGapAnimKeyframeDeleteByNameSet"
|
||||
DATA_PATH = '["delete_target"]'
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00183.py -- OUTPUT")
|
||||
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
mesh = bpy.data.meshes.new("WebGapAnimKeyframeDeleteByNameMesh")
|
||||
mesh.from_pydata(
|
||||
[(-1.0, -1.0, 0.0), (1.0, -1.0, 0.0), (1.0, 1.0, 0.0), (-1.0, 1.0, 0.0)],
|
||||
[],
|
||||
[(0, 1, 2, 3)],
|
||||
)
|
||||
obj = bpy.data.objects.new(OBJECT_NAME, mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
obj["delete_target"] = 3.0
|
||||
for frame, value in ((1, 1.0), (3, 3.0), (5, 5.0)):
|
||||
bpy.context.scene.frame_set(frame)
|
||||
obj["delete_target"] = value
|
||||
obj.keyframe_insert(data_path=DATA_PATH, frame=frame)
|
||||
obj.animation_data.action.name = ACTION_NAME
|
||||
|
||||
keying_set = bpy.context.scene.keying_sets.new(idname=KEYING_SET_NAME, name=KEYING_SET_NAME)
|
||||
keying_set.paths.add(obj, DATA_PATH, index=0)
|
||||
bpy.context.scene.keying_sets.active_index = 0
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.context.scene.frame_start = 1
|
||||
bpy.context.scene.frame_end = 5
|
||||
bpy.context.scene.frame_set(3)
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
44
tools/web/generated/M16-GAP-00184.py
Normal file
44
tools/web/generated/M16-GAP-00184.py
Normal file
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
OBJECT_NAME = "WebGapAnimKeyframeDeleteV3DObject"
|
||||
ACTION_NAME = "WebGapAnimKeyframeDeleteV3DAction"
|
||||
DATA_PATH = '["delete_target"]'
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00184.py -- OUTPUT")
|
||||
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
mesh = bpy.data.meshes.new("WebGapAnimKeyframeDeleteV3DMesh")
|
||||
mesh.from_pydata(
|
||||
[(-1.0, -1.0, 0.0), (1.0, -1.0, 0.0), (1.0, 1.0, 0.0), (-1.0, 1.0, 0.0)],
|
||||
[],
|
||||
[(0, 1, 2, 3)],
|
||||
)
|
||||
obj = bpy.data.objects.new(OBJECT_NAME, mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
obj["delete_target"] = 3.0
|
||||
for frame, value in ((1, 1.0), (3, 3.0), (5, 5.0)):
|
||||
bpy.context.scene.frame_set(frame)
|
||||
obj["delete_target"] = value
|
||||
obj.keyframe_insert(data_path=DATA_PATH, frame=frame)
|
||||
obj.animation_data.action.name = ACTION_NAME
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.context.scene.frame_start = 1
|
||||
bpy.context.scene.frame_end = 5
|
||||
bpy.context.scene.frame_set(3)
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
45
tools/web/generated/M16-GAP-00185.py
Normal file
45
tools/web/generated/M16-GAP-00185.py
Normal file
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
STRIP_NAME = "WebGapAnimKeyframeDeleteVSEStrip"
|
||||
ACTION_NAME = "WebGapAnimKeyframeDeleteVSEAction"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00185.py -- OUTPUT")
|
||||
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
scene = bpy.context.scene
|
||||
sequence_editor = scene.sequence_editor_create()
|
||||
source = pathlib.Path(__file__).resolve().parents[3] / "tests/files/web/media/sequencer-frame.png"
|
||||
strip = sequence_editor.strips.new_image(
|
||||
name=STRIP_NAME,
|
||||
filepath=str(source),
|
||||
channel=1,
|
||||
frame_start=1,
|
||||
)
|
||||
strip.directory = "//../media/"
|
||||
strip.frame_final_duration = 6
|
||||
strip.select = True
|
||||
sequence_editor.active_strip = strip
|
||||
for frame, value in ((1, 0.25), (3, 0.5), (5, 0.75)):
|
||||
scene.frame_set(frame)
|
||||
strip.blend_alpha = value
|
||||
strip.keyframe_insert(data_path="blend_alpha", frame=frame)
|
||||
scene.animation_data.action.name = ACTION_NAME
|
||||
scene.frame_start = 1
|
||||
scene.frame_end = 6
|
||||
scene.frame_set(3)
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
50
tools/web/generated/M16-GAP-00186.py
Normal file
50
tools/web/generated/M16-GAP-00186.py
Normal file
@@ -0,0 +1,50 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
OBJECT_NAME = "WebGapAnimKeyframeInsertObject"
|
||||
ACTION_NAME = "WebGapAnimKeyframeInsertAction"
|
||||
KEYING_SET_NAME = "WebGapAnimKeyframeInsertSet"
|
||||
DATA_PATH = '["insert_target"]'
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00186.py -- OUTPUT")
|
||||
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
mesh = bpy.data.meshes.new("WebGapAnimKeyframeInsertMesh")
|
||||
mesh.from_pydata(
|
||||
[(-1.0, -1.0, 0.0), (1.0, -1.0, 0.0), (1.0, 1.0, 0.0), (-1.0, 1.0, 0.0)],
|
||||
[],
|
||||
[(0, 1, 2, 3)],
|
||||
)
|
||||
obj = bpy.data.objects.new(OBJECT_NAME, mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
obj["insert_target"] = 3.0
|
||||
for frame, value in ((1, 1.0), (5, 5.0)):
|
||||
bpy.context.scene.frame_set(frame)
|
||||
obj["insert_target"] = value
|
||||
obj.keyframe_insert(data_path=DATA_PATH, frame=frame)
|
||||
obj.animation_data.action.name = ACTION_NAME
|
||||
|
||||
keying_set = bpy.context.scene.keying_sets.new(idname=KEYING_SET_NAME, name=KEYING_SET_NAME)
|
||||
keying_set.paths.add(obj, DATA_PATH, index=0)
|
||||
bpy.context.scene.keying_sets.active_index = 0
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.context.scene.frame_start = 1
|
||||
bpy.context.scene.frame_end = 5
|
||||
bpy.context.scene.frame_set(3)
|
||||
obj["insert_target"] = 3.0
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
40
tools/web/generated/M16-GAP-00187.py
Normal file
40
tools/web/generated/M16-GAP-00187.py
Normal file
@@ -0,0 +1,40 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00187.py -- OUTPUT")
|
||||
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
mesh = bpy.data.meshes.new("WebGapAnimKeyframeInsertButtonMesh")
|
||||
mesh.from_pydata(
|
||||
[(-1.0, -1.0, 0.0), (1.0, -1.0, 0.0), (1.0, 1.0, 0.0), (-1.0, 1.0, 0.0)],
|
||||
[],
|
||||
[(0, 1, 2, 3)],
|
||||
)
|
||||
obj = bpy.data.objects.new("WebGapAnimKeyframeInsertButtonObject", mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
obj["insert_target"] = 3.0
|
||||
for frame, value in ((1, 1.0), (5, 5.0)):
|
||||
bpy.context.scene.frame_set(frame)
|
||||
obj["insert_target"] = value
|
||||
obj.keyframe_insert(data_path='["insert_target"]', frame=frame)
|
||||
obj.animation_data.action.name = "WebGapAnimKeyframeInsertButtonAction"
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.context.scene.frame_start = 1
|
||||
bpy.context.scene.frame_end = 5
|
||||
bpy.context.scene.frame_set(3)
|
||||
obj["insert_target"] = 3.0
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
47
tools/web/generated/M16-GAP-00188.py
Normal file
47
tools/web/generated/M16-GAP-00188.py
Normal file
@@ -0,0 +1,47 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
OBJECT_NAME = "WebGapAnimKeyframeInsertByNameObject"
|
||||
ACTION_NAME = "WebGapAnimKeyframeInsertByNameAction"
|
||||
KEYING_SET_NAME = "WebGapAnimKeyframeInsertByNameSet"
|
||||
DATA_PATH = '["insert_target"]'
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00188.py -- OUTPUT")
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
mesh = bpy.data.meshes.new("WebGapAnimKeyframeInsertByNameMesh")
|
||||
mesh.from_pydata(
|
||||
[(-1.0, -1.0, 0.0), (1.0, -1.0, 0.0), (1.0, 1.0, 0.0), (-1.0, 1.0, 0.0)],
|
||||
[], [(0, 1, 2, 3)],
|
||||
)
|
||||
obj = bpy.data.objects.new(OBJECT_NAME, mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
obj["insert_target"] = 3.0
|
||||
for frame, value in ((1, 1.0), (5, 5.0)):
|
||||
bpy.context.scene.frame_set(frame)
|
||||
obj["insert_target"] = value
|
||||
obj.keyframe_insert(data_path=DATA_PATH, frame=frame)
|
||||
obj.animation_data.action.name = ACTION_NAME
|
||||
keying_set = bpy.context.scene.keying_sets.new(idname=KEYING_SET_NAME, name=KEYING_SET_NAME)
|
||||
keying_set.paths.add(obj, DATA_PATH, index=0)
|
||||
bpy.context.scene.keying_sets.active_index = 0
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.context.scene.frame_start = 1
|
||||
bpy.context.scene.frame_end = 5
|
||||
bpy.context.scene.frame_set(3)
|
||||
obj["insert_target"] = 3.0
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
42
tools/web/generated/M16-GAP-00189.py
Normal file
42
tools/web/generated/M16-GAP-00189.py
Normal file
@@ -0,0 +1,42 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
OBJECT_NAME = "WebGapAnimKeyframeInsertMenuObject"
|
||||
ACTION_NAME = "WebGapAnimKeyframeInsertMenuAction"
|
||||
KEYING_SET_NAME = "WebGapAnimKeyframeInsertMenuSet"
|
||||
DATA_PATH = '["insert_target"]'
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00189.py -- OUTPUT")
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
mesh = bpy.data.meshes.new("WebGapAnimKeyframeInsertMenuMesh")
|
||||
mesh.from_pydata([(-1.0, -1.0, 0.0), (1.0, -1.0, 0.0), (1.0, 1.0, 0.0), (-1.0, 1.0, 0.0)], [], [(0, 1, 2, 3)])
|
||||
obj = bpy.data.objects.new(OBJECT_NAME, mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
obj["insert_target"] = 3.0
|
||||
for frame, value in ((1, 1.0), (5, 5.0)):
|
||||
bpy.context.scene.frame_set(frame)
|
||||
obj["insert_target"] = value
|
||||
obj.keyframe_insert(data_path=DATA_PATH, frame=frame)
|
||||
obj.animation_data.action.name = ACTION_NAME
|
||||
keying_set = bpy.context.scene.keying_sets.new(idname=KEYING_SET_NAME, name=KEYING_SET_NAME)
|
||||
keying_set.paths.add(obj, DATA_PATH, index=0)
|
||||
bpy.context.scene.keying_sets.active_index = 0
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.context.scene.frame_start = 1
|
||||
bpy.context.scene.frame_end = 5
|
||||
bpy.context.scene.frame_set(3)
|
||||
obj["insert_target"] = 3.0
|
||||
bpy.ops.wm.save_as_mainfile(filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
44
tools/web/generated/M16-GAP-00190.py
Normal file
44
tools/web/generated/M16-GAP-00190.py
Normal file
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
OBJECT_NAME = "WebGapAnimKeyingSetActiveObject"
|
||||
ACTION_NAME = "WebGapAnimKeyingSetActiveAction"
|
||||
KEYING_SET_A = "WebGapAnimKeyingSetActiveA"
|
||||
KEYING_SET_B = "WebGapAnimKeyingSetActiveB"
|
||||
DATA_PATH = '["active_target"]'
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00190.py -- OUTPUT")
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
mesh = bpy.data.meshes.new("WebGapAnimKeyingSetActiveMesh")
|
||||
mesh.from_pydata([(-1.0, -1.0, 0.0), (1.0, -1.0, 0.0), (1.0, 1.0, 0.0), (-1.0, 1.0, 0.0)], [], [(0, 1, 2, 3)])
|
||||
obj = bpy.data.objects.new(OBJECT_NAME, mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
obj["active_target"] = 3.0
|
||||
for frame, value in ((1, 1.0), (3, 3.0), (5, 5.0)):
|
||||
bpy.context.scene.frame_set(frame)
|
||||
obj["active_target"] = value
|
||||
obj.keyframe_insert(data_path=DATA_PATH, frame=frame)
|
||||
obj.animation_data.action.name = ACTION_NAME
|
||||
first = bpy.context.scene.keying_sets.new(idname=KEYING_SET_A, name=KEYING_SET_A)
|
||||
first.paths.add(obj, DATA_PATH, index=0)
|
||||
second = bpy.context.scene.keying_sets.new(idname=KEYING_SET_B, name=KEYING_SET_B)
|
||||
second.paths.add(obj, DATA_PATH, index=0)
|
||||
bpy.context.scene.keying_sets.active_index = 0
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.context.scene.frame_start = 1
|
||||
bpy.context.scene.frame_end = 5
|
||||
bpy.context.scene.frame_set(3)
|
||||
bpy.ops.wm.save_as_mainfile(filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
31
tools/web/generated/M16-GAP-00191.py
Normal file
31
tools/web/generated/M16-GAP-00191.py
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
OBJECT_NAME = "WebGapAnimKeyingSetAddObject"
|
||||
ACTION_NAME = "WebGapAnimKeyingSetAddAction"
|
||||
DATA_PATH = '["add_target"]'
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00191.py -- OUTPUT")
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
mesh = bpy.data.meshes.new("WebGapAnimKeyingSetAddMesh")
|
||||
mesh.from_pydata([(-1.0, -1.0, 0.0), (1.0, -1.0, 0.0), (1.0, 1.0, 0.0), (-1.0, 1.0, 0.0)], [], [(0, 1, 2, 3)])
|
||||
obj = bpy.data.objects.new(OBJECT_NAME, mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
obj["add_target"] = 3.0
|
||||
for frame, value in ((1, 1.0), (3, 3.0), (5, 5.0)):
|
||||
bpy.context.scene.frame_set(frame); obj["add_target"] = value; obj.keyframe_insert(data_path=DATA_PATH, frame=frame)
|
||||
obj.animation_data.action.name = ACTION_NAME
|
||||
bpy.context.view_layer.objects.active = obj; obj.select_set(True); bpy.context.scene.frame_start = 1; bpy.context.scene.frame_end = 5; bpy.context.scene.frame_set(3)
|
||||
bpy.ops.wm.save_as_mainfile(filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
29
tools/web/generated/M16-GAP-00192.py
Normal file
29
tools/web/generated/M16-GAP-00192.py
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00192.py -- OUTPUT")
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
mesh = bpy.data.meshes.new("WebGapAnimKeyingSetExportMesh")
|
||||
mesh.from_pydata([(-1.0, -1.0, 0.0), (1.0, -1.0, 0.0), (1.0, 1.0, 0.0), (-1.0, 1.0, 0.0)], [], [(0, 1, 2, 3)])
|
||||
obj = bpy.data.objects.new("WebGapAnimKeyingSetExportObject", mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
obj["export_target"] = 3.0
|
||||
for frame, value in ((1, 1.0), (3, 3.0), (5, 5.0)):
|
||||
bpy.context.scene.frame_set(frame); obj["export_target"] = value; obj.keyframe_insert(data_path='["export_target"]', frame=frame)
|
||||
obj.animation_data.action.name = "WebGapAnimKeyingSetExportAction"
|
||||
keying_set = bpy.context.scene.keying_sets.new(idname="WebGapAnimKeyingSetExportSet", name="WebGapAnimKeyingSetExportSet")
|
||||
keying_set.paths.add(obj, '["export_target"]', index=0)
|
||||
bpy.context.scene.keying_sets.active_index = 0
|
||||
bpy.context.view_layer.objects.active = obj; obj.select_set(True); bpy.context.scene.frame_start = 1; bpy.context.scene.frame_end = 5; bpy.context.scene.frame_set(3)
|
||||
bpy.ops.wm.save_as_mainfile(filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
40
tools/web/generated/M16-GAP-00193.py
Normal file
40
tools/web/generated/M16-GAP-00193.py
Normal file
@@ -0,0 +1,40 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
OBJECT_NAME = "WebGapAnimKeyingSetPathAddObject"
|
||||
ACTION_NAME = "WebGapAnimKeyingSetPathAddAction"
|
||||
KEYING_SET_NAME = "WebGapAnimKeyingSetPathAddSet"
|
||||
DATA_PATH = '["path_add_target"]'
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00193.py -- OUTPUT")
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
mesh = bpy.data.meshes.new("WebGapAnimKeyingSetPathAddMesh")
|
||||
mesh.from_pydata([(-1.0, -1.0, 0.0), (1.0, -1.0, 0.0), (1.0, 1.0, 0.0), (-1.0, 1.0, 0.0)], [], [(0, 1, 2, 3)])
|
||||
obj = bpy.data.objects.new(OBJECT_NAME, mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
obj["path_add_target"] = 3.0
|
||||
for frame, value in ((1, 1.0), (3, 3.0), (5, 5.0)):
|
||||
bpy.context.scene.frame_set(frame)
|
||||
obj["path_add_target"] = value
|
||||
obj.keyframe_insert(data_path=DATA_PATH, frame=frame)
|
||||
obj.animation_data.action.name = ACTION_NAME
|
||||
bpy.context.scene.keying_sets.new(idname=KEYING_SET_NAME, name=KEYING_SET_NAME)
|
||||
bpy.context.scene.keying_sets.active_index = 0
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.context.scene.frame_start = 1
|
||||
bpy.context.scene.frame_end = 5
|
||||
bpy.context.scene.frame_set(3)
|
||||
bpy.ops.wm.save_as_mainfile(filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
41
tools/web/generated/M16-GAP-00194.py
Normal file
41
tools/web/generated/M16-GAP-00194.py
Normal file
@@ -0,0 +1,41 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
OBJECT_NAME = "WebGapAnimKeyingSetPathRemoveObject"
|
||||
ACTION_NAME = "WebGapAnimKeyingSetPathRemoveAction"
|
||||
KEYING_SET_NAME = "WebGapAnimKeyingSetPathRemoveSet"
|
||||
DATA_PATH = '["path_remove_target"]'
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00194.py -- OUTPUT")
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
mesh = bpy.data.meshes.new("WebGapAnimKeyingSetPathRemoveMesh")
|
||||
mesh.from_pydata([(-1.0, -1.0, 0.0), (1.0, -1.0, 0.0), (1.0, 1.0, 0.0), (-1.0, 1.0, 0.0)], [], [(0, 1, 2, 3)])
|
||||
obj = bpy.data.objects.new(OBJECT_NAME, mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
obj["path_remove_target"] = 3.0
|
||||
for frame, value in ((1, 1.0), (3, 3.0), (5, 5.0)):
|
||||
bpy.context.scene.frame_set(frame)
|
||||
obj["path_remove_target"] = value
|
||||
obj.keyframe_insert(data_path=DATA_PATH, frame=frame)
|
||||
obj.animation_data.action.name = ACTION_NAME
|
||||
keying_set = bpy.context.scene.keying_sets.new(idname=KEYING_SET_NAME, name=KEYING_SET_NAME)
|
||||
keying_set.paths.add(obj, DATA_PATH, index=0)
|
||||
bpy.context.scene.keying_sets.active_index = 0
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.context.scene.frame_start = 1
|
||||
bpy.context.scene.frame_end = 5
|
||||
bpy.context.scene.frame_set(3)
|
||||
bpy.ops.wm.save_as_mainfile(filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
40
tools/web/generated/M16-GAP-00195.py
Normal file
40
tools/web/generated/M16-GAP-00195.py
Normal file
@@ -0,0 +1,40 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
OBJECT_NAME = "WebGapAnimKeyingSetRemoveObject"
|
||||
ACTION_NAME = "WebGapAnimKeyingSetRemoveAction"
|
||||
KEYING_SET_NAME = "WebGapAnimKeyingSetRemoveSet"
|
||||
DATA_PATH = '["remove_target"]'
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00195.py -- OUTPUT")
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
mesh = bpy.data.meshes.new("WebGapAnimKeyingSetRemoveMesh")
|
||||
mesh.from_pydata([(-1.0, -1.0, 0.0), (1.0, -1.0, 0.0), (1.0, 1.0, 0.0), (-1.0, 1.0, 0.0)], [], [(0, 1, 2, 3)])
|
||||
obj = bpy.data.objects.new(OBJECT_NAME, mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
obj["remove_target"] = 3.0
|
||||
for frame, value in ((1, 1.0), (3, 3.0), (5, 5.0)):
|
||||
bpy.context.scene.frame_set(frame)
|
||||
obj["remove_target"] = value
|
||||
obj.keyframe_insert(data_path=DATA_PATH, frame=frame)
|
||||
obj.animation_data.action.name = ACTION_NAME
|
||||
bpy.context.scene.keying_sets.new(idname=KEYING_SET_NAME, name=KEYING_SET_NAME)
|
||||
bpy.context.scene.keying_sets.active_index = 0
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.context.scene.frame_start = 1
|
||||
bpy.context.scene.frame_end = 5
|
||||
bpy.context.scene.frame_set(3)
|
||||
bpy.ops.wm.save_as_mainfile(filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
37
tools/web/generated/M16-GAP-00196.py
Normal file
37
tools/web/generated/M16-GAP-00196.py
Normal file
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
OBJECT_NAME = "WebGapAnimKeyingSetButtonAddObject"
|
||||
ACTION_NAME = "WebGapAnimKeyingSetButtonAddAction"
|
||||
DATA_PATH = '["button_target"]'
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00196.py -- OUTPUT")
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
mesh = bpy.data.meshes.new("WebGapAnimKeyingSetButtonAddMesh")
|
||||
mesh.from_pydata([(-1.0, -1.0, 0.0), (1.0, -1.0, 0.0), (1.0, 1.0, 0.0), (-1.0, 1.0, 0.0)], [], [(0, 1, 2, 3)])
|
||||
obj = bpy.data.objects.new(OBJECT_NAME, mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
obj["button_target"] = 3.0
|
||||
for frame, value in ((1, 1.0), (3, 3.0), (5, 5.0)):
|
||||
bpy.context.scene.frame_set(frame)
|
||||
obj["button_target"] = value
|
||||
obj.keyframe_insert(data_path=DATA_PATH, frame=frame)
|
||||
obj.animation_data.action.name = ACTION_NAME
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.context.scene.frame_start = 1
|
||||
bpy.context.scene.frame_end = 5
|
||||
bpy.context.scene.frame_set(3)
|
||||
bpy.ops.wm.save_as_mainfile(filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
41
tools/web/generated/M16-GAP-00197.py
Normal file
41
tools/web/generated/M16-GAP-00197.py
Normal file
@@ -0,0 +1,41 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
OBJECT_NAME = "WebGapAnimKeyingSetButtonRemoveObject"
|
||||
ACTION_NAME = "WebGapAnimKeyingSetButtonRemoveAction"
|
||||
KEYING_SET_NAME = "ButtonKeyingSet"
|
||||
DATA_PATH = '["button_remove_target"]'
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00197.py -- OUTPUT")
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
mesh = bpy.data.meshes.new("WebGapAnimKeyingSetButtonRemoveMesh")
|
||||
mesh.from_pydata([(-1.0, -1.0, 0.0), (1.0, -1.0, 0.0), (1.0, 1.0, 0.0), (-1.0, 1.0, 0.0)], [], [(0, 1, 2, 3)])
|
||||
obj = bpy.data.objects.new(OBJECT_NAME, mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
obj["button_remove_target"] = 3.0
|
||||
for frame, value in ((1, 1.0), (3, 3.0), (5, 5.0)):
|
||||
bpy.context.scene.frame_set(frame)
|
||||
obj["button_remove_target"] = value
|
||||
obj.keyframe_insert(data_path=DATA_PATH, frame=frame)
|
||||
obj.animation_data.action.name = ACTION_NAME
|
||||
keying_set = bpy.context.scene.keying_sets.new(idname=KEYING_SET_NAME, name=KEYING_SET_NAME)
|
||||
keying_set.paths.add(obj, DATA_PATH, index=0)
|
||||
bpy.context.scene.keying_sets.active_index = 0
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.context.scene.frame_start = 1
|
||||
bpy.context.scene.frame_end = 5
|
||||
bpy.context.scene.frame_set(3)
|
||||
bpy.ops.wm.save_as_mainfile(filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
45
tools/web/generated/M16-GAP-00198.py
Normal file
45
tools/web/generated/M16-GAP-00198.py
Normal file
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ACTIVE_OBJECT = "WebGapAnimMergeActiveObject"
|
||||
SOURCE_OBJECT = "WebGapAnimMergeSourceObject"
|
||||
ACTIVE_ACTION = "WebGapAnimMergeActiveAction"
|
||||
SOURCE_ACTION = "WebGapAnimMergeSourceAction"
|
||||
|
||||
|
||||
def make_object(name, prop_name, action_name, values):
|
||||
mesh = bpy.data.meshes.new(f"{name}Mesh")
|
||||
mesh.from_pydata([(-1.0, -1.0, 0.0), (1.0, -1.0, 0.0), (1.0, 1.0, 0.0), (-1.0, 1.0, 0.0)], [], [(0, 1, 2, 3)])
|
||||
obj = bpy.data.objects.new(name, mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
obj[prop_name] = values[1]
|
||||
for frame, value in zip((1, 3, 5), values):
|
||||
bpy.context.scene.frame_set(frame)
|
||||
obj[prop_name] = value
|
||||
obj.keyframe_insert(data_path=f'["{prop_name}"]', frame=frame)
|
||||
obj.animation_data.action.name = action_name
|
||||
return obj
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00198.py -- OUTPUT")
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
active = make_object(ACTIVE_OBJECT, "active_merge_target", ACTIVE_ACTION, (1.0, 3.0, 5.0))
|
||||
source = make_object(SOURCE_OBJECT, "source_merge_target", SOURCE_ACTION, (10.0, 30.0, 50.0))
|
||||
bpy.context.view_layer.objects.active = active
|
||||
active.select_set(True)
|
||||
source.select_set(True)
|
||||
bpy.context.scene.frame_start = 1
|
||||
bpy.context.scene.frame_end = 5
|
||||
bpy.context.scene.frame_set(3)
|
||||
bpy.ops.wm.save_as_mainfile(filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
38
tools/web/generated/M16-GAP-00199.py
Normal file
38
tools/web/generated/M16-GAP-00199.py
Normal file
@@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00199.py -- OUTPUT")
|
||||
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
mesh = bpy.data.meshes.new("WebGapAnimPasteDriverButtonMesh")
|
||||
mesh.from_pydata(
|
||||
[(-1.0, -1.0, 0.0), (1.0, -1.0, 0.0), (1.0, 1.0, 0.0), (-1.0, 1.0, 0.0)],
|
||||
[],
|
||||
[(0, 1, 2, 3)],
|
||||
)
|
||||
obj = bpy.data.objects.new("WebGapAnimPasteDriverButtonObject", mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
obj["source_target"] = 2.5
|
||||
obj["paste_target"] = 7.5
|
||||
source_driver = obj.driver_add('["source_target"]')
|
||||
source_driver.driver.type = "SCRIPTED"
|
||||
source_driver.driver.expression = "frame * 3.0 + 2.0"
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.context.scene.frame_start = 1
|
||||
bpy.context.scene.frame_end = 5
|
||||
bpy.context.scene.frame_set(1)
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
48
tools/web/generated/M16-GAP-00200.py
Normal file
48
tools/web/generated/M16-GAP-00200.py
Normal file
@@ -0,0 +1,48 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
def clear_preview_range():
|
||||
window = bpy.context.window
|
||||
screen = window.screen
|
||||
area = next(candidate for candidate in screen.areas if candidate.type == "DOPESHEET_EDITOR")
|
||||
region = next(candidate for candidate in area.regions if candidate.type == "WINDOW")
|
||||
with bpy.context.temp_override(window=window, screen=screen, area=area, region=region):
|
||||
if not bpy.ops.anim.previewrange_clear.poll():
|
||||
raise RuntimeError("ANIM_OT_previewrange_clear poll failed in animation editor context")
|
||||
result = bpy.ops.anim.previewrange_clear()
|
||||
if "FINISHED" not in result:
|
||||
raise RuntimeError(f"ANIM_OT_previewrange_clear returned {result}")
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00200.py -- OUTPUT")
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
mesh = bpy.data.meshes.new("WebGapAnimPreviewRangeClearMesh")
|
||||
mesh.from_pydata(
|
||||
[(-1.0, -1.0, 0.0), (1.0, -1.0, 0.0), (1.0, 1.0, 0.0), (-1.0, 1.0, 0.0)],
|
||||
[],
|
||||
[(0, 1, 2, 3)],
|
||||
)
|
||||
obj = bpy.data.objects.new("WebGapAnimPreviewRangeClearObject", mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
scene = bpy.context.scene
|
||||
scene.frame_start = 1
|
||||
scene.frame_end = 8
|
||||
scene.use_preview_range = True
|
||||
scene.frame_preview_start = 2
|
||||
scene.frame_preview_end = 6
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
46
tools/web/generated/M16-GAP-00201.py
Normal file
46
tools/web/generated/M16-GAP-00201.py
Normal file
@@ -0,0 +1,46 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
def set_preview_range():
|
||||
window = bpy.context.window
|
||||
screen = window.screen
|
||||
area = next(candidate for candidate in screen.areas if candidate.type == "DOPESHEET_EDITOR")
|
||||
region = next(candidate for candidate in area.regions if candidate.type == "WINDOW")
|
||||
with bpy.context.temp_override(window=window, screen=screen, area=area, region=region):
|
||||
if not bpy.ops.anim.previewrange_set.poll():
|
||||
raise RuntimeError("ANIM_OT_previewrange_set poll failed in animation editor context")
|
||||
result = bpy.ops.anim.previewrange_set(xmin=62, xmax=88, ymin=0, ymax=47)
|
||||
if "FINISHED" not in result:
|
||||
raise RuntimeError(f"ANIM_OT_previewrange_set returned {result}")
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00201.py -- OUTPUT")
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
mesh = bpy.data.meshes.new("WebGapAnimPreviewRangeSetMesh")
|
||||
mesh.from_pydata(
|
||||
[(-1.0, -1.0, 0.0), (1.0, -1.0, 0.0), (1.0, 1.0, 0.0), (-1.0, 1.0, 0.0)],
|
||||
[],
|
||||
[(0, 1, 2, 3)],
|
||||
)
|
||||
obj = bpy.data.objects.new("WebGapAnimPreviewRangeSetObject", mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
scene = bpy.context.scene
|
||||
scene.frame_start = 1
|
||||
scene.frame_end = 8
|
||||
set_preview_range()
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
54
tools/web/generated/M16-GAP-00202.py
Normal file
54
tools/web/generated/M16-GAP-00202.py
Normal file
@@ -0,0 +1,54 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
OLD_ACTION = "WebGapAnimReplaceOldAction"
|
||||
NEW_ACTION = "WebGapAnimReplaceNewAction"
|
||||
|
||||
|
||||
def make_object(name, action, property_name, values):
|
||||
mesh = bpy.data.meshes.new(f"{name}Mesh")
|
||||
mesh.from_pydata(
|
||||
[(-1.0, -1.0, 0.0), (1.0, -1.0, 0.0), (1.0, 1.0, 0.0), (-1.0, 1.0, 0.0)],
|
||||
[],
|
||||
[(0, 1, 2, 3)],
|
||||
)
|
||||
obj = bpy.data.objects.new(name, mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
obj.animation_data_create()
|
||||
obj.animation_data.action = action
|
||||
for frame, value in zip((1, 3, 5), values):
|
||||
obj[property_name] = value
|
||||
obj.keyframe_insert(data_path=f'["{property_name}"]', frame=frame)
|
||||
return obj
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00202.py -- OUTPUT")
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
old_action = bpy.data.actions.new(OLD_ACTION)
|
||||
new_action = bpy.data.actions.new(NEW_ACTION)
|
||||
old_a = make_object("WebGapAnimReplaceOldA", old_action, "replace_target", (1.0, 3.0, 5.0))
|
||||
old_b = make_object("WebGapAnimReplaceOldB", old_action, "replace_target", (2.0, 4.0, 6.0))
|
||||
new_user = make_object("WebGapAnimReplaceNewUser", new_action, "replace_target", (10.0, 30.0, 50.0))
|
||||
old_action.use_fake_user = True
|
||||
new_action.use_fake_user = True
|
||||
bpy.context.view_layer.objects.active = old_a
|
||||
old_a.select_set(True)
|
||||
old_b.select_set(False)
|
||||
new_user.select_set(False)
|
||||
bpy.context.scene.frame_start = 1
|
||||
bpy.context.scene.frame_end = 5
|
||||
bpy.context.scene.frame_set(3)
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
49
tools/web/generated/M16-GAP-00203.py
Normal file
49
tools/web/generated/M16-GAP-00203.py
Normal file
@@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
OLD_ACTION = "WebGapAnimReplaceNewOldAction"
|
||||
|
||||
|
||||
def make_object(name, action, values):
|
||||
mesh = bpy.data.meshes.new(f"{name}Mesh")
|
||||
mesh.from_pydata(
|
||||
[(-1.0, -1.0, 0.0), (1.0, -1.0, 0.0), (1.0, 1.0, 0.0), (-1.0, 1.0, 0.0)],
|
||||
[],
|
||||
[(0, 1, 2, 3)],
|
||||
)
|
||||
obj = bpy.data.objects.new(name, mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
obj.animation_data_create()
|
||||
obj.animation_data.action = action
|
||||
for frame, value in zip((1, 3, 5), values):
|
||||
obj["replace_target"] = value
|
||||
obj.keyframe_insert(data_path='["replace_target"]', frame=frame)
|
||||
return obj
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00203.py -- OUTPUT")
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
old_action = bpy.data.actions.new(OLD_ACTION)
|
||||
old_a = make_object("WebGapAnimReplaceNewOldA", old_action, (1.0, 3.0, 5.0))
|
||||
old_b = make_object("WebGapAnimReplaceNewOldB", old_action, (2.0, 4.0, 6.0))
|
||||
old_action.use_fake_user = True
|
||||
bpy.context.view_layer.objects.active = old_a
|
||||
old_a.select_set(True)
|
||||
old_b.select_set(False)
|
||||
bpy.context.scene.frame_start = 1
|
||||
bpy.context.scene.frame_end = 5
|
||||
bpy.context.scene.frame_set(3)
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
43
tools/web/generated/M16-GAP-00204.py
Normal file
43
tools/web/generated/M16-GAP-00204.py
Normal file
@@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
def frame_scene_range():
|
||||
window = bpy.context.window
|
||||
screen = window.screen
|
||||
area = next((candidate for candidate in screen.areas if candidate.type == "DOPESHEET_EDITOR" and candidate.height >= 200), None)
|
||||
if area is None:
|
||||
area = next(candidate for candidate in screen.areas if candidate.type == "VIEW_3D" and candidate.height >= 200)
|
||||
area.type = "DOPESHEET_EDITOR"
|
||||
region = next(candidate for candidate in area.regions if candidate.type == "WINDOW")
|
||||
with bpy.context.temp_override(window=window, screen=screen, area=area, region=region):
|
||||
if not bpy.ops.anim.scene_range_frame.poll():
|
||||
raise RuntimeError("ANIM_OT_scene_range_frame poll failed in animation editor context")
|
||||
result = bpy.ops.anim.scene_range_frame()
|
||||
if "FINISHED" not in result:
|
||||
raise RuntimeError(f"ANIM_OT_scene_range_frame returned {result}")
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00204.py -- OUTPUT")
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
scene = bpy.context.scene
|
||||
scene.frame_start = 1
|
||||
scene.frame_end = 48
|
||||
scene.use_preview_range = True
|
||||
scene.frame_preview_start = 12
|
||||
scene.frame_preview_end = 24
|
||||
bpy.context.preferences.view.smooth_view = 0
|
||||
frame_scene_range()
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
52
tools/web/generated/M16-GAP-00205.py
Normal file
52
tools/web/generated/M16-GAP-00205.py
Normal file
@@ -0,0 +1,52 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
OLD_ACTION = "WebGapAnimSeparateSlotsAction"
|
||||
|
||||
|
||||
def make_object(name, action, slot, values):
|
||||
mesh = bpy.data.meshes.new(f"{name}Mesh")
|
||||
mesh.from_pydata(
|
||||
[(-1.0, -1.0, 0.0), (1.0, -1.0, 0.0), (1.0, 1.0, 0.0), (-1.0, 1.0, 0.0)],
|
||||
[],
|
||||
[(0, 1, 2, 3)],
|
||||
)
|
||||
obj = bpy.data.objects.new(name, mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
obj.animation_data_create()
|
||||
obj.animation_data.action = action
|
||||
obj.animation_data.action_slot = slot
|
||||
for frame, value in zip((1, 3, 5), values):
|
||||
obj["separate_target"] = value
|
||||
obj.keyframe_insert(data_path='["separate_target"]', frame=frame)
|
||||
return obj
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00205.py -- OUTPUT")
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
action = bpy.data.actions.new(OLD_ACTION)
|
||||
slot_a = action.slots.new("OBJECT", "WebGapSeparateSlotA")
|
||||
slot_b = action.slots.new("OBJECT", "WebGapSeparateSlotB")
|
||||
object_a = make_object("WebGapAnimSeparateSlotA", action, slot_a, (1.0, 3.0, 5.0))
|
||||
object_b = make_object("WebGapAnimSeparateSlotB", action, slot_b, (2.0, 4.0, 6.0))
|
||||
action.use_fake_user = True
|
||||
bpy.context.view_layer.objects.active = object_a
|
||||
object_a.select_set(True)
|
||||
object_b.select_set(False)
|
||||
bpy.context.scene.frame_start = 1
|
||||
bpy.context.scene.frame_end = 5
|
||||
bpy.context.scene.frame_set(3)
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
61
tools/web/generated/M16-GAP-00206.py
Normal file
61
tools/web/generated/M16-GAP-00206.py
Normal file
@@ -0,0 +1,61 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
OLD_ACTION = "WebGapAnimMoveSlotAction"
|
||||
|
||||
|
||||
def make_object(name, action, slot, values):
|
||||
mesh = bpy.data.meshes.new(f"{name}Mesh")
|
||||
mesh.from_pydata(
|
||||
[(-1.0, -1.0, 0.0), (1.0, -1.0, 0.0), (1.0, 1.0, 0.0), (-1.0, 1.0, 0.0)],
|
||||
[],
|
||||
[(0, 1, 2, 3)],
|
||||
)
|
||||
obj = bpy.data.objects.new(name, mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
obj.animation_data_create()
|
||||
obj.animation_data.action = action
|
||||
obj.animation_data.action_slot = slot
|
||||
for frame, value in zip((1, 3, 5), values):
|
||||
obj["move_target"] = value
|
||||
obj.keyframe_insert(data_path='["move_target"]', frame=frame)
|
||||
return obj
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00206.py -- OUTPUT")
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
action = bpy.data.actions.new(OLD_ACTION)
|
||||
slot_a = action.slots.new("OBJECT", "WebGapMoveSlotA")
|
||||
slot_b = action.slots.new("OBJECT", "WebGapMoveSlotB")
|
||||
object_a = make_object("WebGapAnimMoveSlotA", action, slot_a, (1.0, 3.0, 5.0))
|
||||
object_b = make_object("WebGapAnimMoveSlotB", action, slot_b, (2.0, 4.0, 6.0))
|
||||
slot_a.select = True
|
||||
slot_b.select = False
|
||||
action.use_fake_user = True
|
||||
bpy.context.view_layer.objects.active = object_a
|
||||
object_a.select_set(True)
|
||||
object_b.select_set(False)
|
||||
window = bpy.context.window
|
||||
screen = window.screen
|
||||
area = next((candidate for candidate in screen.areas if candidate.type == "DOPESHEET_EDITOR" and candidate.height >= 200), None)
|
||||
if area is None:
|
||||
area = next(candidate for candidate in screen.areas if candidate.type == "VIEW_3D" and candidate.height >= 200)
|
||||
area.type = "DOPESHEET_EDITOR"
|
||||
area.spaces.active.ui_mode = "ACTION"
|
||||
bpy.context.scene.frame_start = 1
|
||||
bpy.context.scene.frame_end = 5
|
||||
bpy.context.scene.frame_set(3)
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
46
tools/web/generated/M16-GAP-00207.py
Normal file
46
tools/web/generated/M16-GAP-00207.py
Normal file
@@ -0,0 +1,46 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ACTION_NAME = "WebGapAnimNewSlotAction"
|
||||
OBJECT_NAME = "WebGapAnimNewSlotObject"
|
||||
SLOT_NAME = "WebGapAnimNewSlot"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00207.py -- OUTPUT")
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
mesh = bpy.data.meshes.new(f"{OBJECT_NAME}Mesh")
|
||||
mesh.from_pydata(
|
||||
[(-1.0, -1.0, 0.0), (1.0, -1.0, 0.0), (1.0, 1.0, 0.0), (-1.0, 1.0, 0.0)],
|
||||
[],
|
||||
[(0, 1, 2, 3)],
|
||||
)
|
||||
obj = bpy.data.objects.new(OBJECT_NAME, mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
action = bpy.data.actions.new(ACTION_NAME)
|
||||
slot = action.slots.new("OBJECT", SLOT_NAME)
|
||||
obj.animation_data_create()
|
||||
obj.animation_data.action = action
|
||||
obj.animation_data.action_slot = slot
|
||||
for frame, value in zip((1, 3, 5), (1.0, 3.0, 5.0)):
|
||||
obj["new_slot_target"] = value
|
||||
obj.keyframe_insert(data_path='["new_slot_target"]', frame=frame)
|
||||
action.use_fake_user = True
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.context.scene.frame_start = 1
|
||||
bpy.context.scene.frame_end = 5
|
||||
bpy.context.scene.frame_set(3)
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
46
tools/web/generated/M16-GAP-00208.py
Normal file
46
tools/web/generated/M16-GAP-00208.py
Normal file
@@ -0,0 +1,46 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ACTION_NAME = "WebGapAnimConstraintSlotAction"
|
||||
OBJECT_NAME = "WebGapAnimConstraintSlotObject"
|
||||
CONSTRAINT_NAME = "WebGapActionSlotConstraint"
|
||||
SLOT_NAME = "WebGapConstraintSlot"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00208.py -- OUTPUT")
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
mesh = bpy.data.meshes.new(f"{OBJECT_NAME}Mesh")
|
||||
mesh.from_pydata(
|
||||
[(-1.0, -1.0, 0.0), (1.0, -1.0, 0.0), (1.0, 1.0, 0.0), (-1.0, 1.0, 0.0)],
|
||||
[],
|
||||
[(0, 1, 2, 3)],
|
||||
)
|
||||
obj = bpy.data.objects.new(OBJECT_NAME, mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
action = bpy.data.actions.new(ACTION_NAME)
|
||||
slot = action.slots.new("OBJECT", SLOT_NAME)
|
||||
action.use_fake_user = True
|
||||
constraint = obj.constraints.new(type="ACTION")
|
||||
constraint.name = CONSTRAINT_NAME
|
||||
constraint.target = obj
|
||||
constraint.action = action
|
||||
constraint.action_slot = slot
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.context.scene.frame_start = 1
|
||||
bpy.context.scene.frame_end = 5
|
||||
bpy.context.scene.frame_set(3)
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
46
tools/web/generated/M16-GAP-00209.py
Normal file
46
tools/web/generated/M16-GAP-00209.py
Normal file
@@ -0,0 +1,46 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ACTION_NAME = "WebGapAnimUnassignIdAction"
|
||||
OBJECT_NAME = "WebGapAnimUnassignIdObject"
|
||||
SLOT_NAME = "WebGapUnassignIdSlot"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00209.py -- OUTPUT")
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
mesh = bpy.data.meshes.new(f"{OBJECT_NAME}Mesh")
|
||||
mesh.from_pydata(
|
||||
[(-1.0, -1.0, 0.0), (1.0, -1.0, 0.0), (1.0, 1.0, 0.0), (-1.0, 1.0, 0.0)],
|
||||
[],
|
||||
[(0, 1, 2, 3)],
|
||||
)
|
||||
obj = bpy.data.objects.new(OBJECT_NAME, mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
action = bpy.data.actions.new(ACTION_NAME)
|
||||
slot = action.slots.new("OBJECT", SLOT_NAME)
|
||||
obj.animation_data_create()
|
||||
obj.animation_data.action = action
|
||||
obj.animation_data.action_slot = slot
|
||||
for frame, value in zip((1, 3, 5), (1.0, 3.0, 5.0)):
|
||||
obj["unassign_id_target"] = value
|
||||
obj.keyframe_insert(data_path='["unassign_id_target"]', frame=frame)
|
||||
action.use_fake_user = True
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.context.scene.frame_start = 1
|
||||
bpy.context.scene.frame_end = 5
|
||||
bpy.context.scene.frame_set(3)
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
52
tools/web/generated/M16-GAP-00210.py
Normal file
52
tools/web/generated/M16-GAP-00210.py
Normal file
@@ -0,0 +1,52 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ACTION_NAME = "WebGapAnimNlaSlotAction"
|
||||
OBJECT_NAME = "WebGapAnimNlaSlotObject"
|
||||
STRIP_NAME = "WebGapNlaSlotStrip"
|
||||
SLOT_NAME = "WebGapNlaSlot"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00210.py -- OUTPUT")
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
mesh = bpy.data.meshes.new(f"{OBJECT_NAME}Mesh")
|
||||
mesh.from_pydata(
|
||||
[(-1.0, -1.0, 0.0), (1.0, -1.0, 0.0), (1.0, 1.0, 0.0), (-1.0, 1.0, 0.0)],
|
||||
[],
|
||||
[(0, 1, 2, 3)],
|
||||
)
|
||||
obj = bpy.data.objects.new(OBJECT_NAME, mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
action = bpy.data.actions.new(ACTION_NAME)
|
||||
slot = action.slots.new("OBJECT", SLOT_NAME)
|
||||
obj.animation_data_create()
|
||||
obj.animation_data.action = action
|
||||
obj.animation_data.action_slot = slot
|
||||
for frame, value in zip((1, 3, 5), (1.0, 3.0, 5.0)):
|
||||
obj["nla_slot_target"] = value
|
||||
obj.keyframe_insert(data_path='["nla_slot_target"]', frame=frame)
|
||||
track = obj.animation_data.nla_tracks.new()
|
||||
track.name = "WebGapNlaSlotTrack"
|
||||
strip = track.strips.new(STRIP_NAME, 1, action)
|
||||
strip.action_slot = slot
|
||||
strip.frame_end = 5
|
||||
action.use_fake_user = True
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.context.scene.frame_start = 1
|
||||
bpy.context.scene.frame_end = 5
|
||||
bpy.context.scene.frame_set(3)
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
23
tools/web/generated/M16-GAP-00211.py
Normal file
23
tools/web/generated/M16-GAP-00211.py
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00211.py -- OUTPUT")
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
scene = bpy.context.scene
|
||||
scene.frame_start = 1
|
||||
scene.frame_end = 120
|
||||
scene.frame_set(42)
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
49
tools/web/generated/M16-GAP-00212.py
Normal file
49
tools/web/generated/M16-GAP-00212.py
Normal file
@@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
OBJECT_NAME = "WebGapAnimatedTransformConstraintObject"
|
||||
ACTION_NAME = "WebGapAnimatedTransformConstraintAction"
|
||||
CONSTRAINT_NAME = "WebGapAnimatedTransformConstraint"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00212.py -- OUTPUT")
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
mesh = bpy.data.meshes.new(f"{OBJECT_NAME}Mesh")
|
||||
mesh.from_pydata(
|
||||
[(-1.0, -1.0, 0.0), (1.0, -1.0, 0.0), (1.0, 1.0, 0.0), (-1.0, 1.0, 0.0)],
|
||||
[],
|
||||
[(0, 1, 2, 3)],
|
||||
)
|
||||
obj = bpy.data.objects.new(OBJECT_NAME, mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
constraint = obj.constraints.new("TRANSFORM")
|
||||
constraint.name = CONSTRAINT_NAME
|
||||
constraint.map_from = "ROTATION"
|
||||
constraint.from_min_x = -30.0
|
||||
obj.animation_data_create()
|
||||
action = bpy.data.actions.new(ACTION_NAME)
|
||||
obj.animation_data.action = action
|
||||
constraint.keyframe_insert(data_path="from_min_x", frame=1)
|
||||
constraint.from_min_x = 60.0
|
||||
constraint.keyframe_insert(data_path="from_min_x", frame=10)
|
||||
action.use_fake_user = True
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
scene = bpy.context.scene
|
||||
scene.frame_start = 1
|
||||
scene.frame_end = 10
|
||||
scene.frame_set(5)
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
63
tools/web/generated/M16-GAP-00213.py
Normal file
63
tools/web/generated/M16-GAP-00213.py
Normal file
@@ -0,0 +1,63 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapVersionBoneHideArmature"
|
||||
OBJECT_NAME = "WebGapVersionBoneHideObject"
|
||||
BONE_NAME = "WebGapVersionBoneHideBone"
|
||||
ARMATURE_ACTION_NAME = "WebGapVersionBoneHideArmatureAction"
|
||||
OBJECT_ACTION_NAME = "WebGapVersionBoneHideObjectAction"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00213.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)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
bone = armature.edit_bones.new(BONE_NAME)
|
||||
bone.head = (0.0, 0.0, 0.0)
|
||||
bone.tail = (0.0, 1.0, 0.0)
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
|
||||
armature.animation_data_create()
|
||||
armature_action = bpy.data.actions.new(ARMATURE_ACTION_NAME)
|
||||
armature_slot = armature_action.slots.new("ARMATURE", ARMATURE_NAME)
|
||||
armature.animation_data.action = armature_action
|
||||
armature.animation_data.action_slot = armature_slot
|
||||
armature.bones[BONE_NAME].hide = False
|
||||
armature.bones[BONE_NAME].keyframe_insert(data_path="hide", frame=1)
|
||||
armature.bones[BONE_NAME].hide = True
|
||||
armature.bones[BONE_NAME].keyframe_insert(data_path="hide", frame=10)
|
||||
armature_action.use_fake_user = True
|
||||
|
||||
obj.animation_data_create()
|
||||
object_action = bpy.data.actions.new(OBJECT_ACTION_NAME)
|
||||
object_slot = object_action.slots.new("OBJECT", OBJECT_NAME)
|
||||
obj.animation_data.action = object_action
|
||||
obj.animation_data.action_slot = object_slot
|
||||
obj["version_anchor"] = 0.0
|
||||
obj.keyframe_insert(data_path='["version_anchor"]', frame=1)
|
||||
obj["version_anchor"] = 1.0
|
||||
obj.keyframe_insert(data_path='["version_anchor"]', frame=10)
|
||||
object_action.use_fake_user = True
|
||||
|
||||
scene = bpy.context.scene
|
||||
scene.frame_start = 1
|
||||
scene.frame_end = 10
|
||||
scene.frame_set(5)
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
66
tools/web/generated/M16-GAP-00214.py
Normal file
66
tools/web/generated/M16-GAP-00214.py
Normal file
@@ -0,0 +1,66 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
OBJECT_NAME = "WebGapAnimViewCurveGraphEditorObject"
|
||||
ACTION_NAME = "WebGapAnimViewCurveGraphEditorAction"
|
||||
PROPERTY_NAME = "curve_target"
|
||||
|
||||
|
||||
def configure_graph_editor():
|
||||
window = bpy.context.window
|
||||
if window is None or window.screen is None:
|
||||
raise RuntimeError("fixture requires a Blender window")
|
||||
screen = window.screen
|
||||
area = next((candidate for candidate in screen.areas if candidate.type in {"DOPESHEET_EDITOR", "VIEW_3D"}), None)
|
||||
if area is None:
|
||||
raise RuntimeError("default Layout VIEW_3D area is missing")
|
||||
area.type = "GRAPH_EDITOR"
|
||||
return area
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00214.py -- OUTPUT")
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
mesh = bpy.data.meshes.new(f"{OBJECT_NAME}Mesh")
|
||||
mesh.from_pydata(
|
||||
[(-1.0, -1.0, 0.0), (1.0, -1.0, 0.0), (1.0, 1.0, 0.0), (-1.0, 1.0, 0.0)],
|
||||
[],
|
||||
[(0, 1, 2, 3)],
|
||||
)
|
||||
obj = bpy.data.objects.new(OBJECT_NAME, mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
obj[PROPERTY_NAME] = -3.0
|
||||
obj.keyframe_insert(data_path=f'["{PROPERTY_NAME}"]', frame=1)
|
||||
obj[PROPERTY_NAME] = 7.0
|
||||
obj.keyframe_insert(data_path=f'["{PROPERTY_NAME}"]', frame=10)
|
||||
obj.animation_data.action.name = ACTION_NAME
|
||||
obj.animation_data.action.use_fake_user = True
|
||||
curve = next(curve for curve in obj.animation_data.action.layers[0].strips[0].channelbags[0].fcurves)
|
||||
for keyframe in curve.keyframe_points:
|
||||
keyframe.select_control_point = False
|
||||
curve.keyframe_points[0].select_control_point = True
|
||||
curve.keyframe_points[1].select_control_point = False
|
||||
bpy.context.scene.frame_start = 1
|
||||
bpy.context.scene.frame_end = 10
|
||||
bpy.context.scene.frame_set(5)
|
||||
bpy.context.preferences.view.smooth_view = 0
|
||||
graph_area = configure_graph_editor()
|
||||
graph_region = next(candidate for candidate in graph_area.regions if candidate.type == "WINDOW")
|
||||
with bpy.context.temp_override(window=bpy.context.window, screen=bpy.context.screen, area=graph_area, region=graph_region):
|
||||
if "FINISHED" not in bpy.ops.graph.view_selected():
|
||||
raise RuntimeError("Graph Editor view_selected failed while preparing fixture")
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
42
tools/web/generated/M16-GAP-00215.py
Normal file
42
tools/web/generated/M16-GAP-00215.py
Normal file
@@ -0,0 +1,42 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureAlignArmature"
|
||||
OBJECT_NAME = "WebGapArmatureAlignObject"
|
||||
PARENT_NAME = "WebGapArmatureAlignParent"
|
||||
CHILD_NAME = "WebGapArmatureAlignChild"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00215.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)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
parent = armature.edit_bones.new(PARENT_NAME)
|
||||
parent.head = (0.0, 0.0, 0.0)
|
||||
parent.tail = (0.0, 0.0, 3.0)
|
||||
child = armature.edit_bones.new(CHILD_NAME)
|
||||
child.head = (0.0, 0.0, 3.0)
|
||||
child.tail = (2.0, 1.0, 4.0)
|
||||
parent.select = True
|
||||
child.select = True
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
armature.bones.active = armature.bones[PARENT_NAME]
|
||||
bpy.context.scene.frame_set(1)
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
45
tools/web/generated/M16-GAP-00216.py
Normal file
45
tools/web/generated/M16-GAP-00216.py
Normal file
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureAssignArmature"
|
||||
OBJECT_NAME = "WebGapArmatureAssignObject"
|
||||
SOURCE_COLLECTION = "WebGapArmatureAssignSource"
|
||||
TARGET_COLLECTION = "WebGapArmatureAssignTarget"
|
||||
PARENT_NAME = "WebGapArmatureAssignParent"
|
||||
CHILD_NAME = "WebGapArmatureAssignChild"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00216.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)
|
||||
source = armature.collections.new(SOURCE_COLLECTION)
|
||||
armature.collections.new(TARGET_COLLECTION)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
parent = armature.edit_bones.new(PARENT_NAME)
|
||||
parent.head = (0.0, 0.0, 0.0)
|
||||
parent.tail = (0.0, 0.0, 2.0)
|
||||
child = armature.edit_bones.new(CHILD_NAME)
|
||||
child.head = (0.0, 0.0, 2.0)
|
||||
child.tail = (0.0, 1.0, 3.0)
|
||||
child.parent = parent
|
||||
child.use_connect = False
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
source.assign(armature.bones[CHILD_NAME])
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
40
tools/web/generated/M16-GAP-00217.py
Normal file
40
tools/web/generated/M16-GAP-00217.py
Normal file
@@ -0,0 +1,40 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureAutosideArmature"
|
||||
OBJECT_NAME = "WebGapArmatureAutosideObject"
|
||||
LEFT_NAME = "WebGapArmatureAutosideLeft"
|
||||
RIGHT_NAME = "WebGapArmatureAutosideRight"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00217.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)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
left = armature.edit_bones.new(LEFT_NAME)
|
||||
left.head = (1.0, 0.0, 0.0)
|
||||
left.tail = (1.0, 0.0, 2.0)
|
||||
right = armature.edit_bones.new(RIGHT_NAME)
|
||||
right.head = (-1.0, 0.0, 0.0)
|
||||
right.tail = (-1.0, 0.0, 2.0)
|
||||
left.select = True
|
||||
right.select = True
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
29
tools/web/generated/M16-GAP-00218.py
Normal file
29
tools/web/generated/M16-GAP-00218.py
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmaturePrimitiveArmature"
|
||||
OBJECT_NAME = "WebGapArmaturePrimitiveObject"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00218.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)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.context.scene.cursor.location = (1.5, -2.0, 0.75)
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
36
tools/web/generated/M16-GAP-00219.py
Normal file
36
tools/web/generated/M16-GAP-00219.py
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureCalculateRollArmature"
|
||||
OBJECT_NAME = "WebGapArmatureCalculateRollObject"
|
||||
BONE_NAME = "WebGapArmatureCalculateRollBone"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00219.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)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
bone = armature.edit_bones.new(BONE_NAME)
|
||||
bone.head = (0.0, 0.0, 0.0)
|
||||
bone.tail = (0.0, 2.0, 0.0)
|
||||
bone.roll = 0.0
|
||||
bone.select = True
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
40
tools/web/generated/M16-GAP-00220.py
Normal file
40
tools/web/generated/M16-GAP-00220.py
Normal file
@@ -0,0 +1,40 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureClickExtrudeArmature"
|
||||
OBJECT_NAME = "WebGapArmatureClickExtrudeObject"
|
||||
BONE_NAME = "WebGapArmatureClickExtrudeBone"
|
||||
CURSOR = (1.5, 2.0, 1.0)
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00220.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)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
bone = armature.edit_bones.new(BONE_NAME)
|
||||
bone.head = (0.0, 0.0, 0.0)
|
||||
bone.tail = (0.0, 2.0, 0.0)
|
||||
bone.roll = 0.0
|
||||
bone.select = True
|
||||
bone.select_tail = True
|
||||
armature.edit_bones.active = bone
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
bpy.context.scene.cursor.location = CURSOR
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
39
tools/web/generated/M16-GAP-00221.py
Normal file
39
tools/web/generated/M16-GAP-00221.py
Normal file
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureCollectionAddArmature"
|
||||
OBJECT_NAME = "WebGapArmatureCollectionAddObject"
|
||||
SOURCE_COLLECTION = "WebGapArmatureCollectionAddExisting"
|
||||
BONE_NAME = "WebGapArmatureCollectionAddBone"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00221.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)
|
||||
existing = armature.collections.new(SOURCE_COLLECTION)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
bone = armature.edit_bones.new(BONE_NAME)
|
||||
bone.head = (0.0, 0.0, 0.0)
|
||||
bone.tail = (0.0, 1.0, 0.0)
|
||||
bone.select = True
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
existing.assign(armature.bones[BONE_NAME])
|
||||
armature.collections.active_index = 0
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
41
tools/web/generated/M16-GAP-00222.py
Normal file
41
tools/web/generated/M16-GAP-00222.py
Normal file
@@ -0,0 +1,41 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureCollectionAssignArmature"
|
||||
OBJECT_NAME = "WebGapArmatureCollectionAssignObject"
|
||||
SOURCE_COLLECTION = "WebGapArmatureCollectionAssignSource"
|
||||
TARGET_COLLECTION = "WebGapArmatureCollectionAssignTarget"
|
||||
BONE_NAME = "WebGapArmatureCollectionAssignBone"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00222.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)
|
||||
source = armature.collections.new(SOURCE_COLLECTION)
|
||||
armature.collections.new(TARGET_COLLECTION)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
bone = armature.edit_bones.new(BONE_NAME)
|
||||
bone.head = (0.0, 0.0, 0.0)
|
||||
bone.tail = (0.0, 1.0, 0.0)
|
||||
bone.select = True
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
source.assign(armature.bones[BONE_NAME])
|
||||
armature.collections.active_index = 0
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
39
tools/web/generated/M16-GAP-00223.py
Normal file
39
tools/web/generated/M16-GAP-00223.py
Normal file
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureCollectionCreateAssignArmature"
|
||||
OBJECT_NAME = "WebGapArmatureCollectionCreateAssignObject"
|
||||
SOURCE_COLLECTION = "WebGapArmatureCollectionCreateAssignSource"
|
||||
BONE_NAME = "WebGapArmatureCollectionCreateAssignBone"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00223.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)
|
||||
source = armature.collections.new(SOURCE_COLLECTION)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
bone = armature.edit_bones.new(BONE_NAME)
|
||||
bone.head = (0.0, 0.0, 0.0)
|
||||
bone.tail = (0.0, 1.0, 0.0)
|
||||
bone.select = True
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
source.assign(armature.bones[BONE_NAME])
|
||||
armature.collections.active_index = 0
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
51
tools/web/generated/M16-GAP-00224.py
Normal file
51
tools/web/generated/M16-GAP-00224.py
Normal file
@@ -0,0 +1,51 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureCollectionDeselectArmature"
|
||||
OBJECT_NAME = "WebGapArmatureCollectionDeselectObject"
|
||||
ACTIVE_COLLECTION = "WebGapArmatureCollectionDeselectActive"
|
||||
OTHER_COLLECTION = "WebGapArmatureCollectionDeselectOther"
|
||||
ACTIVE_BONE = "WebGapArmatureCollectionDeselectActiveBone"
|
||||
OTHER_BONE = "WebGapArmatureCollectionDeselectOtherBone"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00224.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)
|
||||
active = armature.collections.new(ACTIVE_COLLECTION)
|
||||
armature.collections.new(OTHER_COLLECTION)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
active_bone = armature.edit_bones.new(ACTIVE_BONE)
|
||||
active_bone.head = (0.0, 0.0, 0.0)
|
||||
active_bone.tail = (0.0, 1.0, 0.0)
|
||||
other_bone = armature.edit_bones.new(OTHER_BONE)
|
||||
other_bone.head = (1.0, 0.0, 0.0)
|
||||
other_bone.tail = (1.0, 1.0, 0.0)
|
||||
active_bone.select = True
|
||||
active_bone.select_head = True
|
||||
active_bone.select_tail = True
|
||||
other_bone.select = True
|
||||
other_bone.select_head = True
|
||||
other_bone.select_tail = True
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
active.assign(armature.bones[ACTIVE_BONE])
|
||||
armature.collections[OTHER_COLLECTION].assign(armature.bones[OTHER_BONE])
|
||||
armature.collections.active_index = 0
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
47
tools/web/generated/M16-GAP-00225.py
Normal file
47
tools/web/generated/M16-GAP-00225.py
Normal file
@@ -0,0 +1,47 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureCollectionMoveArmature"
|
||||
OBJECT_NAME = "WebGapArmatureCollectionMoveObject"
|
||||
FIRST_COLLECTION = "WebGapArmatureCollectionMoveFirst"
|
||||
ACTIVE_COLLECTION = "WebGapArmatureCollectionMoveActive"
|
||||
LAST_COLLECTION = "WebGapArmatureCollectionMoveLast"
|
||||
FIRST_BONE = "WebGapArmatureCollectionMoveFirstBone"
|
||||
ACTIVE_BONE = "WebGapArmatureCollectionMoveActiveBone"
|
||||
LAST_BONE = "WebGapArmatureCollectionMoveLastBone"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00225.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)
|
||||
active = armature.collections.new(ACTIVE_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")
|
||||
for name, x in ((FIRST_BONE, 0.0), (ACTIVE_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)
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
first.assign(armature.bones[FIRST_BONE])
|
||||
active.assign(armature.bones[ACTIVE_BONE])
|
||||
last.assign(armature.bones[LAST_BONE])
|
||||
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()
|
||||
47
tools/web/generated/M16-GAP-00226.py
Normal file
47
tools/web/generated/M16-GAP-00226.py
Normal file
@@ -0,0 +1,47 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureCollectionRemoveArmature"
|
||||
OBJECT_NAME = "WebGapArmatureCollectionRemoveObject"
|
||||
FIRST_COLLECTION = "WebGapArmatureCollectionRemoveFirst"
|
||||
REMOVED_COLLECTION = "WebGapArmatureCollectionRemoveRemoved"
|
||||
LAST_COLLECTION = "WebGapArmatureCollectionRemoveLast"
|
||||
FIRST_BONE = "WebGapArmatureCollectionRemoveFirstBone"
|
||||
REMOVED_BONE = "WebGapArmatureCollectionRemoveRemovedBone"
|
||||
LAST_BONE = "WebGapArmatureCollectionRemoveLastBone"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00226.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)
|
||||
removed = armature.collections.new(REMOVED_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")
|
||||
for name, x in ((FIRST_BONE, 0.0), (REMOVED_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)
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
first.assign(armature.bones[FIRST_BONE])
|
||||
removed.assign(armature.bones[REMOVED_BONE])
|
||||
last.assign(armature.bones[LAST_BONE])
|
||||
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()
|
||||
47
tools/web/generated/M16-GAP-00227.py
Normal file
47
tools/web/generated/M16-GAP-00227.py
Normal file
@@ -0,0 +1,47 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureCollectionRemoveUnusedArmature"
|
||||
OBJECT_NAME = "WebGapArmatureCollectionRemoveUnusedObject"
|
||||
FIRST_COLLECTION = "WebGapArmatureCollectionRemoveUnusedFirst"
|
||||
UNUSED_FIRST_COLLECTION = "WebGapArmatureCollectionRemoveUnusedUnusedFirst"
|
||||
LAST_COLLECTION = "WebGapArmatureCollectionRemoveUnusedLast"
|
||||
UNUSED_LAST_COLLECTION = "WebGapArmatureCollectionRemoveUnusedUnusedLast"
|
||||
FIRST_BONE = "WebGapArmatureCollectionRemoveUnusedFirstBone"
|
||||
LAST_BONE = "WebGapArmatureCollectionRemoveUnusedLastBone"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00227.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)
|
||||
armature.collections.new(UNUSED_FIRST_COLLECTION)
|
||||
last = armature.collections.new(LAST_COLLECTION)
|
||||
armature.collections.new(UNUSED_LAST_COLLECTION)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
for name, x in ((FIRST_BONE, 0.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)
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
first.assign(armature.bones[FIRST_BONE])
|
||||
last.assign(armature.bones[LAST_BONE])
|
||||
armature.collections.active_index = 2
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
52
tools/web/generated/M16-GAP-00228.py
Normal file
52
tools/web/generated/M16-GAP-00228.py
Normal file
@@ -0,0 +1,52 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureCollectionSelectArmature"
|
||||
OBJECT_NAME = "WebGapArmatureCollectionSelectObject"
|
||||
FIRST_COLLECTION = "WebGapArmatureCollectionSelectFirst"
|
||||
ACTIVE_COLLECTION = "WebGapArmatureCollectionSelectActive"
|
||||
LAST_COLLECTION = "WebGapArmatureCollectionSelectLast"
|
||||
FIRST_BONE = "WebGapArmatureCollectionSelectFirstBone"
|
||||
ACTIVE_BONE = "WebGapArmatureCollectionSelectActiveBone"
|
||||
LAST_BONE = "WebGapArmatureCollectionSelectLastBone"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00228.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)
|
||||
active = armature.collections.new(ACTIVE_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), (ACTIVE_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
|
||||
edit_bones[FIRST_BONE].select = True
|
||||
edit_bones[ACTIVE_BONE].select = False
|
||||
edit_bones[LAST_BONE].select = False
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
first.assign(armature.bones[FIRST_BONE])
|
||||
active.assign(armature.bones[ACTIVE_BONE])
|
||||
last.assign(armature.bones[LAST_BONE])
|
||||
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()
|
||||
49
tools/web/generated/M16-GAP-00229.py
Normal file
49
tools/web/generated/M16-GAP-00229.py
Normal file
@@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureCollectionShowAllArmature"
|
||||
OBJECT_NAME = "WebGapArmatureCollectionShowAllObject"
|
||||
FIRST_COLLECTION = "WebGapArmatureCollectionShowAllFirst"
|
||||
HIDDEN_COLLECTION = "WebGapArmatureCollectionShowAllHidden"
|
||||
LAST_COLLECTION = "WebGapArmatureCollectionShowAllLast"
|
||||
FIRST_BONE = "WebGapArmatureCollectionShowAllFirstBone"
|
||||
HIDDEN_BONE = "WebGapArmatureCollectionShowAllHiddenBone"
|
||||
LAST_BONE = "WebGapArmatureCollectionShowAllLastBone"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00229.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)
|
||||
hidden = armature.collections.new(HIDDEN_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), (HIDDEN_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])
|
||||
hidden.assign(armature.bones[HIDDEN_BONE])
|
||||
last.assign(armature.bones[LAST_BONE])
|
||||
hidden.is_visible = False
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
42
tools/web/generated/M16-GAP-00230.py
Normal file
42
tools/web/generated/M16-GAP-00230.py
Normal file
@@ -0,0 +1,42 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureCollectionUnassignArmature"
|
||||
OBJECT_NAME = "WebGapArmatureCollectionUnassignObject"
|
||||
SOURCE_COLLECTION = "WebGapArmatureCollectionUnassignSource"
|
||||
RETAINED_COLLECTION = "WebGapArmatureCollectionUnassignRetained"
|
||||
BONE_NAME = "WebGapArmatureCollectionUnassignBone"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00230.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)
|
||||
source = armature.collections.new(SOURCE_COLLECTION)
|
||||
retained = armature.collections.new(RETAINED_COLLECTION)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
bone = armature.edit_bones.new(BONE_NAME)
|
||||
bone.head = (0.0, 0.0, 0.0)
|
||||
bone.tail = (0.0, 1.0, 0.0)
|
||||
bone.select = True
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
source.assign(armature.bones[BONE_NAME])
|
||||
retained.assign(armature.bones[BONE_NAME])
|
||||
armature.collections.active_index = 0
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
42
tools/web/generated/M16-GAP-00231.py
Normal file
42
tools/web/generated/M16-GAP-00231.py
Normal file
@@ -0,0 +1,42 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureCollectionUnassignNamedArmature"
|
||||
OBJECT_NAME = "WebGapArmatureCollectionUnassignNamedObject"
|
||||
SOURCE_COLLECTION = "WebGapArmatureCollectionUnassignNamedSource"
|
||||
RETAINED_COLLECTION = "WebGapArmatureCollectionUnassignNamedRetained"
|
||||
BONE_NAME = "WebGapArmatureCollectionUnassignNamedBone"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00231.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)
|
||||
source = armature.collections.new(SOURCE_COLLECTION)
|
||||
retained = armature.collections.new(RETAINED_COLLECTION)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
bone = armature.edit_bones.new(BONE_NAME)
|
||||
bone.head = (0.0, 0.0, 0.0)
|
||||
bone.tail = (0.0, 1.0, 0.0)
|
||||
bone.select = True
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
source.assign(armature.bones[BONE_NAME])
|
||||
retained.assign(armature.bones[BONE_NAME])
|
||||
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()
|
||||
50
tools/web/generated/M16-GAP-00232.py
Normal file
50
tools/web/generated/M16-GAP-00232.py
Normal 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()
|
||||
49
tools/web/generated/M16-GAP-00233.py
Normal file
49
tools/web/generated/M16-GAP-00233.py
Normal file
@@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureCopyBoneColorArmature"
|
||||
OBJECT_NAME = "WebGapArmatureCopyBoneColorObject"
|
||||
SOURCE_BONE = "WebGapArmatureCopyBoneColorSource"
|
||||
SELECTED_BONE = "WebGapArmatureCopyBoneColorSelected"
|
||||
UNSELECTED_BONE = "WebGapArmatureCopyBoneColorUnselected"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00233.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)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
bones = {}
|
||||
for name, x in ((SOURCE_BONE, 0.0), (SELECTED_BONE, 1.0), (UNSELECTED_BONE, 2.0)):
|
||||
bone = armature.edit_bones.new(name)
|
||||
bone.head = (x, 0.0, 0.0)
|
||||
bone.tail = (x, 1.0, 0.0)
|
||||
bones[name] = bone
|
||||
source = bones[SOURCE_BONE]
|
||||
source.color.palette = "CUSTOM"
|
||||
source.color.custom.normal = (0.12, 0.24, 0.36)
|
||||
source.color.custom.select = (0.42, 0.54, 0.66)
|
||||
source.color.custom.active = (0.72, 0.84, 0.96)
|
||||
bones[SELECTED_BONE].color.palette = "THEME04"
|
||||
bones[UNSELECTED_BONE].color.palette = "THEME05"
|
||||
for bone in bones.values():
|
||||
bone.select = True
|
||||
bones[UNSELECTED_BONE].select = False
|
||||
armature.edit_bones.active = source
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
43
tools/web/generated/M16-GAP-00234.py
Normal file
43
tools/web/generated/M16-GAP-00234.py
Normal file
@@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureDeleteArmature"
|
||||
OBJECT_NAME = "WebGapArmatureDeleteObject"
|
||||
KEEP_BONE = "WebGapArmatureDeleteKeep"
|
||||
DELETE_BONE = "WebGapArmatureDeleteSelected"
|
||||
RETAIN_BONE = "WebGapArmatureDeleteRetain"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00234.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)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
bones = {}
|
||||
for name, x in ((KEEP_BONE, 0.0), (DELETE_BONE, 1.0), (RETAIN_BONE, 2.0)):
|
||||
bone = armature.edit_bones.new(name)
|
||||
bone.head = (x, 0.0, 0.0)
|
||||
bone.tail = (x, 1.0, 0.0)
|
||||
bones[name] = bone
|
||||
for bone in bones.values():
|
||||
bone.select = False
|
||||
bones[DELETE_BONE].select = True
|
||||
armature.edit_bones.active = bones[DELETE_BONE]
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
55
tools/web/generated/M16-GAP-00235.py
Normal file
55
tools/web/generated/M16-GAP-00235.py
Normal file
@@ -0,0 +1,55 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureDissolveArmature"
|
||||
OBJECT_NAME = "WebGapArmatureDissolveObject"
|
||||
ROOT_BONE = "WebGapArmatureDissolveRoot"
|
||||
MIDDLE_BONE = "WebGapArmatureDissolveMiddle"
|
||||
TIP_BONE = "WebGapArmatureDissolveTip"
|
||||
OTHER_BONE = "WebGapArmatureDissolveOther"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00235.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)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
root = armature.edit_bones.new(ROOT_BONE)
|
||||
root.head = (0.0, 0.0, 0.0)
|
||||
root.tail = (0.0, 1.0, 0.0)
|
||||
middle = armature.edit_bones.new(MIDDLE_BONE)
|
||||
middle.head = (0.0, 1.0, 0.0)
|
||||
middle.tail = (0.0, 2.0, 0.0)
|
||||
middle.parent = root
|
||||
middle.use_connect = True
|
||||
tip = armature.edit_bones.new(TIP_BONE)
|
||||
tip.head = (0.0, 2.0, 0.0)
|
||||
tip.tail = (0.0, 3.0, 0.0)
|
||||
tip.parent = middle
|
||||
tip.use_connect = True
|
||||
other = armature.edit_bones.new(OTHER_BONE)
|
||||
other.head = (2.0, 0.0, 0.0)
|
||||
other.tail = (2.0, 1.0, 0.0)
|
||||
root.select = False
|
||||
middle.select = True
|
||||
tip.select = True
|
||||
other.select = False
|
||||
armature.edit_bones.active = middle
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
45
tools/web/generated/M16-GAP-00236.py
Normal file
45
tools/web/generated/M16-GAP-00236.py
Normal file
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureDuplicateArmature"
|
||||
OBJECT_NAME = "WebGapArmatureDuplicateObject"
|
||||
SOURCE_BONE = "WebGapArmatureDuplicateSource"
|
||||
OTHER_BONE = "WebGapArmatureDuplicateOther"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00236.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)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
source = armature.edit_bones.new(SOURCE_BONE)
|
||||
source.head = (0.0, 0.0, 0.0)
|
||||
source.tail = (0.0, 1.0, 0.0)
|
||||
other = armature.edit_bones.new(OTHER_BONE)
|
||||
other.head = (2.0, 0.0, 0.0)
|
||||
other.tail = (2.0, 1.0, 0.0)
|
||||
source.select = True
|
||||
source.select_head = True
|
||||
source.select_tail = True
|
||||
other.select = False
|
||||
other.select_head = False
|
||||
other.select_tail = False
|
||||
armature.edit_bones.active = source
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
50
tools/web/generated/M16-GAP-00237.py
Normal file
50
tools/web/generated/M16-GAP-00237.py
Normal file
@@ -0,0 +1,50 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureDuplicateMoveArmature"
|
||||
OBJECT_NAME = "WebGapArmatureDuplicateMoveObject"
|
||||
SOURCE_BONE = "WebGapArmatureDuplicateMoveSource"
|
||||
OTHER_BONE = "WebGapArmatureDuplicateMoveOther"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00237.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)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
source = armature.edit_bones.new(SOURCE_BONE)
|
||||
source.head = (0.0, 0.0, 0.0)
|
||||
source.tail = (0.0, 1.0, 0.0)
|
||||
other = armature.edit_bones.new(OTHER_BONE)
|
||||
other.head = (2.0, 0.0, 0.0)
|
||||
other.tail = (2.0, 1.0, 0.0)
|
||||
source.select = True
|
||||
source.select_head = True
|
||||
source.select_tail = True
|
||||
other.select = False
|
||||
other.select_head = False
|
||||
other.select_tail = False
|
||||
armature.edit_bones.active = source
|
||||
result = bpy.ops.armature.duplicate_move(
|
||||
TRANSFORM_OT_translate={"value": (1.0, 2.0, 3.0)}
|
||||
)
|
||||
if result != {"FINISHED"}:
|
||||
raise RuntimeError(f"ARMATURE_OT_duplicate_move returned {result}")
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
48
tools/web/generated/M16-GAP-00238.py
Normal file
48
tools/web/generated/M16-GAP-00238.py
Normal file
@@ -0,0 +1,48 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureDuplicateRenameArmature"
|
||||
OBJECT_NAME = "WebGapArmatureDuplicateRenameObject"
|
||||
SOURCE_BONE = "WebGapArmatureDuplicateRenameSource"
|
||||
OTHER_BONE = "WebGapArmatureDuplicateRenameOther"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00238.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)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
source = armature.edit_bones.new(SOURCE_BONE)
|
||||
source.head = (0.0, 0.0, 0.0)
|
||||
source.tail = (0.0, 1.0, 0.0)
|
||||
other = armature.edit_bones.new(OTHER_BONE)
|
||||
other.head = (2.0, 0.0, 0.0)
|
||||
other.tail = (2.0, 1.0, 0.0)
|
||||
source.select = True
|
||||
source.select_head = True
|
||||
source.select_tail = True
|
||||
other.select = False
|
||||
other.select_head = False
|
||||
other.select_tail = False
|
||||
armature.edit_bones.active = source
|
||||
result = bpy.ops.armature.duplicate_rename(search="Source", replace="Copy", do_flip_names=False)
|
||||
if result != {"FINISHED"}:
|
||||
raise RuntimeError(f"ARMATURE_OT_duplicate_rename returned {result}")
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
45
tools/web/generated/M16-GAP-00239.py
Normal file
45
tools/web/generated/M16-GAP-00239.py
Normal file
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureExtrudeArmature"
|
||||
OBJECT_NAME = "WebGapArmatureExtrudeObject"
|
||||
SOURCE_BONE = "WebGapArmatureExtrudeSource"
|
||||
OTHER_BONE = "WebGapArmatureExtrudeOther"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00239.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)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
source = armature.edit_bones.new(SOURCE_BONE)
|
||||
source.head = (0.0, 0.0, 0.0)
|
||||
source.tail = (0.0, 1.0, 0.0)
|
||||
other = armature.edit_bones.new(OTHER_BONE)
|
||||
other.head = (2.0, 0.0, 0.0)
|
||||
other.tail = (2.0, 1.0, 0.0)
|
||||
source.select = True
|
||||
source.select_head = False
|
||||
source.select_tail = True
|
||||
other.select = False
|
||||
other.select_head = False
|
||||
other.select_tail = False
|
||||
armature.edit_bones.active = source
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
45
tools/web/generated/M16-GAP-00240.py
Normal file
45
tools/web/generated/M16-GAP-00240.py
Normal file
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureExtrudeForkedArmature"
|
||||
OBJECT_NAME = "WebGapArmatureExtrudeForkedObject"
|
||||
SOURCE_BONE = "WebGapArmatureExtrudeForkedSource"
|
||||
OTHER_BONE = "WebGapArmatureExtrudeForkedOther"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00240.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)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
source = armature.edit_bones.new(SOURCE_BONE)
|
||||
source.head = (0.0, 0.0, 0.0)
|
||||
source.tail = (0.0, 1.0, 0.0)
|
||||
other = armature.edit_bones.new(OTHER_BONE)
|
||||
other.head = (2.0, 0.0, 0.0)
|
||||
other.tail = (2.0, 1.0, 0.0)
|
||||
source.select = True
|
||||
source.select_head = False
|
||||
source.select_tail = True
|
||||
other.select = False
|
||||
other.select_head = False
|
||||
other.select_tail = False
|
||||
armature.edit_bones.active = source
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
45
tools/web/generated/M16-GAP-00241.py
Normal file
45
tools/web/generated/M16-GAP-00241.py
Normal file
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureExtrudeMoveArmature"
|
||||
OBJECT_NAME = "WebGapArmatureExtrudeMoveObject"
|
||||
SOURCE_BONE = "WebGapArmatureExtrudeMoveSource"
|
||||
OTHER_BONE = "WebGapArmatureExtrudeMoveOther"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00241.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)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
source = armature.edit_bones.new(SOURCE_BONE)
|
||||
source.head = (0.0, 0.0, 0.0)
|
||||
source.tail = (0.0, 1.0, 0.0)
|
||||
other = armature.edit_bones.new(OTHER_BONE)
|
||||
other.head = (2.0, 0.0, 0.0)
|
||||
other.tail = (2.0, 1.0, 0.0)
|
||||
source.select = True
|
||||
source.select_head = False
|
||||
source.select_tail = True
|
||||
other.select = False
|
||||
other.select_head = False
|
||||
other.select_tail = False
|
||||
armature.edit_bones.active = source
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
52
tools/web/generated/M16-GAP-00242.py
Normal file
52
tools/web/generated/M16-GAP-00242.py
Normal file
@@ -0,0 +1,52 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureFillArmature"
|
||||
OBJECT_NAME = "WebGapArmatureFillObject"
|
||||
SOURCE_BONE = "WebGapArmatureFillSource"
|
||||
TARGET_BONE = "WebGapArmatureFillTarget"
|
||||
OTHER_BONE = "WebGapArmatureFillOther"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00242.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)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
source = armature.edit_bones.new(SOURCE_BONE)
|
||||
source.head = (0.0, 0.0, 0.0)
|
||||
source.tail = (0.0, 1.0, 0.0)
|
||||
target = armature.edit_bones.new(TARGET_BONE)
|
||||
target.head = (0.0, 2.0, 0.0)
|
||||
target.tail = (0.0, 3.0, 0.0)
|
||||
other = armature.edit_bones.new(OTHER_BONE)
|
||||
other.head = (2.0, 0.0, 0.0)
|
||||
other.tail = (2.0, 1.0, 0.0)
|
||||
source.select = False
|
||||
source.select_head = False
|
||||
source.select_tail = True
|
||||
target.select = False
|
||||
target.select_head = True
|
||||
target.select_tail = False
|
||||
other.select = False
|
||||
other.select_head = False
|
||||
other.select_tail = False
|
||||
armature.edit_bones.active = target
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
52
tools/web/generated/M16-GAP-00243.py
Normal file
52
tools/web/generated/M16-GAP-00243.py
Normal file
@@ -0,0 +1,52 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureFlipNamesArmature"
|
||||
OBJECT_NAME = "WebGapArmatureFlipNamesObject"
|
||||
LEFT_BONE = "WebGapArmatureFlipBone.L"
|
||||
RIGHT_BONE = "WebGapArmatureFlipBone.R"
|
||||
OTHER_BONE = "WebGapArmatureFlipOther"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00243.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)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
left = armature.edit_bones.new(LEFT_BONE)
|
||||
left.head = (-1.0, 0.0, 0.0)
|
||||
left.tail = (-1.0, 1.0, 0.0)
|
||||
right = armature.edit_bones.new(RIGHT_BONE)
|
||||
right.head = (1.0, 0.0, 0.0)
|
||||
right.tail = (1.0, 1.0, 0.0)
|
||||
other = armature.edit_bones.new(OTHER_BONE)
|
||||
other.head = (0.0, 0.0, 2.0)
|
||||
other.tail = (0.0, 1.0, 2.0)
|
||||
left.select = True
|
||||
left.select_head = True
|
||||
left.select_tail = True
|
||||
right.select = True
|
||||
right.select_head = True
|
||||
right.select_tail = True
|
||||
other.select = False
|
||||
other.select_head = False
|
||||
other.select_tail = False
|
||||
armature.edit_bones.active = right
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
45
tools/web/generated/M16-GAP-00244.py
Normal file
45
tools/web/generated/M16-GAP-00244.py
Normal file
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureHideArmature"
|
||||
OBJECT_NAME = "WebGapArmatureHideObject"
|
||||
HIDE_BONE = "WebGapArmatureHideSelected"
|
||||
OTHER_BONE = "WebGapArmatureHideOther"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00244.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)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
hidden = armature.edit_bones.new(HIDE_BONE)
|
||||
hidden.head = (-1.0, 0.0, 0.0)
|
||||
hidden.tail = (-1.0, 1.0, 0.0)
|
||||
other = armature.edit_bones.new(OTHER_BONE)
|
||||
other.head = (1.0, 0.0, 0.0)
|
||||
other.tail = (1.0, 1.0, 0.0)
|
||||
hidden.select = True
|
||||
hidden.select_head = True
|
||||
hidden.select_tail = True
|
||||
other.select = False
|
||||
other.select_head = False
|
||||
other.select_tail = False
|
||||
armature.edit_bones.active = hidden
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
51
tools/web/generated/M16-GAP-00245.py
Normal file
51
tools/web/generated/M16-GAP-00245.py
Normal file
@@ -0,0 +1,51 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureMoveCollectionArmature"
|
||||
OBJECT_NAME = "WebGapArmatureMoveCollectionObject"
|
||||
MOVE_BONE = "WebGapArmatureMoveCollectionSelected"
|
||||
OTHER_BONE = "WebGapArmatureMoveCollectionOther"
|
||||
SOURCE_COLLECTION = "WebGapArmatureMoveCollectionSource"
|
||||
TARGET_COLLECTION = "WebGapArmatureMoveCollectionTarget"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00245.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)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
move = armature.edit_bones.new(MOVE_BONE)
|
||||
move.head = (-1.0, 0.0, 0.0)
|
||||
move.tail = (-1.0, 1.0, 0.0)
|
||||
other = armature.edit_bones.new(OTHER_BONE)
|
||||
other.head = (1.0, 0.0, 0.0)
|
||||
other.tail = (1.0, 1.0, 0.0)
|
||||
source = armature.collections.new(SOURCE_COLLECTION)
|
||||
armature.collections.new(TARGET_COLLECTION)
|
||||
source.assign(move)
|
||||
source.assign(other)
|
||||
move.select = True
|
||||
move.select_head = True
|
||||
move.select_tail = True
|
||||
other.select = False
|
||||
other.select_head = False
|
||||
other.select_tail = False
|
||||
armature.edit_bones.active = move
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
54
tools/web/generated/M16-GAP-00246.py
Normal file
54
tools/web/generated/M16-GAP-00246.py
Normal file
@@ -0,0 +1,54 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureParentClearArmature"
|
||||
OBJECT_NAME = "WebGapArmatureParentClearObject"
|
||||
PARENT_BONE = "WebGapArmatureParentClearParent"
|
||||
CHILD_BONE = "WebGapArmatureParentClearChild"
|
||||
OTHER_BONE = "WebGapArmatureParentClearOther"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00246.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)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
parent = armature.edit_bones.new(PARENT_BONE)
|
||||
parent.head = (0.0, 0.0, 0.0)
|
||||
parent.tail = (0.0, 1.0, 0.0)
|
||||
child = armature.edit_bones.new(CHILD_BONE)
|
||||
child.head = (0.0, 1.0, 0.0)
|
||||
child.tail = (0.0, 2.0, 0.0)
|
||||
child.parent = parent
|
||||
child.use_connect = True
|
||||
other = armature.edit_bones.new(OTHER_BONE)
|
||||
other.head = (2.0, 0.0, 0.0)
|
||||
other.tail = (2.0, 1.0, 0.0)
|
||||
parent.select = False
|
||||
parent.select_head = False
|
||||
parent.select_tail = False
|
||||
child.select = True
|
||||
child.select_head = True
|
||||
child.select_tail = True
|
||||
other.select = False
|
||||
other.select_head = False
|
||||
other.select_tail = False
|
||||
armature.edit_bones.active = child
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
52
tools/web/generated/M16-GAP-00247.py
Normal file
52
tools/web/generated/M16-GAP-00247.py
Normal file
@@ -0,0 +1,52 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureParentSetArmature"
|
||||
OBJECT_NAME = "WebGapArmatureParentSetObject"
|
||||
PARENT_BONE = "WebGapArmatureParentSetParent"
|
||||
CHILD_BONE = "WebGapArmatureParentSetChild"
|
||||
OTHER_BONE = "WebGapArmatureParentSetOther"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00247.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)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
parent = armature.edit_bones.new(PARENT_BONE)
|
||||
parent.head = (0.0, 0.0, 0.0)
|
||||
parent.tail = (0.0, 1.0, 0.0)
|
||||
child = armature.edit_bones.new(CHILD_BONE)
|
||||
child.head = (0.0, 1.0, 0.0)
|
||||
child.tail = (0.0, 2.0, 0.0)
|
||||
other = armature.edit_bones.new(OTHER_BONE)
|
||||
other.head = (2.0, 0.0, 0.0)
|
||||
other.tail = (2.0, 1.0, 0.0)
|
||||
parent.select = True
|
||||
parent.select_head = True
|
||||
parent.select_tail = True
|
||||
child.select = True
|
||||
child.select_head = True
|
||||
child.select_tail = True
|
||||
other.select = False
|
||||
other.select_head = False
|
||||
other.select_tail = False
|
||||
armature.edit_bones.active = parent
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
46
tools/web/generated/M16-GAP-00248.py
Normal file
46
tools/web/generated/M16-GAP-00248.py
Normal file
@@ -0,0 +1,46 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureRevealArmature"
|
||||
OBJECT_NAME = "WebGapArmatureRevealObject"
|
||||
REVEAL_BONE = "WebGapArmatureRevealHidden"
|
||||
OTHER_BONE = "WebGapArmatureRevealOther"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00248.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)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
hidden = armature.edit_bones.new(REVEAL_BONE)
|
||||
hidden.head = (-1.0, 0.0, 0.0)
|
||||
hidden.tail = (-1.0, 1.0, 0.0)
|
||||
other = armature.edit_bones.new(OTHER_BONE)
|
||||
other.head = (1.0, 0.0, 0.0)
|
||||
other.tail = (1.0, 1.0, 0.0)
|
||||
hidden.select = False
|
||||
hidden.select_head = False
|
||||
hidden.select_tail = False
|
||||
hidden.hide = True
|
||||
armature.edit_bones.active = other
|
||||
other.select = False
|
||||
other.select_head = False
|
||||
other.select_tail = False
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
40
tools/web/generated/M16-GAP-00249.py
Normal file
40
tools/web/generated/M16-GAP-00249.py
Normal file
@@ -0,0 +1,40 @@
|
||||
#!/usr/bin/env python3
|
||||
import math
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureRollClearArmature"
|
||||
OBJECT_NAME = "WebGapArmatureRollClearObject"
|
||||
BONE_NAME = "WebGapArmatureRollClearBone"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00249.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)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
bone = armature.edit_bones.new(BONE_NAME)
|
||||
bone.head = (0.0, 0.0, 0.0)
|
||||
bone.tail = (0.0, 2.0, 0.0)
|
||||
bone.roll = math.pi / 4.0
|
||||
bone.select = True
|
||||
bone.select_head = True
|
||||
bone.select_tail = True
|
||||
armature.edit_bones.active = bone
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
45
tools/web/generated/M16-GAP-00250.py
Normal file
45
tools/web/generated/M16-GAP-00250.py
Normal file
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureSelectAllArmature"
|
||||
OBJECT_NAME = "WebGapArmatureSelectAllObject"
|
||||
PARENT_BONE = "WebGapArmatureSelectAllParent"
|
||||
OTHER_BONE = "WebGapArmatureSelectAllOther"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00250.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)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
parent = armature.edit_bones.new(PARENT_BONE)
|
||||
parent.head = (0.0, 0.0, 0.0)
|
||||
parent.tail = (0.0, 1.0, 0.0)
|
||||
other = armature.edit_bones.new(OTHER_BONE)
|
||||
other.head = (2.0, 0.0, 0.0)
|
||||
other.tail = (2.0, 1.0, 0.0)
|
||||
parent.select = True
|
||||
parent.select_head = True
|
||||
parent.select_tail = True
|
||||
other.select = False
|
||||
other.select_head = False
|
||||
other.select_tail = False
|
||||
armature.edit_bones.active = parent
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
56
tools/web/generated/M16-GAP-00251.py
Normal file
56
tools/web/generated/M16-GAP-00251.py
Normal file
@@ -0,0 +1,56 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureSelectHierarchyArmature"
|
||||
OBJECT_NAME = "WebGapArmatureSelectHierarchyObject"
|
||||
ROOT_BONE = "WebGapArmatureSelectHierarchyRoot"
|
||||
CHILD_BONE = "WebGapArmatureSelectHierarchyChild"
|
||||
OTHER_BONE = "WebGapArmatureSelectHierarchyOther"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00251.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)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
|
||||
root = armature.edit_bones.new(ROOT_BONE)
|
||||
root.head = (0.0, 0.0, 0.0)
|
||||
root.tail = (0.0, 1.0, 0.0)
|
||||
child = armature.edit_bones.new(CHILD_BONE)
|
||||
child.head = (0.0, 1.0, 0.0)
|
||||
child.tail = (0.0, 2.0, 0.0)
|
||||
child.parent = root
|
||||
child.use_connect = True
|
||||
other = armature.edit_bones.new(OTHER_BONE)
|
||||
other.head = (2.0, 0.0, 0.0)
|
||||
other.tail = (2.0, 1.0, 0.0)
|
||||
|
||||
root.select = True
|
||||
root.select_head = True
|
||||
root.select_tail = True
|
||||
child.select = False
|
||||
child.select_head = False
|
||||
child.select_tail = False
|
||||
other.select = False
|
||||
other.select_head = False
|
||||
other.select_tail = False
|
||||
armature.edit_bones.active = root
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
56
tools/web/generated/M16-GAP-00252.py
Normal file
56
tools/web/generated/M16-GAP-00252.py
Normal file
@@ -0,0 +1,56 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureSelectLessArmature"
|
||||
OBJECT_NAME = "WebGapArmatureSelectLessObject"
|
||||
ROOT_BONE = "WebGapArmatureSelectLessRoot"
|
||||
CHILD_BONE = "WebGapArmatureSelectLessChild"
|
||||
OTHER_BONE = "WebGapArmatureSelectLessOther"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00252.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)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
|
||||
root = armature.edit_bones.new(ROOT_BONE)
|
||||
root.head = (0.0, 0.0, 0.0)
|
||||
root.tail = (0.0, 1.0, 0.0)
|
||||
child = armature.edit_bones.new(CHILD_BONE)
|
||||
child.head = (0.0, 1.0, 0.0)
|
||||
child.tail = (0.0, 2.0, 0.0)
|
||||
child.parent = root
|
||||
child.use_connect = True
|
||||
other = armature.edit_bones.new(OTHER_BONE)
|
||||
other.head = (2.0, 0.0, 0.0)
|
||||
other.tail = (2.0, 1.0, 0.0)
|
||||
|
||||
armature.edit_bones.active = root
|
||||
root.select = False
|
||||
root.select_head = True
|
||||
root.select_tail = False
|
||||
child.select = False
|
||||
child.select_head = False
|
||||
child.select_tail = False
|
||||
other.select = True
|
||||
other.select_head = True
|
||||
other.select_tail = True
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
65
tools/web/generated/M16-GAP-00253.py
Normal file
65
tools/web/generated/M16-GAP-00253.py
Normal file
@@ -0,0 +1,65 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureSelectLinkedArmature"
|
||||
OBJECT_NAME = "WebGapArmatureSelectLinkedObject"
|
||||
ROOT_BONE = "WebGapArmatureSelectLinkedRoot"
|
||||
CHILD_BONE = "WebGapArmatureSelectLinkedChild"
|
||||
GRANDCHILD_BONE = "WebGapArmatureSelectLinkedGrandchild"
|
||||
OTHER_BONE = "WebGapArmatureSelectLinkedOther"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00253.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)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
|
||||
root = armature.edit_bones.new(ROOT_BONE)
|
||||
root.head = (0.0, 0.0, 0.0)
|
||||
root.tail = (0.0, 1.0, 0.0)
|
||||
child = armature.edit_bones.new(CHILD_BONE)
|
||||
child.head = (0.0, 1.0, 0.0)
|
||||
child.tail = (0.0, 2.0, 0.0)
|
||||
child.parent = root
|
||||
child.use_connect = True
|
||||
grandchild = armature.edit_bones.new(GRANDCHILD_BONE)
|
||||
grandchild.head = (0.0, 2.0, 0.0)
|
||||
grandchild.tail = (0.0, 3.0, 0.0)
|
||||
grandchild.parent = child
|
||||
grandchild.use_connect = True
|
||||
other = armature.edit_bones.new(OTHER_BONE)
|
||||
other.head = (2.0, 0.0, 0.0)
|
||||
other.tail = (2.0, 1.0, 0.0)
|
||||
|
||||
root.select = True
|
||||
root.select_head = True
|
||||
root.select_tail = True
|
||||
child.select = False
|
||||
child.select_head = False
|
||||
child.select_tail = False
|
||||
grandchild.select = False
|
||||
grandchild.select_head = False
|
||||
grandchild.select_tail = False
|
||||
other.select = False
|
||||
other.select_head = False
|
||||
other.select_tail = False
|
||||
armature.edit_bones.active = root
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
45
tools/web/generated/M16-GAP-00254.py
Normal file
45
tools/web/generated/M16-GAP-00254.py
Normal file
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureSelectLinkedPickArmature"
|
||||
OBJECT_NAME = "WebGapArmatureSelectLinkedPickObject"
|
||||
ROOT_BONE = "WebGapArmatureSelectLinkedPickRoot"
|
||||
CHILD_BONE = "WebGapArmatureSelectLinkedPickChild"
|
||||
GRANDCHILD_BONE = "WebGapArmatureSelectLinkedPickGrandchild"
|
||||
OTHER_BONE = "WebGapArmatureSelectLinkedPickOther"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00254.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)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
root = armature.edit_bones.new(ROOT_BONE)
|
||||
root.head = (0.0, 0.0, 0.0); root.tail = (0.0, 1.0, 0.0)
|
||||
child = armature.edit_bones.new(CHILD_BONE)
|
||||
child.head = (0.0, 1.0, 0.0); child.tail = (0.0, 2.0, 0.0); child.parent = root; child.use_connect = True
|
||||
grandchild = armature.edit_bones.new(GRANDCHILD_BONE)
|
||||
grandchild.head = (0.0, 2.0, 0.0); grandchild.tail = (0.0, 3.0, 0.0); grandchild.parent = child; grandchild.use_connect = True
|
||||
other = armature.edit_bones.new(OTHER_BONE)
|
||||
other.head = (2.0, 0.0, 0.0); other.tail = (2.0, 1.0, 0.0)
|
||||
root.select = True; root.select_head = True; root.select_tail = True
|
||||
child.select = False; child.select_head = False; child.select_tail = False
|
||||
grandchild.select = False; grandchild.select_head = False; grandchild.select_tail = False
|
||||
other.select = False; other.select_head = False; other.select_tail = False
|
||||
armature.edit_bones.active = root
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
bpy.ops.wm.save_as_mainfile(filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
37
tools/web/generated/M16-GAP-00255.py
Normal file
37
tools/web/generated/M16-GAP-00255.py
Normal file
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureSelectMirrorArmature"
|
||||
OBJECT_NAME = "WebGapArmatureSelectMirrorObject"
|
||||
LEFT_BONE = "WebGapSelectMirror.L"
|
||||
RIGHT_BONE = "WebGapSelectMirror.R"
|
||||
CENTER_BONE = "WebGapSelectMirrorCenter"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00255.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)
|
||||
bpy.context.view_layer.objects.active = obj; obj.select_set(True)
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
left = armature.edit_bones.new(LEFT_BONE); left.head = (-2.0, 0.0, 0.0); left.tail = (-2.0, 1.0, 0.0)
|
||||
right = armature.edit_bones.new(RIGHT_BONE); right.head = (2.0, 0.0, 0.0); right.tail = (2.0, 1.0, 0.0)
|
||||
center = armature.edit_bones.new(CENTER_BONE); center.head = (0.0, 0.0, 0.0); center.tail = (0.0, 1.0, 0.0)
|
||||
left.select = True; left.select_head = True; left.select_tail = True
|
||||
right.select = False; right.select_head = False; right.select_tail = False
|
||||
center.select = False; center.select_head = False; center.select_tail = False
|
||||
armature.edit_bones.active = left
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
bpy.ops.wm.save_as_mainfile(filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
36
tools/web/generated/M16-GAP-00256.py
Normal file
36
tools/web/generated/M16-GAP-00256.py
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
import bpy
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureSelectMoreArmature"
|
||||
OBJECT_NAME = "WebGapArmatureSelectMoreObject"
|
||||
ROOT_BONE = "WebGapArmatureSelectMoreRoot"
|
||||
CHILD_BONE = "WebGapArmatureSelectMoreChild"
|
||||
GRANDCHILD_BONE = "WebGapArmatureSelectMoreGrandchild"
|
||||
OTHER_BONE = "WebGapArmatureSelectMoreOther"
|
||||
|
||||
def main():
|
||||
args = sys.argv[sys.argv.index("--") + 1:]
|
||||
if len(args) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00256.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)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
root = armature.edit_bones.new(ROOT_BONE); root.head = (0, 0, 0); root.tail = (0, 1, 0)
|
||||
child = armature.edit_bones.new(CHILD_BONE); child.head = (0, 1, 0); child.tail = (0, 2, 0); child.parent = root; child.use_connect = True
|
||||
grandchild = armature.edit_bones.new(GRANDCHILD_BONE); grandchild.head = (0, 2, 0); grandchild.tail = (0, 3, 0); grandchild.parent = child; grandchild.use_connect = True
|
||||
other = armature.edit_bones.new(OTHER_BONE); other.head = (2, 0, 0); other.tail = (2, 1, 0)
|
||||
root.select = True; root.select_head = True; root.select_tail = True
|
||||
for bone in (child, grandchild, other):
|
||||
bone.select = False; bone.select_head = False; bone.select_tail = False
|
||||
armature.edit_bones.active = root
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
bpy.ops.wm.save_as_mainfile(filepath=str(pathlib.Path(args[0]).resolve()), check_existing=False, compress=True)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
50
tools/web/generated/M16-GAP-00257.py
Normal file
50
tools/web/generated/M16-GAP-00257.py
Normal file
@@ -0,0 +1,50 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureSelectSimilarArmature"
|
||||
OBJECT_NAME = "WebGapArmatureSelectSimilarObject"
|
||||
ACTIVE_BONE = "WebGapArmatureSelectSimilarActive"
|
||||
SIMILAR_BONE = "WebGapArmatureSelectSimilarSameLength"
|
||||
DIFFERENT_BONE = "WebGapArmatureSelectSimilarDifferentLength"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00257.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)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
active = armature.edit_bones.new(ACTIVE_BONE)
|
||||
active.head = (0.0, 0.0, 0.0)
|
||||
active.tail = (0.0, 1.0, 0.0)
|
||||
similar = armature.edit_bones.new(SIMILAR_BONE)
|
||||
similar.head = (2.0, 0.0, 0.0)
|
||||
similar.tail = (2.0, 1.0, 0.0)
|
||||
different = armature.edit_bones.new(DIFFERENT_BONE)
|
||||
different.head = (4.0, 0.0, 0.0)
|
||||
different.tail = (4.0, 2.0, 0.0)
|
||||
active.select = True
|
||||
active.select_head = True
|
||||
active.select_tail = True
|
||||
for bone in (similar, different):
|
||||
bone.select = False
|
||||
bone.select_head = False
|
||||
bone.select_tail = False
|
||||
armature.edit_bones.active = active
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
45
tools/web/generated/M16-GAP-00258.py
Normal file
45
tools/web/generated/M16-GAP-00258.py
Normal file
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureSeparateArmature"
|
||||
OBJECT_NAME = "WebGapArmatureSeparateObject"
|
||||
SELECTED_BONE = "WebGapArmatureSeparateSelected"
|
||||
RETAINED_BONE = "WebGapArmatureSeparateRetained"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00258.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)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
selected = armature.edit_bones.new(SELECTED_BONE)
|
||||
selected.head = (0.0, 0.0, 0.0)
|
||||
selected.tail = (0.0, 1.0, 0.0)
|
||||
retained = armature.edit_bones.new(RETAINED_BONE)
|
||||
retained.head = (2.0, 0.0, 0.0)
|
||||
retained.tail = (2.0, 1.0, 0.0)
|
||||
selected.select = True
|
||||
selected.select_head = True
|
||||
selected.select_tail = True
|
||||
retained.select = False
|
||||
retained.select_head = False
|
||||
retained.select_tail = False
|
||||
armature.edit_bones.active = selected
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
26
tools/web/generated/M16-GAP-00259.py
Normal file
26
tools/web/generated/M16-GAP-00259.py
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
import bpy
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureShortestPathArmature"
|
||||
OBJECT_NAME = "WebGapArmatureShortestPathObject"
|
||||
ROOT_BONE = "WebGapArmatureShortestPathRoot"
|
||||
CHILD_BONE = "WebGapArmatureShortestPathChild"
|
||||
GRANDCHILD_BONE = "WebGapArmatureShortestPathGrandchild"
|
||||
OTHER_BONE = "WebGapArmatureShortestPathOther"
|
||||
|
||||
def main():
|
||||
args = sys.argv[sys.argv.index("--") + 1:]
|
||||
if len(args) != 1: raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00259.py -- OUTPUT")
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
arm = bpy.data.armatures.new(ARMATURE_NAME); obj = bpy.data.objects.new(OBJECT_NAME, arm); bpy.context.scene.collection.objects.link(obj)
|
||||
bpy.context.view_layer.objects.active = obj; obj.select_set(True); bpy.ops.object.mode_set(mode="EDIT")
|
||||
root = arm.edit_bones.new(ROOT_BONE); root.head=(0,0,0); root.tail=(0,1,0)
|
||||
child = arm.edit_bones.new(CHILD_BONE); child.head=(0,1,0); child.tail=(0,2,0); child.parent=root; child.use_connect=True
|
||||
grand = arm.edit_bones.new(GRANDCHILD_BONE); grand.head=(0,2,0); grand.tail=(0,3,0); grand.parent=child; grand.use_connect=True
|
||||
other = arm.edit_bones.new(OTHER_BONE); other.head=(2,0,0); other.tail=(2,1,0)
|
||||
for bone in (root, child, grand): bone.select=True; bone.select_head=True; bone.select_tail=True
|
||||
other.select=False; other.select_head=False; other.select_tail=False; arm.edit_bones.active=root
|
||||
bpy.ops.object.mode_set(mode="OBJECT"); bpy.ops.wm.save_as_mainfile(filepath=str(pathlib.Path(args[0]).resolve()), check_existing=False, compress=True)
|
||||
if __name__ == "__main__": main()
|
||||
11
tools/web/generated/M16-GAP-00260.py
Normal file
11
tools/web/generated/M16-GAP-00260.py
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib,sys,bpy
|
||||
ARMATURE_NAME="WebGapArmatureSplitArmature"; OBJECT_NAME="WebGapArmatureSplitObject"; ROOT_BONE="WebGapArmatureSplitRoot"; CHILD_BONE="WebGapArmatureSplitChild"; OTHER_BONE="WebGapArmatureSplitOther"
|
||||
def main():
|
||||
a=sys.argv[sys.argv.index("--")+1:]
|
||||
if len(a)!=1: raise SystemExit("usage")
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True); arm=bpy.data.armatures.new(ARMATURE_NAME); obj=bpy.data.objects.new(OBJECT_NAME,arm); bpy.context.scene.collection.objects.link(obj); bpy.context.view_layer.objects.active=obj; obj.select_set(True); bpy.ops.object.mode_set(mode="EDIT")
|
||||
root=arm.edit_bones.new(ROOT_BONE); root.head=(0,0,0); root.tail=(0,1,0); child=arm.edit_bones.new(CHILD_BONE); child.head=(0,1,0); child.tail=(0,2,0); child.parent=root; child.use_connect=True; other=arm.edit_bones.new(OTHER_BONE); other.head=(2,0,0); other.tail=(2,1,0); root.select=True; root.select_head=True; root.select_tail=True
|
||||
for b in (child,other): b.select=False; b.select_head=False; b.select_tail=False
|
||||
arm.edit_bones.active=root; bpy.ops.object.mode_set(mode="OBJECT"); bpy.ops.wm.save_as_mainfile(filepath=str(pathlib.Path(a[0]).resolve()),check_existing=False,compress=True)
|
||||
if __name__=="__main__": main()
|
||||
11
tools/web/generated/M16-GAP-00261.py
Normal file
11
tools/web/generated/M16-GAP-00261.py
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib, sys, bpy
|
||||
|
||||
ARMATURE_NAME="WebGapArmatureSubdivideArmature"; OBJECT_NAME="WebGapArmatureSubdivideObject"; SOURCE_BONE="WebGapArmatureSubdivideSource"; OTHER_BONE="WebGapArmatureSubdivideOther"
|
||||
def main():
|
||||
args=sys.argv[sys.argv.index("--")+1:]
|
||||
if len(args)!=1: raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00261.py -- OUTPUT")
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True); arm=bpy.data.armatures.new(ARMATURE_NAME); obj=bpy.data.objects.new(OBJECT_NAME,arm); bpy.context.scene.collection.objects.link(obj); bpy.context.view_layer.objects.active=obj; obj.select_set(True); bpy.ops.object.mode_set(mode="EDIT")
|
||||
source=arm.edit_bones.new(SOURCE_BONE); source.head=(0,0,0); source.tail=(0,1,0); other=arm.edit_bones.new(OTHER_BONE); other.head=(2,0,0); other.tail=(2,1,0); source.select=True; source.select_head=True; source.select_tail=True; other.select=False; other.select_head=False; other.select_tail=False; arm.edit_bones.active=source
|
||||
bpy.ops.object.mode_set(mode="OBJECT"); bpy.ops.wm.save_as_mainfile(filepath=str(pathlib.Path(args[0]).resolve()),check_existing=False,compress=True)
|
||||
if __name__=="__main__": main()
|
||||
11
tools/web/generated/M16-GAP-00262.py
Normal file
11
tools/web/generated/M16-GAP-00262.py
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib,sys,bpy
|
||||
ARMATURE_NAME="WebGapArmatureSwitchDirectionArmature"; OBJECT_NAME="WebGapArmatureSwitchDirectionObject"; ROOT_BONE="WebGapArmatureSwitchDirectionRoot"; CHILD_BONE="WebGapArmatureSwitchDirectionChild"; OTHER_BONE="WebGapArmatureSwitchDirectionOther"
|
||||
def main():
|
||||
a=sys.argv[sys.argv.index("--")+1:];
|
||||
if len(a)!=1: raise SystemExit("usage")
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True);arm=bpy.data.armatures.new(ARMATURE_NAME);obj=bpy.data.objects.new(OBJECT_NAME,arm);bpy.context.scene.collection.objects.link(obj);bpy.context.view_layer.objects.active=obj;obj.select_set(True);bpy.ops.object.mode_set(mode="EDIT")
|
||||
root=arm.edit_bones.new(ROOT_BONE);root.head=(0,0,0);root.tail=(0,1,0);child=arm.edit_bones.new(CHILD_BONE);child.head=(0,1,0);child.tail=(0,2,0);child.parent=root;child.use_connect=True;other=arm.edit_bones.new(OTHER_BONE);other.head=(2,0,0);other.tail=(2,1,0)
|
||||
for b in (root,child):b.select=True;b.select_head=True;b.select_tail=True
|
||||
other.select=False;other.select_head=False;other.select_tail=False;arm.edit_bones.active=root;bpy.ops.object.mode_set(mode="OBJECT");bpy.ops.wm.save_as_mainfile(filepath=str(pathlib.Path(a[0]).resolve()),check_existing=False,compress=True)
|
||||
if __name__=="__main__":main()
|
||||
45
tools/web/generated/M16-GAP-00263.py
Normal file
45
tools/web/generated/M16-GAP-00263.py
Normal file
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ARMATURE_NAME = "WebGapArmatureSymmetrizeArmature"
|
||||
OBJECT_NAME = "WebGapArmatureSymmetrizeObject"
|
||||
SOURCE_BONE = "WebGapArmatureSymmetrizeSource.L"
|
||||
OTHER_BONE = "WebGapArmatureSymmetrizeOther"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00263.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)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
source = armature.edit_bones.new(SOURCE_BONE)
|
||||
source.head = (1.0, 0.0, 0.0)
|
||||
source.tail = (1.0, 1.0, 0.0)
|
||||
other = armature.edit_bones.new(OTHER_BONE)
|
||||
other.head = (-3.0, 0.0, 0.0)
|
||||
other.tail = (-3.0, 1.0, 0.0)
|
||||
source.select = True
|
||||
source.select_head = True
|
||||
source.select_tail = True
|
||||
other.select = False
|
||||
other.select_head = False
|
||||
other.select_tail = False
|
||||
armature.edit_bones.active = source
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user