Private
Public Access
21 lines
957 B
Python
21 lines
957 B
Python
"""Replace the concluding photo with the rendered scanner viewpoint."""
|
|
import bpy
|
|
from pathlib import Path
|
|
OUT=Path(__file__).resolve().parents[1]/'preview/v4'
|
|
bpy.ops.wm.open_mainfile(filepath=str(OUT/'halloween_group_photo.blend'))
|
|
s=bpy.context.scene
|
|
for strip in s.sequence_editor.sequences:
|
|
if strip.name.startswith('Group snapshot'):
|
|
strip.directory=str(OUT)+'/'
|
|
strip.elements[0].filename='gruppenfoto_scanner.png'
|
|
if strip.name=='Photo file':
|
|
strip.text='gruppenfoto_scanner.png | SCANNER IM GRABSTEIN'
|
|
s.render.image_settings.file_format='FFMPEG'
|
|
s.render.filepath=str(OUT/'halloween_scanner_group_photo.mp4')
|
|
bpy.ops.file.pack_all()
|
|
bpy.ops.wm.save_as_mainfile(filepath=str(OUT/'halloween_scanner_group_photo.blend'))
|
|
bpy.ops.render.render(animation=True)
|
|
s.render.image_settings.file_format='PNG';s.frame_set(510)
|
|
s.render.filepath=str(OUT/'scanner_group_photo_end.png')
|
|
bpy.ops.render.render(write_still=True)
|