Script to replace footage

What type of scripts do you need?

Moderator: byronnash

Post Reply
philspitler
Posts: 39
Joined: November 2nd, 2005, 10:20 am
Contact:

Hi, I would love a script that can go through an entire project file and replace any QT files with a certain suffix with files with a different suffix.

Ie.

replace shot01_offline.mov with shot01_online.mov

I would love to be able to understand and write this myself but that isn't gonna happen.

Dan gave me a clue that i should use the "replaceSource()" command but i have no idea how to get started.

I would love if somebody could get me started.

Thanks.

Phil
Phil Spitler
Dan Ebberts
Posts: 320
Joined: June 26th, 2004, 10:01 am
Location: Folsom, CA
Contact:

Hey Phil,

I think the basic flow would go like this:

Loop through the items in the project bin looking for any CompItem.

For each comp, loop through each layer to see if its source is of the type you want to replace.

For each source to be replaced, loop through the items in the project bin looking for the FootageItem with the same source name but with the replacement suffix.

Use sourceReplace() on the layer.

This assumes all your replacement footage is already loaded into the project. If not, there's more work to do. :-)


Dan
Post Reply