Activity › Forums › Adobe After Effects Expressions › Change image through expression
-
Change image through expression
Posted by Shai Russo on June 5, 2012 at 6:48 amHi
I am using the “Expressions and External Documents from” to Change text
is there any way to change picture In this way
shai
Dan Fredley replied 14 years, 1 month ago 3 Members · 2 Replies -
2 Replies
-
Dan Fredley
June 5, 2012 at 8:27 pmIt seems that there are much easier ways of going about this depending on what you are trying to accomplish. But here is one way you could feasibly do it with expressions.
Assuming you have a data file with the image names on each line and assuming your text layer reading the data file is the first layer of each comp, you would have to put every single image into each composition with this Opacity expression:
(thisComp.layer(1).text.sourceText == thisLayer.name) ? 100 : 0This expression sets opacity to 100 if the name matches or sets it to 0 if it doesn’t. This is only helpful if you’re trying to match a lot of images with specific text in separate compositions. Otherwise it’d probably be better to just import the images into separate compositions using built-in tools and scripts.
If you import the images using “New Composition from Selection” then choose multiple compositions, you could use the names of the images as your comp names in your data file to match the text.
Dan Fredley
Reply to this Discussion! Login or Sign Up