3
$\begingroup$

I want to create a short animation from a series of png image files rendered in another animation program with VSE. I add the effect strip Alpha Under with several transparent overlays PNG files that contain title information, watermark and logo to achieve the desired look. This structure works well and gives the desired result.

I have to repeat this process for a twenty different animations. The number of images imported is always the same, and they are always the same x and y dimension, just different in appearance with unique titles overlays. I would like to use Python to update the data/files paths for all of the assets used as inputs to the VSE, and update the animation output directory.

I am pretty new to Python, but have coded in C++ in the distant past. I am unsure how to programatically select a track in the VSE and bpy.ops.sequencer.change_path() and bpy.ops.sequencer.reload() to update the VSE structure.

VSE tracks

$\endgroup$
1

2 Answers 2

1
$\begingroup$

There are many great VSE add ons that you could look at for inspiration. Also consider reducing your complexity. Perhaps you could create sub scenes, each containing the png sequence you need. then you could iterate those scene strips in your master VSE scene.

After setting up a repetition of the strip stacks (in the master scene) you could make a simple command line render of the master scene with an array for start / end frames to give you discreet composited renders.

$\endgroup$
1
  • $\begingroup$ Need some clarification. 1. Create scene "sub scene 1" each for composition 2. Duplicate "Full copy" scene "sub scene 2" 3. Replace sequence fottage in "sub scene 2" 4. Repeat for required number of sub-scenes 5. Master scene step !! ? Can you pls detail out the process you mentioned please $\endgroup$
    – ashwin
    Commented Apr 4, 2015 at 14:21
1
$\begingroup$

So far all I have is

import bpy

scn = bpy.context.scene
x = scn.sequence_editor.sequences.new_image("bacon", "/var/tmp/blender/unit-blocks-s2/0001.png", 3, 1)
print(x)
for i in range(2,200):
    x.elements.append("%04d.png" % i)

au = scn.sequence_editor.sequences.new_effect("eggs", 'TRANSFORM', 4, 1, len(x.elements), x)
au.update()

print(au)

The 'ALPHA_UNDER' effect strip requires two input strips, and I'm not sure what the second one would be in your project.

Is this enough to get you started? Feel free to comment on this answer or refine your question.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .