Option (Alt) replace method

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
slawes
Posts: 25
Joined: December 9th, 2006, 12:38 pm
Location: LA, California

August 4th, 2011, 7:16 am

Would anyone know whether there is a script command to do the same action as Option (Alt) replace an item in the project window ?
Basically I want to (via a script I have already have) create a comp and then replace another comp with the new one which would include every instance it is used.

Thanks,
Stephen
Dan Ebberts
Posts: 319
Joined: June 26th, 2004, 10:01 am
Location: Folsom, CA
Contact:

August 4th, 2011, 9:11 am

I think you're going to have to do it the long way. That is, get the usedIn array for the comp you want to replace, and for each comp in that array, go through all the layers looking for layers whose source is the comp to be replaced--then do a replaceSource(), pointing those layers to the new comp. Sorry if you already knew how to do it.

Dan
slawes
Posts: 25
Joined: December 9th, 2006, 12:38 pm
Location: LA, California

August 4th, 2011, 9:48 am

Thanks Dan, I was thinking I might have to do this, but was hoping for a simpler approach.

-Stephen
Post Reply