ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

link value effect above on same layer

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
JuanLuis Vich
link value effect above on same layer
on Jun 14, 2020 at 3:28:27 pm

hi!

How it would look like to have access to the effects index on the same layer, to link some effects to the effect above?
I have a drop shadow effect, and I'd like to duplicate it several times, and always have variatons from the Shadow Color on the effect above. Is that possible?

Thanks!


Return to posts index

Dan Ebberts
Re: link value effect above on same layer
on Jun 14, 2020 at 6:07:51 pm

You could try this:


p = thisProperty;
idx = p.propertyIndex;
effectIdx = p.propertyGroup(1).propertyIndex;
if (effectIdx != 1)
p.propertyGroup(2)(effectIdx-1)(idx).value
else
value


If the effect above could possibly be a different effect, you may want to add some defensive code to avoid an expression error (or unexpected result) in that case.

Dan



Return to posts index

JuanLuis Vich
Re: link value effect above on same layer
on Jun 15, 2020 at 7:02:50 am

Awesome, thank you!


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2020 CreativeCOW.net All Rights Reserved
[TOP]