Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions One expression that will work on one dimension or two?

  • One expression that will work on one dimension or two?

  • Kevin Snyder

    October 21, 2021 at 4:58 am

    I’m trying to come up with an expression that will work on properties that have one dimension or two dimensions. Here’s what I can up with, but it doesn’t work. I still get an error message. Maybe the catch(err) technique doesn’t work in this case?

    temp = thisComp.layer("Drive").effect("Drive")("Output 01");

    try{

    [temp, temp];

    }catch(err){

    temp;

    }

  • Dan Ebberts

    October 21, 2021 at 6:46 am

    Try it this way:

    temp = thisComp.layer("Drive").effect("Drive")("Output 01");

    dim = value instanceof Array ? value.length : 1;

    dim > 1 ? [temp,temp] : temp

  • Kevin Snyder

    October 21, 2021 at 2:49 pm

    That works great. Thank you.

Viewing 1 - 3 of 3 posts

Log in to reply.

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