ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

AfterEffectsExpressions, PropertyIndex question

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Assaf Goldlust
AfterEffectsExpressions, PropertyIndex question
on Feb 23, 2018 at 2:34:09 pm
Last Edited By Assaf Goldlust on Feb 23, 2018 at 2:37:54 pm

So im learning how to use expressions with the book "AE Expression".

He reached when he applies the next expression on a 4 color gadient:
effect("4-Color Gradient").param(propertyIndex - 2).valueAtTime(time - .5)

After reciving an error when tried to apply the expression i googled for answered and i found this:


I think the problem is that when the book was written, thisProperty was implied when referring to attributes of the property housing the expression. Somewhere along the line it was changed so that now you have to explicitly include it. This should work:

effect("4-Color Gradient").param(thisProperty.propertyIndex - 2).valueAtTime(time - .5)

Dan


That one left me confused, if "thisPoperty" was used back then for the property that holds the expression.
what does that mean today?


Return to posts index

Dan Ebberts
Re: AfterEffectsExpressions, PropertyIndex question
on Feb 23, 2018 at 4:55:12 pm

Same thing. It used to be that you could just say

propertyIndex

and the expression engine would assume you meant

thisProperty.propertyIndex

and no error was generated. Now you have to include thisProperty to avoid the error.

Dan



Return to posts index

Assaf Goldlust
Re: AfterEffectsExpressions, PropertyIndex question
on Mar 2, 2018 at 8:56:03 pm

Thanks,
but is there a reson for why you still need to user propertyindex?

why is it not possible to just write:

effect("4-Color Gradient").param(thisProperty, - 2).valueAtTime(time - .5)



thisComp.layer(thisLayer, + 1).transform.rotation . valueAtTime(time − .5)
why there is a need for a comma between the "thisLayer" and the "+1"


Return to posts index

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