Forum Replies Created

  • Hi Nils, this tip helped me out! I ended up actually using GPT to help me figure this out. This was the solution that got me pretty much close to figuring it out. I added these expressions to the positions of the pink and grey boxes

    Pink Shape:

    var blackBox = thisComp.layer(“Black Box”);

    var blackBoxPosition = blackBox.transform.position;

    var blackBoxScale = blackBox.transform.scale[0] / 100;

    var xOffset = (blackBox.width / 2 * blackBoxScale) + (thisLayer.width / 2 * blackBoxScale);

    var yOffset = (blackBox.height / 2 * blackBoxScale) + (thisLayer.height / 2 * blackBoxScale);

    [blackBoxPosition[0] – xOffset, blackBoxPosition[1] – yOffset];

    Grey Shape:

    var blackBox = thisComp.layer(“Black Box”);

    var blackBoxPosition = blackBox.transform.position;

    var blackBoxScale = blackBox.transform.scale[0] / 100;

    var xOffset = (blackBox.width / 2 * blackBoxScale) + (thisLayer.width / 2 * blackBoxScale);

    var yOffset = (blackBox.height / 2 * blackBoxScale) + (thisLayer.height / 2 * blackBoxScale);

    [blackBoxPosition[0] + xOffset, blackBoxPosition[1] + yOffset];

  • Hi Tom, I’m very new to expressions so I’m still trying to learn what I can about them while actively practicing. I actually got pretty close by using GPT to help.

    I set the anchor point of the pink shape to the bottom right corner and the grey shape to the top left corner and then added expressions to the position properties of each shape.

    For the pink shape I added this expression:

    var blackBox = thisComp.layer(“Black Box”);

    var blackBoxPosition = blackBox.transform.position;

    var blackBoxScale = blackBox.transform.scale[0] / 100;

    var xOffset = (blackBox.width / 2 * blackBoxScale) + (thisLayer.width / 2 * blackBoxScale);

    var yOffset = (blackBox.height / 2 * blackBoxScale) + (thisLayer.height / 2 * blackBoxScale);

    [blackBoxPosition[0] – xOffset, blackBoxPosition[1] – yOffset];

    And for the grey, this one:

    var blackBox = thisComp.layer(“Black Box”);

    var blackBoxPosition = blackBox.transform.position;

    var blackBoxScale = blackBox.transform.scale[0] / 100;

    var xOffset = (blackBox.width / 2 * blackBoxScale) + (thisLayer.width / 2 * blackBoxScale);

    var yOffset = (blackBox.height / 2 * blackBoxScale) + (thisLayer.height / 2 * blackBoxScale);

    [blackBoxPosition[0] + xOffset, blackBoxPosition[1] + yOffset];

  • Thank you very much for this recommendation – I’m going to look into this!

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