Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects After Effects Expression

  • After Effects Expression

    Posted by Moira Elefson on January 4, 2019 at 9:31 pm


    Im having a small problem with an expression in after effects
    The Output is Min/Max 0/1
    It should do if(Output>0)
    v=1080
    else v=0

    And the shape Layer should change the size
    size(x;y) –> (10;v)

    Jeff Kay replied 7 years, 5 months ago 2 Members · 1 Reply
  • 1 Reply
  • Jeff Kay

    January 4, 2019 at 11:17 pm

    There is a whole mess of incorrect syntax in this. (What does the error message say?)

    The If/Else you are telling it just numbers and it doesn’t know what to do with this and will always return an error. Typically something like
    if (*expression link*)
    {
    v=1080;
    }
    else
    {
    v=0;
    }

    value() is not a argument, inside of AE value [with no parenthesis] will return the keyframed value of the property before any expression has been applied. Value is automatically the same array as the property itself.

    If you want to use a variable (I assume you want to use v), it has to be defined and have a value.

    I don’t know of what Size is a property, but it is an array of 2 and I think that expression is going to return an array of 1.

    Try this

    if (*expression link*)
    {
    var=1080;
    }
    else
    {
    var=0;
    }
    [10,var];

    I don’t know what that expression links to, but if that value is > 0 this will return [10,1080] and if that value is <=0 then it will return [10,0]

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