Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions AfterEffectsExpressions, PropertyIndex question

  • AfterEffectsExpressions, PropertyIndex question

    Posted by Assaf Goldlust on February 23, 2018 at 2:34 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?

    Assaf Goldlust replied 8 years, 2 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    February 23, 2018 at 4:55 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

  • Assaf Goldlust

    March 2, 2018 at 8:56 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”

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy