Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions sourceRecAtTime with variable sizes?

  • sourceRecAtTime with variable sizes?

    Posted by Hans rainier Velasquez on May 8, 2024 at 10:03 pm

    I have one layer (“Layer 1”) and am using “Layer 2” to add a basic border by adding

    x = thisComp.layer(“Shape Layer 4”).sourceRectAtTime().width + 100;

    y = thisComp.layer(“Shape Layer 4”).sourceRectAtTime().height + 100;

    [x, y]

    I’m trying to create a template for editors that can add that border layer with whatever image that they drop into to replace “Layer 1”.

    Is this possible to do?

    *adding an image just to show the scalability I’d like to achieve*

    Hans rainier Velasquez replied 2 years, 2 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    May 9, 2024 at 2:58 pm

    Rather than referring to it by name, you could just refer to it as thisComp.layer(1). Would that work?

    r = thisComp.layer(1).sourceRectAtTime(time);
    x = r.width + 100;
    y = r.height + 100;
    [x, y]
  • Hans rainier Velasquez

    May 9, 2024 at 8:43 pm

    That totally works in After Effects but I’m wondering if I could get the same thing to happen with using the Essential Graphics in Premiere Pro? It just sees the original image as the bounding box when I try to replace a photo in Premiere

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