Forum Replies Created

  • Thanks for the reply, I’m trying to build a re-usable preset so it’s needs to be very adaptable and can’t involve needing specific stacking order etc.

    However I have found a solve if you’re interested, I was finding that the toComp function was breaking things no matter how I approached it, so I’ve essentially written my own function that is equivalent to toComp, I’ve used this along with some other adjustments to my expressions and it now works perfectly:

    function toCompClean(layer, rectPos) {

    let radians = layer.transform.rotation * (Math.PI / 180);

    let translatedX = rectPos[0] - layer.transform.anchorPoint[0];

    let translatedY = rectPos[1] - layer.transform.anchorPoint[1];

    let rotatedX = translatedX * Math.cos(radians) - translatedY * Math.sin(radians);

    let rotatedY = translatedX * Math.sin(radians) + translatedY * Math.cos(radians);

    let scaledX = rotatedX * (layer.transform.scale[0] / 100);

    let scaledY = rotatedY * (layer.transform.scale[1] / 100);

    let finalX = scaledX + layer.transform.position[0];

    let finalY = scaledY + layer.transform.position[1];

    return [finalX, finalY];

    }

  • Steve Lewis

    June 19, 2021 at 11:30 pm in reply to: extendscript socket error on mac only

    Same issue for me, returns true on PC, false on Mac, when looking at conn.error, it just says “I/O error” nothing more, I’m wondering if everyone on Mac is facing this issue?

  • Steve Lewis

    March 24, 2017 at 5:46 pm in reply to: After Effects Script – .remove does nothing?

    Okay wow, I just figured it out, I didn’t put brackets after remove -_-

    it’s meant to be:

    app.project.item(1).remove();

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