Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity › Forums › Adobe After Effects Expressions › How to change / setValue of controllers via expression?

  • How to change / setValue of controllers via expression?

    Posted by Hannes Holtermann on February 24, 2021 at 5:43 pm

    Hi there,

    is there any way I can change the value of expression controllers (slider, point, color etc) via expression? I can’t seem to find an answer to this as a simple:

    effect(“Offset”)(“ADBE Slider Control-0001”) = 30;

    Results in a “cannot assign value” error.

    There must be some way to do this, right?

    Thanks!

    Dan Ebberts
    replied 5 years, 7 months ago
    2 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    February 24, 2021 at 6:38 pm

    An expression can only affect the value of the property hosting the expression. So you could only change the value of the controller with an expression applied to that controller (unless you use a script, which is a whole different story).

  • Hannes Holtermann

    February 24, 2021 at 6:46 pm

    Hi Dan,

    thanks for your response. Quite a legend you are. 🙂

    So: I’m trying to change the value of the slider that is on the very same layer and is supposed to handle the position of the element. This is related to my other question https://creativecow.net/forums/thread/auto-slide-null-to-position-on-marker/

    The idea is to use the slider to save the current state of the offset to which I can then add another offset.

    So there’s no way for an expression to change the value of the controller even if it’s on the same layer, right? Bummers 🙁

    Would you happen to have a good reading resource on how to set this up via a script?

    Thanks!

    Auto-slide Null to position on marker

  • Dan Ebberts

    February 24, 2021 at 8:27 pm

    >So there’s no way for an expression to change the value of the controller even if it’s on the same layer, right

    That’s correct, unless the expression is on that controller’s value.

    >Would you happen to have a good reading resource on how to set this up via a script?

    There are some online training courses available (some free, I think), but first you need to decide if scripting will provide a workable solution. Expressions are live and immediate, where scripts are generally run only when you initiate them. So if setting the value of the expression controller is a one-shot thing, a script might be the way to go, but if you need the value to be updated automatically based on other values, then it’s probably not the right tool.

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