script to replace layers in compositions

What type of scripts do you need?

Moderator: byronnash

Post Reply
amitzinman
Posts: 17
Joined: November 22nd, 2007, 4:56 am
Location: Tel Aviv
Contact:

Hi,

This happened to me on the last project I was working on. I has to create a "video slide show" of 200 employees.
So I designed one comp and created 199 duplicates and replaced video layers on each comp.
Then I used a bunch of scripts and presets to control the comps in 3D space (Schofield's preset and Video Copilot's SureTarget 2) which are freeliy available on the Internet.
Now I'm thinking, come next project I will have to do much less work since I already have a ready made project with all the calculations made, but I will still have to repopulate a lot of comps.
Which made me wonder... how complex would it be to create a script to replace video layers inside of a lot of comps with video files from a folder? I guess such a script would also need to take into account the ability to scale the video fils.

Amit
User avatar
lloydalvarez
Enhancement master
Posts: 460
Joined: June 17th, 2004, 9:27 am
Location: New York City, NY
Contact:

Hi Amit,

Take a look at my Immigration script. Might do what you need. http://aescripts.com/immigration

-Lloyd
amitzinman
Posts: 17
Joined: November 22nd, 2007, 4:56 am
Location: Tel Aviv
Contact:

Just watched a tutorial for immigration, and then remembered I actually know of it.
However, it doesn't help me with this particular type of project. I am not using multi-passes.
A more concrete definition of what I need is a script taking a single comp with a video layer, duplicating it N times and replacing the video layers from those taken from a folder or several folders.
Why is that? I created a very nice video/stills slideshow in 3D space suitable for corporate departments who want all their employees displayed in 3 minutes. You'd be amazed how many times I am asked to do that. However, next time I am asked to do that I do not know how the files will be handed to me, what will be the quantity, in what number of folders or even if it will be video or stills files.
I hope this is clearer :)
User avatar
lloydalvarez
Enhancement master
Posts: 460
Joined: June 17th, 2004, 9:27 am
Location: New York City, NY
Contact:

Are these pictures? Why can't you take your project, select all the existing photos in the project window and use immigration to batch replace them with the new photos?

-Lloyd
amitzinman
Posts: 17
Joined: November 22nd, 2007, 4:56 am
Location: Tel Aviv
Contact:

I might be missing something, but doesn't immigration only works on already existing footage or when importing a folder hirearcy?
To re-iterate, I now have 200 compositions each with its own video layers. However, next project could be with 90 compositions with jpeg layers.
Point is I need to be able to replicate compositions and populate them with footage from a folder, because maybe in the next project I will need to build a whole new mechanism for displaying these layers inside a precomp. So to begin with I will have a single well designed precomp and will have to create a lot of duplicates and populate them.
To sum, though immigration is definitely a formidable tool, it is both an overkill and somewhat not exactly right for this type of really common work.
Instead, I would like to have a script look at single comp, have an input for number of the layer to be replaced, an input for scaling (really important) and of course browse for a folder and then replicate the folder with the new video/photo files that are selected.
User avatar
lloydalvarez
Enhancement master
Posts: 460
Joined: June 17th, 2004, 9:27 am
Location: New York City, NY
Contact:

Not to keep harping but I am eager to help you out :-) Let me see if I can follow along. Let's do a simplified example.

You have a project that you already created with 10 comps that each have 100 photo layers that are already animated in a way that you like. Now you want an easy way of replacing the photos in those comps with new photos but keep the existing animation. Finally you need to be able to control the scale of those layers since the new photos are not necessarily the same size as the old photos.

Is this correct?
amitzinman
Posts: 17
Joined: November 22nd, 2007, 4:56 am
Location: Tel Aviv
Contact:

lloydalvarez wrote:Not to keep harping but I am eager to help you out :-) Let me see if I can follow along. Let's do a simplified example.

You have a project that you already created with 10 comps that each have 100 photo layers that are already animated in a way that you like. Now you want an easy way of replacing the photos in those comps with new photos but keep the existing animation. Finally you need to be able to control the scale of those layers since the new photos are not necessarily the same size as the old photos.

Is this correct?
This not exactly it. I do appreciate any kind of help that is given in this terrific site, really I do.
Simplified version:
I have a project with one comp that I created with a single video layer and a few illustrator layers that serve as a frame and as a back layer to make it pretty and 3D. Now I need to create 200 comps using this comp as a template but with different video files.
I guess not really needing scale for this example.

However, in more complex cases I might already have created these 200 comps and set up a nice animation for them but would like to replace all the video layers with jpeg images that are way bigger than the video files. I guess I could resize the jpeg files themselves, but why do that when collapse transformations would enable me to scale the comps while still having them look great. So, a scale option could come handy here.
amitzinman
Posts: 17
Joined: November 22nd, 2007, 4:56 am
Location: Tel Aviv
Contact:

so, any ideas?
User avatar
lloydalvarez
Enhancement master
Posts: 460
Joined: June 17th, 2004, 9:27 am
Location: New York City, NY
Contact:

Hi Amit,

For example 1 you will need a custom script as I am not aware of anything out there that will do this. For example 2, Immigration can be your friend but it all depends on the names of the files so a bit of a wild card here. And it will not provide a scale option.. that will also require a custom script. Example 1 should not be too hard.. I suspect example 2 would be much more complicated. Send me an email and I might be able to help you with example 1. You can get my email by going to aescripts and checking in the about box.

-Lloyd
amitzinman
Posts: 17
Joined: November 22nd, 2007, 4:56 am
Location: Tel Aviv
Contact:

Therer is an e-mail address for the site, is that the one you mean?
lloydalvarez wrote:Hi Amit,

For example 1 you will need a custom script as I am not aware of anything out there that will do this. For example 2, Immigration can be your friend but it all depends on the names of the files so a bit of a wild card here. And it will not provide a scale option.. that will also require a custom script. Example 1 should not be too hard.. I suspect example 2 would be much more complicated. Send me an email and I might be able to help you with example 1. You can get my email by going to aescripts and checking in the about box.

-Lloyd
Post Reply