Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Easy way (script or otherwise) to make a nested comp’s start timecode match the layer’s in-point in the parent comp?

  • Easy way (script or otherwise) to make a nested comp’s start timecode match the layer’s in-point in the parent comp?

    Posted by Perry Kroll on December 15, 2011 at 5:05 am

    I have a comp full of pre-comps: one for each shot in an edited sequence. They’re spaced out one after the other. It was built in AE CS 5.5 with the ever useful rd_Pre-compose script.

    Now, I want to be able to set a starting timecode (other than 0) for the main parent comp, and then have it magically apply to each of the nested comps. So, if I start the timecode counter at 10 seconds (0:00:10:00) in the parent comp, and then I have a pre-comp whose layer-start-point is at 2 seconds from the beginning (0:00:12:00, based on my new starting timecode) I want that pre-comp to get it’s OWN starting timecode of 12 seconds (0:00:12:00).

    Does this make sense?

    I feel like there must be a way to automate this, or make a script for it, but I have no idea how to proceed.

    Many thanks in advance.

    Walter Soyka replied 14 years, 5 months ago 4 Members · 7 Replies
  • 7 Replies
  • Kevin Camp

    December 15, 2011 at 4:10 pm

    i think this is what you are after:

    target=thisComp.layer(“Layer 1”); // this would be your control layer
    target.effect(“Timecode”)(“Starting Frame”)+timeToFrames(inPoint);

    it will link the starting frame of the timecode effect of the layer it is applied to to the starting time of the target/control layer but accounts for the layer’s inPoint time.

    Kevin Camp
    Senior Designer
    KCPQ, KMYQ & KRCW

  • Erik Waluska

    December 15, 2011 at 4:11 pm

    AE doesn’t use timecode, it just counts from the beginning of the comp (in a timecode format – granted). If you want the layers you pre-comp from within the main comp to retain the time relation to the main comp then don’t use the rd_pre-compose script to trim the comps – that just makes the in point of the comp start at zero. You can un-precompose the clips and then compose them normally with “move all attributes…” checked on. Of course, when you go into the pre-comp it will be the duration of the main comp and not the clip.

  • Perry Kroll

    December 15, 2011 at 4:21 pm

    See, I can do this manually by simply opening up each pre-comp, going to composition settings, and typing in a new start timecode. I just feel like there must be a way to write a script to automate that process…

  • Walter Soyka

    December 15, 2011 at 4:25 pm

    [Erik Waluska] “AE doesn’t use timecode, it just counts from the beginning of the comp (in a timecode format – granted)”

    New in AE CS5.5 — timecode support [link].

    You’re right that AE counts from the beginning of the comp, but you can set a comp’s starting timecode (or start frame) in its composition settings [link].

    I have been doing what Perry is describing manually — starting in the main comp, going to a precomp layer’s in-point, copying the current timecode, opening the precomp, opening its comp settings, and pasting in the new starting timecode.

    Since this can be done entirely from the keyboard, it’d be easy enough to record a keyboard macro:

    I
    Alt-Shift-J
    Ctrl-C
    Esc
    NumPad Enter
    Ctrl-K
    Shift-Tab (6x)
    Ctrl-V
    Enter
    Ctrl-W

    Walter Soyka
    Principal & Designer at Keen Live
    Motion Graphics, Widescreen Events, Presentation Design, and Consulting
    RenderBreak Blog – What I’m thinking when my workstation’s thinking
    Creative Cow Forum Host: Live & Stage Events

  • Perry Kroll

    December 15, 2011 at 4:27 pm

    Ha! That’s actually pretty clever.

    I just wish I had the programming smarts to write a script, because I think this would be incredibly useful.

    Are you listening… script writing people?? You could sell this for like $5…

  • Erik Waluska

    December 15, 2011 at 4:45 pm

    I’m still on CS5 so I wasn’t aware of the new timecode support but that’s good to know.

  • Walter Soyka

    December 15, 2011 at 5:15 pm

    [Perry Kroll] “Ha! That’s actually pretty clever. I just wish I had the programming smarts to write a script, because I think this would be incredibly useful.”

    I wish I had the time to really get into scripting, because this one does sound like it should be pretty straightforward.

    As it is, I try to cheat with keyboard macros whenever possible.

    Good luck with your project.

    Walter Soyka
    Principal & Designer at Keen Live
    Motion Graphics, Widescreen Events, Presentation Design, and Consulting
    RenderBreak Blog – What I’m thinking when my workstation’s thinking
    Creative Cow Forum Host: Live & Stage Events

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