Forum Replies Created

  • David Henion

    September 26, 2020 at 11:50 am in reply to: Link frame values to audio amplitude

    If I remember right, older versions of AE required all return values to be sent with brackets, even a scalar value like an integer. Maybe not needed but for me it keeps the code more readable. Have never had any problems with it.

    So I wasn’t replacing {} with [] – but was doing two separate things. If the {code block} only has one operation, as in the original post, the {} can be omitted. Secondly, just to try in case it would help, return the value via [].

    Essentially doing something like if (levels<=5) { [0] }; just omitting the {}

    When I tested the OP’s script I just had it drive a scalar value to see the output and didn’t test it driving a time remap – so it was returning the right values – I just forgot time remap uses seconds, not frames.

  • David Henion

    September 25, 2020 at 9:37 pm in reply to: Link frame values to audio amplitude

    Probably not drive the opacity, but intensity of each light – seems way more adaptable later. Driving a time remap can get messy if you later want to add more values.

  • David Henion

    September 25, 2020 at 9:06 pm in reply to: Link frame values to audio amplitude

    Tried your expression and it worked, but usually I use [] as the return value from an expression.

    Could try to replace each { # ); with [ # ];

    Or try something like this:

    temp=0; // default value if levels is >20
    if ( levels <= 5 ) { temp=0 }; // not really needed
    else if ( levels > 5 && levels <= 10 ) { temp=1 };
    else if ( levels > 10 && levels <= 15 ) { temp=2 };
    else if ( levels > 15 && levels <= 20 ) { temp=3 };
    [temp];

    Alternatively, why not just drive the light’s intensity directly?

  • Yes that would work as well – anything really such that old projects would still work. I just find it surprising that they would implement a change knowing it would break old projects. Can you put in a request for that so they get more feedback on this?

    David Henion
    http://www.RadiantVFX.com

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