Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Selecting frame of nested compositions with sliders

  • Selecting frame of nested compositions with sliders

    Posted by Mike Foran on March 4, 2017 at 3:25 pm

    I am attempting to build a character rig where an animator can select frames of a pre-comped head with a slider. Within that head comp there is another precomp of a mouth, of which I also would like the animator to be able to select a frame via a slider. This works fine until I try to add any keyframes to the mouth slider, at which point it fails to change frames. For brevity’s sake, here is a test project to show how this is currently built: 11103_test.aep.zip

    In this project is a controller with two sliders, and a precomp. Inside that precomp is a star object and another precomp. In precomp 2 there is another smaller star. The sliders in the main comp indicate which frame of each of the pre-comps should go to. Each precomp links to the sliders with a Time Remap expression like this:

    // tF = total frames of precomp

    tF = (timeToFrames(thisLayer.source.duration));
    tF = (tF - 1);

    sF = thisComp.layer("Controller").effect("Precomp 1")("Slider");

    mF = Math.floor(sF/tF);
    tF = (sF - (mF * tF));

    framesToTime(Math.floor(tF));

    As long as there are no keyframes on the slider controllers, this works as I hoped. But as soon as I keyframe the slider of the second precomp, it breaks. I would appreciate any help anyone could give on this matter.

    Mike Foran replied 9 years, 2 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

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