Forum Replies Created

Page 1 of 3
  • James Ronan

    January 31, 2018 at 6:11 pm in reply to: loopOut() with custom frame hold?

    Dan! Amazing!

    This is working great! and if I change:

    numImages = 5;

    to

    numImages = thisLayer.source.numLayers;

    Then I don’t need to update every time I add a new image in.

    Thanks for the speedy reply!

    James

  • James Ronan

    January 22, 2018 at 3:08 pm in reply to: Offset timing of 3rd and 4th Keyframe via slider

    SOLVED!

    After more searching I’ve found an old post with something that will work:

    Instead, this uses a slider to hold the values between 2nd and 3rd keyframes…

    holdTime = effect("Slider Control")("Slider");
    k1 = 2; // 1st hold keyframe
    k2 = 3; // 2nd hold keyframe
    p = transform.position;
    t1 = p.key(k1).time;
    t2 = t1 + holdTime;
    if (time < t1)
    t = time
    else if (time < t2)
    t = linear(time,t1,t2,t1,p.key(k2).time)
    else
    t = p.key(k2).time + (time - t2);
    valueAtTime(t)

    The old post for reference:
    https://forums.creativecow.net/thread/227/18402

  • Hey Dan,

    Thanks again for your previous help, alas I’ve another question relating to the usedIn attribute …

    Using the attribute creates an array of what compositions an object is used in, but can it show you what the layer index is, of that item in that composition?

    E.g. if I right click on an item in the Project panel, and click “Reveal in Composition”, it will show me the composition, the layer index, and the name of the layer.

    Specifically, I’m looking for its index in that composition. So is the usedIn attribute still the way to go, or is there something else that could work?

    Thanks!

    James

  • Amazing!

    That was just what I was looking for. Thanks, Dan!

  • Ah I see how it works now. Perfect!

    Thanks a lot, Dan!!

  • Almost!

    index = comp(“Parent Comp”).layer(“Child Comp”).index;

    Replace Child Comp with whatever your precomp is named.

  • James Ronan

    June 7, 2017 at 4:12 pm in reply to: Link Pin to the Bounding box of a shape layer

    After trawling through the forums I’ve modified an expression that Dan Ebberts wrote a few years ago and it is ALMOST working!!

    It now works on position and scale… just not for rotation.

    This is my version of the expression:

    //For Start Pin at the center top of the bounding box
    L = thisLayer;
    rect = L.sourceRectAtTime(time,false);
    x = L.toComp([rect.left+rect.width/2,rect.top])[0];
    y = L.toComp([rect.top+rect.width/2,rect.top])[1];

    [x,y]

    //For End Pin at the center top of the bounding box
    L = thisLayer;
    rect = L.sourceRectAtTime(time,false);
    x = L.toComp([rect.left+rect.width/2,rect.top+rect.height])[0];
    y = L.toComp([rect.top+rect.width/2,rect.top+rect.height])[1];

    [x,y]

    Any suggestions welcome 🙂

  • James Ronan

    May 31, 2017 at 7:04 pm in reply to: app.executeCommand Question

    Thanks a lot Xavier! That’s exactly what I did.

    There is probably a better way, but this is what I got working:

    //Selects Layers
    var myLayer = app.project.activeItem.selectedLayers;
    var myLayerIndex = new Array();

    //Stores selected Layers in Array
    for (i = 0; i < myLayer.length; i++) {
    myLayerIndex.push(myLayer[i].index)
    }

    //Selects Layers in comp
    var selLayers = app.project.activeItem.layers;
    //Loops through deselecting them
    for (var j = 1; j <= selLayers.length; j++) {
    selLayers[j].selected = false;
    }

    //Selects targer layer from stored selection
    var targetLayer = app.project.activeItem.layer(myLayerIndex[1]);

    targetLayer.selected = true;

    //Applies command to selected layer
    app.executeCommand(10310);
    app.executeCommand(20);

    //updates targetLayer variable is now the newly created layer.
    targetLayer = app.project.activeItem.layer(targetLayer.index - 1);

    //mattedLayer is original second selected layer
    var mattedLayer = app.project.activeItem.layer(myLayerIndex[0] + 1);

    Thanks for your help!

    James

  • James Ronan

    January 13, 2017 at 8:25 pm in reply to: Wiggle ON/OFF automatically whenever the object moves?

    Do you mean it wiggles along X and Y only when your moving along the Y axis, or it only wiggles on Y regardless of what axis your moving in?

  • James Ronan

    January 13, 2017 at 2:25 pm in reply to: Start Rotation Throw Expression at specific time

    I would do it like this:

    action = 3; // begin time for animation in seconds

    if (time>action){ // Spin (rotate at a constant speed without keyframes)
    veloc = 360; //rotational velocity (degrees per second)
    r = rotation + (time - inPoint) *veloc;
    [r] } else{value};

Page 1 of 3

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