ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Re: Replace Footage Script

COW Forums : Adobe After Effects Expressions

FAQ   •   VIEW ALL   •   ADD A NEW POST   •   PRINT
Respond to this post   •   Return to posts index   •   Read entire thread


Davis LindsayRe: Replace Footage Script
by on Apr 26, 2012 at 4:46:43 pm

Ah, that solves one error message.
I was missing .layer(3) to define what I was replacing.

error:
Unable to call “replaceSource” because of parameter 1. [object TextLayer] is not of the correct type.

perhaps my vision of the item / layer structure isn't correct?

root
-main folder
-_template comp
--text layer
--text layer
--video I want to replace
--text layer
-movs folder
--video
--video 2

proj
-item(1)
--.item(1)
---.layer(1)
---.layer(2)
---.layer(3)
---.layer(4)
-item(2)
--.layer(1)
--.layer(2)

//Creates a new project
var proj = app.project;

proj.item(1).item(1).layer(3).replaceSource(proj.item(2).layer(2),true);


Posts IndexRead Thread 


Current Message Thread:





© 2016 CreativeCOW.net All Rights Reserved
[TOP]