Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expression from parent comp layer to child comp layer not synced to timeline?

  • Expression from parent comp layer to child comp layer not synced to timeline?

    Posted by Kavon Zamanian on March 17, 2020 at 6:54 pm

    So I have “Sequence 01 Main” with “Sequence 01 Slate 02” inside it. “Sequence 01 Slate 02” has a shape layer in it “Corner Square” with a set of Path Size keyframes. I created a duplicate of that layer “Corner Square Matte” in the parent comp that has its Path Sizes linked to the “Corner Square” Path Sizes with a simple expression.

    My hope is that when the precomped “Corner Square” changes size, “Corner Square Matte” will change size too in the parent comp. I’ve done this successfully with other properties.

    My problem is in this case, “Corner Square” and “Corner Square Matte” both come in at the same frame of their respective comps, no matter where the child comp sits within the parent comp. This results in an offset of the two animations if the child comp doesn’t start at the beginning of the parent comp. I’ve searched project settings, comp settings etc but can’t seem to find an option regarding this.

    I’ve attached a screenshot. The shape layer outline circles you can see should be lined up with the yellow circles, but they’re not because of where the child comp is in the timeline.

    Hopefully that makes sense.

    Walter Soyka replied 6 years, 4 months ago 2 Members · 1 Reply
  • 1 Reply
  • Walter Soyka

    March 18, 2020 at 10:49 am

    To do this with a simple expression, you’d have to calculate the time offset between the comps and use .valueAtTime() with that offset to override the default timebase. It’s not super-trivial to do, it’s hard to maintain, and everything breaks again if you have multiple copies of the precomp at different times in the main comp.

    Instead, I suggest you use master properties. If you expose the path size parameter from your precomp as a master property, it will become available when you twirl open the precomp layer in your main comp, and you should be able to use a simple link expression entirely within your main comp.

    This will help make it clearer:
    https://www.schoolofmotion.com/blog/master-properties-after-effects/

    And here are the official docs:
    https://helpx.adobe.com/after-effects/using/master-properties.html

    Walter Soyka
    Designer & Mad Scientist at Keen Live [link]
    Motion Graphics, Widescreen Events, Presentation Design, and Consulting
    @keenlive   |   RenderBreak [blog]   |   Profile [LinkedIn]

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