Forum Replies Created

Page 33 of 1081
  • Dan Ebberts

    January 25, 2024 at 9:34 pm in reply to: Array, color and looping

    You could start with something like this, where the array colors defines the repeating sequence of colors and the variable freq defines how fast the colors change:

    var color1 = comp("XControl").layer("AAA").effect("White")("Color");
    var color2 = comp("XControl").layer("AAA").effect("Orange")("Color");
    var color3 = comp("XControl").layer("AAA").effect("Green")("Color");
    var colors = [color1, color2, color3];
    var freq = 4; // color changes per second
    var idx = Math.floor(time*freq)%colors.length;
    colors[idx]
  • Dan Ebberts

    January 17, 2024 at 11:24 pm in reply to: smooth oscillation between keyframes?

    Might be helpful:

    https://www.motionscript.com/articles/speed-control.html

  • Dan Ebberts

    January 16, 2024 at 10:09 pm in reply to: Creating “simple spacing” based on 1 shape layer

    Sorry, I just don’t understand enough about what you’re trying to do or how it’s supposed to work to offer a suggestion. Maybe someone else will chime in…

  • Dan Ebberts

    January 16, 2024 at 9:47 pm in reply to: Creating “simple spacing” based on 1 shape layer

    Sorry for being so dense. How many layers are there?

  • Dan Ebberts

    January 16, 2024 at 9:31 pm in reply to: Creating “simple spacing” based on 1 shape layer

    So what’s supposed to happen as you increase the slider?

  • Dan Ebberts

    January 16, 2024 at 7:44 am in reply to: Change text properties using ExtendScript

    My guess would be that one of your selected layers doesn’t have the same Animator setup as the others, so that the property spec selectedLayers[i].property(“Text”).property(“Animators”)…. doesn’t actually exist.

  • Dan Ebberts

    January 16, 2024 at 4:44 am in reply to: Change text properties using ExtendScript

    Try it this way:

    var thisComp = app.project.activeItem;
    var selectedLayers = thisComp.selectedLayers;
    for (var i = 0; i < selectedLayers.length; i++){
    textAnchorPointGrouping = selectedLayers[i].property("Text").property("Animators").property("Animator 1").property("Selectors").property("Range Selector 1").property("Advanced").property("Based On");
    textAnchorPointGrouping.setValue(1);
    }
  • Dan Ebberts

    January 16, 2024 at 3:27 am in reply to: Change text properties using ExtendScript

    Try changing the 3rd line to this:

    textAnchorPointGrouping = curLayer.property("Text").property("Animators").property("Animator 1").property("Selectors").property("Range Selector 1").property("Advanced").property("Based On"); 
  • Dan Ebberts

    January 14, 2024 at 10:20 pm in reply to: linear, time expression

    I’m not 100% sure, but this might be close to what you’re looking for:

    x = thisComp.layer("Data_02").effect("Point Control")("Point");
    y = thisComp.layer("Data_01").effect("Point Control")("Point");
    t = 0;
    for (f = 0; f <= timeToFrames(time); f++){
    tf = framesToTime(f);
    if (x.valueAtTime(tf)[0] < y.valueAtTime(tf)[0]){
    t = time - tf;
    break;
    }
    }
    linear(t,0,5,value,thisComp.layer("Line_01").transform.yPosition);


  • Dan Ebberts

    January 14, 2024 at 12:38 am in reply to: linear, time expression

    Not directly. Expressions have no memory, so when an expression wakes up, it has no way of knowing if it’s in the middle of an animation that was triggered in the past. It has to either (depending on what kind of triggering you want) go backwards from the current frame, or forwards from time=0, frame-by-frame (using valueAtTime) to figure out if a triggering event has occurred, and if so, how long ago did it happen. It’s a little tricky, but not too tough to set up. You have to decide whether it’s looking for a single trigger event, or if it can be re-triggered. So, more details about how it should actually work would be helpful.

Page 33 of 1081

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