Continue Blender Web parity task handoff
This commit is contained in:
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()
|
||||
Reference in New Issue
Block a user