Preset/macro for complicated nested effect I have a few animations that I need to do with some frequency, the steps are as follows:


Generate the image from an external program from a template.
Add the image to the second nest in a doubly-nested sequence.
Determine how long the image should play and apply two animation (motion) presets I made, clamped to the in and out of the image. The animation presets are the same, but since they depend on the in and out I have to determine the length first. (Scaling messes up some of the intermediate keys).
Add some audio at the beginning and end of the image (same audio, but clamped to the in and out).
Add a matte image (same every time) to the first nest, and apply a track matte effect on the second nest referring to it (same every time).


The image is always of the same resolution.

This is very time consuming and I have to do it 5-10 times per video I make. Is there any way I can build some sort of macro that does this (except part 1, obviously)? Preferably it would automate as much as possible. Ideally, I could give it an image and a length parameter and it would generate the whole thing, but even automating just the nesting and track matte would save a lot of time.

Can I make a macro/preset that I can use across projects that does this? I don't have any experience with the Premiere API, but I have programming experience if this would be really straightforward by writing a plugin.
I'd try to export a sample project as XML and then let a script change the necessary parts of the XML project file.