Forum Replies Created

  • Mauro Junior

    May 14, 2019 at 6:56 pm in reply to: Issues modifying the Duik’s Connector Code

    I did it! Thank you so much Filip!
    https://github.com/jetrotal/Duik.Connector-pose2pose-MOD/blob/master/ConnectorPose2poseMOD.js

    I had to add


    ctrlNearK = ctrlFrames.nearestKey(time);

    try{
    ctrlPrevK = ctrlNearK.time<time ? ctrlNearK : ctrlFrames.key(ctrlNearK.index-1);
    }catch(err){
    ctrlPrevK = ctrlNearK.time<time ? ctrlNearK : ctrlFrames.key(ctrlNearK.index);

    }try{
    ctrlNextK = ctrlFrames.key(ctrlPrevK.index+1);
    }catch(err){
    ctrlNextK = ctrlFrames.key(ctrlPrevK.index)
    }

    and change the last linear(); function to:

    keyF_A = connect(value_A);
    keyF_B = connect(value_B);

    if (ctrlPrevK.value

    My code is a messy hell, with tons of try and catch, but at least it works.

    If you have any advise to clean it up, would be welcome...
    You can test it without Duik, just by pasting the entire code into a property that you want to have multiple poses

    and changing the

    var ctrlLayer =thisComp.layer("C | Slider 2");
    var ctrlFrames = ctrlLayer.transform.xPosition

    to any controller layer and property.

    Thank you once again Filip

  • Mauro Junior

    May 14, 2019 at 9:44 am in reply to: Issues modifying the Duik’s Connector Code

    Hi Filip, you have an ellegant soution there!

    I have a quesion, do your code consider the Easing from the slider? if it does, how?

    what i got with my code is:

    keyF_A = connect(value_A);
    keyF_B = connect(value_B);
    return linear(time,time_A, time_B, keyF_A, keyF_B);

    where, keyF_A is the previous pose keyframe that will be controlled by a controller, and KeyF_B is the next.

    Then we have, the time whe the poses happens as time_A and time_B.

  • Hi there, is there a way to adapt this code to work with Path Objects?

    s = thisComp.layer("control").effect("Slider Control")("Slider");
    linear(s,0,100,key(1).value,key(2).value)

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