ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Selecting frame of nested compositions with sliders

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Mike Foran
Selecting frame of nested compositions with sliders
on Mar 4, 2017 at 3:25:36 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.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]