Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions nested compositions and expression control problem

  • nested compositions and expression control problem

    Posted by Jan Sickinger on March 10, 2011 at 10:05 am

    hey there,

    i have problem with a nested composition where i trying to controll the rotation of a layer. the expression in the nested comp look like this:

    comp(“main-comp”).layer(“controll-layer”).effect(“rotation”)(“slider”)

    that works well until i try to set keyframes in the main-comp. when i´m set more then one keyframe, there is no change in the nested layer.
    normaly this should work.

    have you guys any idea where the problem might be?

    thanks!

    Dan Ebberts replied 9 years, 6 months ago 4 Members · 9 Replies
  • 9 Replies
  • Dan Ebberts

    March 10, 2011 at 3:49 pm

    I tried it using your comp/layer/effect names, and it worked for me (after I changed “slider” to “Slider”).

    Dan

  • Jan Sickinger

    March 10, 2011 at 3:56 pm

    hey dan,

    thanks for trying. i tried in another comp an there it worked well. may it be, that when the main project is getting to big, ater effects won`t handle this anymore? or is there something like general expression settings where i may have changed something unluckily?
    i don´t get any error messages from the expressions. and when i set the first keyframe, and work on this time-position, the expression does what it should. only when i try to make a keyframed animation, it stops working proper.

    thanks a lot! jan

  • Dan Ebberts

    March 10, 2011 at 4:05 pm

    There was this thread a while back:

    https://forums.creativecow.net/readpost/227/17315

    Please report back if you figure out what the problem is.

    Dan

  • Jan Sickinger

    March 12, 2011 at 11:49 am

    hey there,

    the answer to my problem was quite simpel. the control-layer-time didn´t match with the nested-comp-time.
    maybe there is some kind of expression wich fix this problem too. if not, just keep an eye on timematching with nested comps and overall time settings.

    all the best, jan

  • Marlon Lewis

    January 5, 2014 at 4:20 pm

    I am having the same problem – I am animating a character and using a null to control the position of the characters pupils so that the character can look left,right, up and down.

    My comp Hierarchy is something like this:

    Main Comp > Eye_LFT(Precomp that is Time re-mapped so I can animate the blinking)> Pupil_LFT (This contains the white of the eye and the pupil.)

    I can move my null controller and the eyes will move as needed, but adding key frames and changing the position just doesn’t work.

    I’ve been through the solutions on this thread and rearranged my layers and comps so they all have the same start and ending time (Except for some layers within the ‘Eye_LFT’ pre-comp which are only a single frame in duration, which I use for the blinking effect.

    Now if I disable time re-mapping, I can animate the movement of the pupils with keyframes, but I can no longer make my character blink and vice versa.

    Does anyone have any ideas or suggestions at all as to why I would still have this problem?

    Many thanks

    Marlon

  • Everton Gois

    November 8, 2016 at 4:21 pm

    I now this is over few years but I have the same issue here.
    Marlon, did you get this sorted some how?

    Many thanks

    everton

    Everton Gois
    Digital Artist

  • Dan Ebberts

    November 8, 2016 at 5:13 pm

    If your precomp doesn’t start at time = 0 in the main comp, you have to compensate for the offset, like this:

    C = comp(“main comp”);
    ctrl = C.layer(“controls”).effect(“Point Control”)(“Point”);
    L = C.layer(thisComp.name);
    ctrl.valueAtTime(time + L.startTime)

    Dan

  • Everton Gois

    November 8, 2016 at 9:48 pm

    Hi Dan,

    Thanks for your quick help. Unfortunately I didn’t understand
    “If your pre comp doesn’t start at time = 0 in the main comp, you have to compensate for the offset”

    Do you mean as ‘main comp= City?’. For instance, if the character don’t start at frame ‘0’ in the scene ( e.g.: city), I’ll need to use that code above, right?…where?.

    Or
    Main Comp = Full character?…this is how its is structured at the moment.

    Full character Comp –>Heads( L/R &Front = 5 Min Length)–>Eyes ( 4 Frames Length )–> Pupil ( linked to Null Pos in the Full Character Comp)

    So, the Pupil Moves according to the null but only on first few frames, but if a keyframe is set, it won’t work.

    Am I crazy here?

    Thanks for your help

    Everton Gois
    Digital Artist

  • Dan Ebberts

    November 8, 2016 at 10:30 pm

    Ah, that’s more complex (with multi-level nesting). It’s probably going to look more like this:

    t = comp(“Heads”).layer(“Eyes”).startTime;
    t += comp(“Full Character”).layer(“Heads”).startTime;
    ctrl = comp(“Full Character”).layer(“Null Pos”).position;
    ctrl.valueAtTime(time + t);

    and would be applied to the position property of the layer (Pupil ?) linked to the null in the main comp.

    Dan

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