I'm new to AE Scripting and have had a very hard time trying to find best way to swap out footage within a given layer with alternate footage (chosen from the project window) -- I am able to do a (global) "replace" of footage file, but I can't seem to get it to do something like "ReplaceLayerWithFootage XYZ" --
This would seem to be a very common use for scripting (e.g. batching movies where one graphic or sound changes/swaps in within each separate Comp in a series) but I haven't been able to find one easy example!
I have gotten good results with the Lower Thirds Example from Xcel/CSV and would like to do something similar with footage files (once they are all imported into project) -- anyone have sample syntax etc?
Sorry if this is a silly question! Thanks, Ken
Quick question re: swapping footage within layer
Moderator: byronnash
-
- Posts: 704
- Joined: June 5th, 2004, 7:59 am
- Location: London, UK
You're correct, there's no easy way of doing this right now.
If it's any consolation, here's an interesting nugget from the CS3 scripting guide:
viewtopic.php?t=639
AVLayer replaceSource() method
app.project.item(index).layer(index).replaceSource (newSource, fixExpressions)
Description: Replaces the source for this layer.
Parameters
newSource The new source AVItem object.
fixExpressions: True to adjust expressions for the new source, false otherwise.
Returns: Nothing.
If it's any consolation, here's an interesting nugget from the CS3 scripting guide:
viewtopic.php?t=639
AVLayer replaceSource() method
app.project.item(index).layer(index).replaceSource (newSource, fixExpressions)
Description: Replaces the source for this layer.
Parameters
newSource The new source AVItem object.
fixExpressions: True to adjust expressions for the new source, false otherwise.
Returns: Nothing.