Skip to main content
March 26, 2019
Answered

How to change image content from script?

  • March 26, 2019
  • 1 reply
  • 1786 views

Hello,

I am using Abode After Effects 2019 and I have the following problem: I have an image in my composition. I need to write a script that

substitutes it's content from several different image files from disk based on some criteria.

Something like (in pseudo-code)

var xxx;

if (xxx==1)

  comp.layer.image.src_path="/path/to/img/1.png";

else if (xxx==2)

  comp.layer.image.src_path="/path/to/img/2.png";

...

But I can't find information about how to control image's content from script.

Can you please help me?

Thanks.

This topic has been closed for replies.
Correct answer Tomas Sinkunas

You should be looking at replaceSource() method http://docs.aenhancers.com/layers/avlayer/?highlight=replacesource#avlayer-replacesource or replace() for a footage item http://docs.aenhancers.com/items/footageitem/#footageitem-replace

1 reply

Tomas Sinkunas
Tomas SinkunasCorrect answer
Legend
March 26, 2019