Forum Replies Created

  • Meng Zhang

    July 6, 2017 at 3:54 pm in reply to: Dropdownlist issue at AE cc 2017

    Just in case someone may need it. I found a work around by changing the long drop down list to cascading drop down list and somehow it fixed the issue.

  • Dan,

    Just let you know it works like a charm. Thank you for providing awesome solutions all the time.

    Cheers,
    Meng

  • Dan,

    That’s very smart solution. Thank you for quick response!

    I will test it out and post the result here.

  • How to get same function for Comp? For example, if I just pre-composed a AVLayer and I want to get the newComp raterized automatically. Is there a way to do it?

    Thank you!

    var newComp = activeItem.layers.precompose([curLayer.index], curLayer.name, false);

    newComp.(?)

  • Meng Zhang

    April 11, 2017 at 12:34 am in reply to: Clamping x position on after effects

    Hey Dan,

    It is a script. My fault not making this clear. I didn’t see it is under expression discussion. Thank you again for help!

  • Meng Zhang

    April 10, 2017 at 9:12 pm in reply to: Clamping x position on after effects

    Dan, thank you for your quick response. I agree with you, although I didn’t find a perfect solution, I managed to find out a way to detect if the position is within a mask using this attached code by M. Katz based on Nirg’s approach:

    By changing the polygon to to a layer mask, I successfully got a right result. And it is all I need for now. I just need to detect the position key frames outside the mask and delete them. I’m planning looping through the key frames and delete those that are out of range.

    I hope to take the chance to thank you for all your awesome answers in this forum. I have always been learning a lot from you. Thank you.

    function pointIsInPoly(p, polygon) {
    var isInside = false;
    var minX = polygon[0].x, maxX = polygon[0].x;
    var minY = polygon[0].y, maxY = polygon[0].y;
    for (var n = 1; n < polygon.length; n++) {
    var q = polygon[n];
    minX = Math.min(q.x, minX);
    maxX = Math.max(q.x, maxX);
    minY = Math.min(q.y, minY);
    maxY = Math.max(q.y, maxY);
    }

    if (p.x < minX || p.x > maxX || p.y < minY || p.y > maxY) {
    return false;
    }

    var i = 0, j = polygon.length - 1;
    for (i, j; i < polygon.length; j = i++) {
    if ( (polygon[i].y > p.y) != (polygon[j].y > p.y) &&
    p.x < (polygon[j].x - polygon[i].x) * (p.y - polygon[i].y) / (polygon[j].y - polygon[i].y) + polygon[i].x ) {
    isInside = !isInside;
    }
    }

    return isInside;
    }

  • Meng Zhang

    April 10, 2017 at 5:10 pm in reply to: Clamping x position on after effects

    That’s awesome. Does anyone know how can I limit the position within a polygon, like a mask or shape layer? I have been searching for this, but no luck. Thanks guys!

  • Meng Zhang

    September 10, 2014 at 9:47 pm in reply to: The Dreaded “Error 33::4 Missing Data in File”

    Hi Casey,
    I got exactly the same error! That was really frustrating…Did you find out how to solve this?

    Thanks!

    Meng

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