I'm looking to do the equivalent of an option-drag of one comp onto another in the project window. Is there such a method for a CompItem?
I'll write my own function if necessary, of course, but I really don't want to reinvent the wheel.
Is it possible to do a global source-replace on a comp?
Moderator: Paul Tuersley
- redefinery
- Posts: 112
- Joined: April 1st, 2005, 8:16 pm
- Location: CA
- Contact:
hi aaron,Aaron Cobb wrote:I'm looking to do the equivalent of an option-drag of one comp onto another in the project window. Is there such a method for a CompItem?
there's nothing built-in to do that, so you'll need to roll your own. if you have CS3, you can use the new AVLayer replaceSource() method to redirect to the new comp that you want to use.
:jeff
-
- Posts: 10
- Joined: September 10th, 2007, 12:22 pm
Thanks for confirming this.redefinery wrote:hi aaron,Aaron Cobb wrote:I'm looking to do the equivalent of an option-drag of one comp onto another in the project window. Is there such a method for a CompItem?
there's nothing built-in to do that, so you'll need to roll your own. if you have CS3, you can use the new AVLayer replaceSource() method to redirect to the new comp that you want to use.
:jeff
I've tried to use the replaceSource() method of a layer and it doesn't work. I've got CS3 on a Mac Pro.
I couldn't even find the replaceSource() method in the scripting guide.
I've known that you can alt drag an item on a layer and replace that layer's source; I didn't know that you could alt drag an item in the project window on top of another item in the project window and it will do a global replace. This is handy but I'd prefer it'd be automated.
Does the replaceSource work on your end?
I couldn't even find the replaceSource() method in the scripting guide.
I've known that you can alt drag an item on a layer and replace that layer's source; I didn't know that you could alt drag an item in the project window on top of another item in the project window and it will do a global replace. This is handy but I'd prefer it'd be automated.
Does the replaceSource work on your end?
-
- Posts: 10
- Joined: September 10th, 2007, 12:22 pm
It works fine for me. replaceSource is documented on page 47 of the AE CS3 scripting guide. It is a member of the AVLayer class and takes two parameters, an AVItem (newSource) and a boolean value (fixExpressions).cob906 wrote:I've tried to use the replaceSource() method of a layer and it doesn't work. I've got CS3 on a Mac Pro.
I couldn't even find the replaceSource() method in the scripting guide.
I've known that you can alt drag an item on a layer and replace that layer's source; I didn't know that you could alt drag an item in the project window on top of another item in the project window and it will do a global replace. This is handy but I'd prefer it'd be automated.
Does the replaceSource() work on your end?
Oh man! I was looking at the AE 7 scripting guide.
Thanks for responding so quickly! I guess I need more sleep

Thanks for responding so quickly! I guess I need more sleep

i wrote a jsx that does this perfectly for huge ae projects. it can replace anything.
http://forums.creativecow.net/readpost/50/857857
http://forums.creativecow.net/readpost/50/857857