Forum Replies Created

Page 50 of 1081
  • I’m not sure about your recursive property navigating function, but going right at it like this works:

    myLayers[i].property("ADBE Root Vectors Group").property("ADBE Vector Group").property("ADBE Vectors Group").property("ADBE Vector Graphic - Stroke").property("ADBE Vector Stroke Dashes").addProperty("ADBE Vector Stroke Dash 1").setValue(20);
  • If your spreadsheet is a .csv file, I think you can go right to your hex data with a color expression like this:

    c = footage("hex color test.csv").dataValue([0,0]);
    hexToRgb(c)
  • Ah, sorry. I got distracted by the slider. Try it this way:

    color1 = effect("Color Control 1")("Color");
    color2 = effect("Color Control 2")("Color");
    color3 = effect("Color Control 3")("Color");
    color4 = effect("Color Control 4")("Color");
    color5 = effect("Color Control 5")("Color");
    colors = [color1,color2,color3,color4,color5];
    seedRandom(textIndex,true);
    i = Math.floor(random(colors.length));
    c = colors[i];
    [c[0],c[1],c[2]]*100
  • If your text is black and the fill color animator is white, this should work:

    color1 = effect("Color Control 1")("Color");
    color2 = effect("Color Control 2")("Color");
    color3 = effect("Color Control 3")("Color");
    color4 = effect("Color Control 4")("Color");
    color5 = effect("Color Control 5")("Color");
    colors = [color1,color2,color3,color4,color5];
    slider = Math.floor(effect("Slider Control")("Slider"));
    c = colors[slider];
    [c[0],c[1],c[2]]*100
  • Dan Ebberts

    April 1, 2023 at 7:07 pm in reply to: whole number slider

    You could add an expression like this to the slider:

    Math.floor(value)

    It will still show 2 decimal places, but they’ll always be 0.

    Other than that, you could create your own pseudo effect slider and set precision to 0, which would eliminate the decimal places. A bit of work, but I think it would give you exactly what you want.

  • Dan Ebberts

    March 28, 2023 at 5:36 pm in reply to: ExtendScript – toComp?

    What I’ve done in the past is to have the script add a temporary Point Control somewhere, add the toComp() expression to the Point Control, harvest the result, and delete Point Control. Somewhat of a pain, but effective.

  • Dan Ebberts

    March 28, 2023 at 2:59 pm in reply to: SCRIPT – Duplicate an already rendered composition

    I’m not sure what you have available, but if you have a script that’s rendering files, then presumably you have access to the rendered file object, which means you can use fileObj.copy() and fileObj.rename().

  • Dan Ebberts

    March 27, 2023 at 7:01 pm in reply to: Reset time remap to 0 after every slider keyframe

    A function will actually have the reserved word “function” as part of its definition so no, this isn’t a function.

    The n– is just part of the logic to make sure we end up with the most recent, previous keyframe. It’s necessary because nearestKey can retrieve a keyframe that is in the future, if that happens to be the one that’s closest to the current time, but we need to base the animation timing on the most recent keyframe from the past.

  • Dan Ebberts

    March 27, 2023 at 3:43 pm in reply to: Looping an expression with no keyframes

    What do you want it to do?

  • Dan Ebberts

    March 25, 2023 at 3:58 pm in reply to: Reset time remap to 0 after every slider keyframe

    Try it this way:

    s = effect("Slider Control")("Slider");
    t = time;
    if (s.numKeys > 0){
    n = s.nearestKey(time).index;
    if (time < s.key(n).time) n--;
    if (n > 0) t = time - s.key(n).time;
    }
    valueAtTime(t)
Page 50 of 1081

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