Forum Replies Created

Page 59 of 1081
  • Dan Ebberts

    January 16, 2023 at 9:48 pm in reply to: Constant speed Slow down

    I think maybe you just need to change the last part from this:

    a = linear(time, 0, 1, startVal, endVal);
    b = easeX(1, 2, [0,0], [20,20]);
    a+b;

    to something like this:

    if (time < 1)
    linear(time, 0, 1, startVal, endVal)
    else
    endVal + easeX(1, 2, [0,0], [20,20]);
  • Dan Ebberts

    January 15, 2023 at 7:01 am in reply to: Random / organic / irregular rate of speed

    You could try Timewarp with a randomizing Speed expression, like this:

    minSpeed = 75;
    maxSpeed = 110;
    minDur = 1;
    maxDur = 2;
    t = tPrev = inPoint;
    seedRandom(index,true);
    while (t <= time){
    tPrev = t;
    t += random(minDur,maxDur);
    }
    seedRandom(tPrev,true);
    random(minSpeed,maxSpeed)
  • Dan Ebberts

    January 14, 2023 at 9:28 pm in reply to: Add the Animate Fill Color RGB to text layer

    Good point. Change that section to this:

    var animator = textLayer.property("ADBE Text Properties").property("ADBE Text Animators").addProperty("ADBE Text Animator");

    var selector = animator.property("ADBE Text Selectors").addProperty("ADBE Text Selector");

    var fill = animator.property("ADBE Text Animator Properties").addProperty("ADBE Text Fill Color");

  • Dan Ebberts

    January 14, 2023 at 7:45 pm in reply to: Add the Animate Fill Color RGB to text layer

    I think this works:

    // Create a new window for the UI panel
    var myPanel = new Window("palette", "Add RGB Fill", undefined);
    // Add a button to the panel
    var myButton = myPanel.add("button", undefined, "Add RGB Fill Color");
    // Add an event listener to the button
    myButton.onClick = function() {
    // Get the active composition
    var activeComp = app.project.activeItem;
    if (!(activeComp instanceof CompItem)) {
    alert("Please select a text layer in the active composition.");
    return;
    }
    // Get the selected text layers
    var selectedLayers = activeComp.selectedLayers;
    if (selectedLayers.length == 0) {
    alert("Please select at least one text layer.");
    return;
    }
    for (var i = 0; i < selectedLayers.length; i++) {
    var textLayer = selectedLayers[i];
    if (!(textLayer instanceof TextLayer)) {
    alert("Please select only text layers.");
    return;
    }
    var animator = textLayer.property("ADBE Text Properties").property("ADBE Text Animators").addProperty("ADBE Text Animator");
    var fill = animator.property("ADBE Text Animator Properties").addProperty("ADBE Text Fill Color");
    }
    }
    // Show the UI panel
    myPanel.show();
  • You would get that message if your pts slider was set to 0;

  • Another I noticed was that in your 2nd loop, you referenced i instead of i2, so that was probably one issue.

  • concat() doesn’t change either array, but I was able to get this to work:

    var topArcPos = effect("Top Arc Position")("Point");
    var botArcPos = effect("Bottom Arc Position")("Point");
    var pts = effect("Arc resolution")("Slider");
    var timeMult = effect("Timescale")("Slider");
    //Create containers; set base values
    var myArray = [];
    var myArray2 = [];
    var myNewArray = [];
    var i;
    var i2;
    //Add values to Arrays
    for (i=0;i<pts;i++){
    myArray[i] = topArcPos.valueAtTime(i*timeMult);
    myArray2[i] = botArcPos.valueAtTime(i*timeMult);
    }
    //Flip myArray2
    myArray2.reverse();
    //Join myArray2, now reversed, to the end of myArray
    myNewArray = myArray.concat(myArray2);
    createPath(points = myNewArray, inTangents = [], outTangents = [], isClosed = true)

    I changed the valueAtTime stuff to what I had before, because I couldn’t figure out what you were doing there, but this should get you closer.

  • Dan Ebberts

    January 14, 2023 at 12:31 am in reply to: Using slider to control precomp frame number

    Just drop your comp in another comp, turn on time remapping, add a slider, and add a time remapping expression like this:

    s = effect("Slider Control")("Slider");
    framesToTime(s)
  • Your code, entered like this:

    topArc = effect("Top Arc -> Value @ Time")("Point");
    pts = effect("Arc Resolution")("Slider")
    timeScale = effect("Timescale")("Slider");
    myArray = [];
    for (i = 0; i < pts; i++){
    myArray[i] = topArc.valueAtTime(i*timeScale);
    }
    createPath(myArray,[],[],true)

    works for me. I had Arc Resolution set to 10, Timescale set to .1, and I animated the Point Control over the period from 0 to 1 second.

  • Dan Ebberts

    January 13, 2023 at 3:04 pm in reply to: Changing random time

    That’s pretty much how I’d do it unless you want to ramp from one value to the next, in which case I’d do something like this:

    minVal = 100;
    maxVal = 300;
    minDur = .5;
    maxDur = 1;
    tEase = .1;
    t = tPrev = inPoint;
    seedRandom(index,true);
    while (t <= time){
    tPrev = t;
    t += random(minDur,maxDur);
    }
    seedRandom(tPrev,true);
    s1 = random(minVal,maxVal);
    seedRandom(t,true);
    s2 = random(minVal,maxVal);
    s = ease(time,tPrev,tPrev+tEase,s1,s2);
    [s,s]
Page 59 of 1081

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