Page 1 of 1

Option (Alt) replace method

Posted: August 4th, 2011, 7:16 am
by slawes
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

Re: Option (Alt) replace method

Posted: August 4th, 2011, 9:11 am
by Dan Ebberts
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

Re: Option (Alt) replace method

Posted: August 4th, 2011, 9:48 am
by slawes
Thanks Dan, I was thinking I might have to do this, but was hoping for a simpler approach.

-Stephen