Forum Replies Created

Page 86 of 1081
  • Dan Ebberts

    June 17, 2022 at 6:31 pm in reply to: Trigger Two Keyframes With Alpha – not working

    What do you mean by “needs to be triggered”? Does the luminosity vary over time? If so, your expression needs to figure out how long ago the triggering event happened (probably by going back in time, frame by frame, to find the frame where the luminosity went from untriggered to triggered).

  • I’m not sure exactly what you’re trying to do, but sometimes you just need to move a layer’s startTime to get it to line up with another layer’s inPoint. Sometimes you may need to manipulate both startTime and inPoint (in which case, always do startTime first).

  • Dan Ebberts

    June 15, 2022 at 4:07 pm in reply to: Anyway to link In and Out to a slider?

    Sure, instead of time remapping the precomped layer, you could attached each animated property to a time offset slider. You’d probably still need to also tie it to the layer’s opacity (unless, as in your example, it animates in from off screen).

  • I think setParentWithJump() is throwing the error because it’s expecting a layer object as its argument, and you’re giving it an index.

  • Dan Ebberts

    June 15, 2022 at 2:30 pm in reply to: Anyway to link In and Out to a slider?

    You can’t control a layer’s in point with an expression, but you might be able to fake it in some situations. You could precomp your shape layer, turn on time remapping, add a slider, and add this time remapping expression:

    s = effect("Slider Control")("Slider");

    time - s

    You might also want to add this opacity expression:

    s = effect("Slider Control")("Slider");

    time -s < 0 ? 0 : value

  • Dan Ebberts

    June 15, 2022 at 1:59 pm in reply to: Is it possible to have an IK rig with 4 nulls?

    It’s been quite a while since I looked into this, but as I recall, as soon as you have more than 3 joints (with two segments), you move out of the realm of pure geometry and into iterative algorithms because there are multiple possible solutions. Because of that, there’s an additional complication that the solution would have to be calculated in a single expression and the results somehow distributed to the participating nulls (via text layer maybe?). Not impossible, I think, but definitely much more complex than the the 1 angle/2 segment/3 joint version.

  • Dan Ebberts

    June 14, 2022 at 1:03 am in reply to: Random Wiggle Opacity from 100% to 0%

    Rather than start with that expression, I think I’d take a different approach.

    Assuming that all layers in your comp are participating in this random lottery, you could add a new null layer (named “controls”) with a slider contol and move it to the bottom of the layer stack. You would then add this exression to the slider:

    minDur = .1;

    maxDur = .5;

    n = index-1;

    seedRandom(index,true);

    curTime = 0;

    curIdx = Math.floor(random(n));

    while (curTimeRather than start with that expression, I think I’d take a different approach.

    Assuming that all layers in your comp are participating in this random lottery, you could add a new null layer (named “controls”) with a slider contol and move it to the bottom of the layer stack. You would then add this exression to the slider:

    minDur = .1;

    maxDur = .5;

    n = index-1;

    seedRandom(index,true);

    curTime = 0;

    curIdx = Math.floor(random(n));

    while (curTime

  • Dan Ebberts

    June 13, 2022 at 7:17 pm in reply to: Expression to offset shape group scale animation

    offset = .1;

    is just setting the variable the defines the timing offset to one tenth of a second. If you wanted it to be one frame, you could change it to this:

    offset = thisComp.frameDuration;
  • Dan Ebberts

    June 13, 2022 at 6:37 pm in reply to: Random Wiggle Opacity from 100% to 0%

    I don’t think that expression would be the best choice for what you’re doing. Assuming that all layers in your comp are participating, I’d add a new null layer (named “controls”) with a slider control and move it to the bottom of the layer stack. You would then add this expression to the slider:

    minDur = .1;

    maxDur = .5;

    n = index-1;

    seedRandom(index,true);

    curTime = 0;

    curIdx = Math.floor(random(n));

    while (curTime <= time){

    curTime += random(minDur,maxDur);

    curIdx = (curIdx + Math.floor(random(1,n)))%n;

    }

    curIdx + 1

    This expression publishes the layer index of the layer to be visible at any given time. Adjust minDur and maxDur to set the range of times each layer is visible. Then, on all the participating layers, you would add this opacity expression:

    s = thisComp.layer("controls").effect("Slider Control")("Slider");

    s == index ? 100 : 0

  • Like this, I guess:

    function keyframesToMarkers(){

    var myComp = app.project.activeItem;

    if (myComp == null || ! (myComp instanceof CompItem)){

    alert ("No comp active.");

    return;

    }

    if (myComp.selectedLayers.length == 0){

    alert ("No layer selected.");

    return;

    }

    var myLayer = myComp.selectedLayers[0];

    if ( ! (myLayer instanceof TextLayer)){

    alert ("Selected layer is not a text layer.");

    return;

    }

    var markerVal = new MarkerValue("");

    var mySourceText = myLayer.property("ADBE Text Properties").property("ADBE Text Document");

    var myTextDoc;

    for (var i = 1; i <= mySourceText.numKeys; i ++){

    myTextDoc = mySourceText.keyValue(i);

    if (myTextDoc.text == "") continue;

    markerVal.comment = myTextDoc.text;

    if (i < mySourceText.numKeys){

    markerVal.duration = mySourceText.keyTime(i+1) - mySourceText.keyTime(i);

    }else{

    markerVal.duration = 0;

    }

    myLayer.property("Marker").setValueAtTime(mySourceText.keyTime(i),markerVal);

    }

    }

    keyframesToMarkers();

Page 86 of 1081

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