Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions combine two different expressions

  • combine two different expressions

    Posted by Konstantin Kartashov on October 16, 2016 at 6:28 am

    I have to different expressions for one parameter. First drive actually value, second drive it`s timing. I want to put them together, and it worked until I restart AE.
    Now only last part works. If I delete it, first part also works separately.
    Is there a way to get it to work together?

    x=thisComp.layer("Jim_main_ctrlr").effect("step_height_correction")("Slider");
    y=key(3).value
    value=(value-y)*x+y;
    valueAtTime((thisComp.layer("Jim_auto_body").effect("Morpher")(1)-thisComp.displayStartTime/thisComp.frameDuration)*thisComp.frameDuration);

    Konstantin Kartashov replied 9 years, 7 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    October 16, 2016 at 5:04 pm

    It’s hard to tell what you’re doing exactly, but maybe like this:

    x=thisComp.layer(“Jim_main_ctrlr”).effect(“step_height_correction”)(“Slider”);
    y=key(3).value
    v = valueAtTime((thisComp.layer(“Jim_auto_body”).effect(“Morpher”)(1)-thisComp.displayStartTime/thisComp.frameDuration)*thisComp.frameDuration);
    (v-y)*x+y

    Dan

  • Konstantin Kartashov

    October 16, 2016 at 5:26 pm

    Thanks for your suggestion, Dan, but I don’t think it will help. I`ll try to explane the purpose of my expressions.
    I have keyframe cycle which is controlled in time by this part
    valueAtTime((thisComp.layer(“Jim_auto_body”).effect(“Morpher”)(1)-thisComp.displayStartTime/thisComp.frameDuration)*thisComp.frameDuration);

    may be you know what is Duik and its function named “morpher”. I think you should be familiar with it, but if not – it is here https://rainboxprod.coop/fr/outils/duik/

    anyway this last part should be kept as is, no changes here.

    This part
    x=thisComp.layer(“Jim_main_ctrlr”).effect(“step_height_correction”)(“Slider”);
    y=key(3).value
    value=(value-y)*x+y;

    controlling the values of keyframes, but the way to keep 3rd key unaltered. These two parts have to control different aspects of actual parameter – value and time. Thus it’s pointless to merge it in one formula. I need two expressions to work here.

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