Forum Replies Created

Page 92 of 1081
  • Dan Ebberts

    April 20, 2022 at 11:53 pm in reply to: Script apply variable value to expression

    You want the script to build the current value of script variable myCustom into the expression, is that correct? I think that would be like this:

    var myExpr = 'temp = thisComp.layer("' + myCustom + '").effect("Drive")("Output 01"); dim = value instanceof Array ? value.length : 1; dim > 1 ? [temp,temp] : temp';
  • Dan Ebberts

    April 20, 2022 at 11:01 pm in reply to: Expression for random stop, hold, continue

    You probably just need to adjust a couple of lines:

    minPeriod = 0.1;

    maxPeriod = 0.6;

    minVal = 0;

    maxVal = 10;

    accum = accumPrev = 100;

    t = tPrev = 0;

    seedRandom(index,true);

    while(t <= time){

    tPrev = t;

    accumPrev = accum;

    accum -= random(minVal,maxVal);

    t += random(minPeriod,maxPeriod);

    }

    linear(time,tPrev,t,accumPrev,accum)

  • Dan Ebberts

    April 20, 2022 at 9:55 pm in reply to: Expression for random stop, hold, continue

    Maybe some variation of this:

    minPeriod = 0.1;

    maxPeriod = 0.6;

    minVal = 0;

    maxVal = 10;

    accum = accumPrev = 0;

    t = tPrev = 0;

    seedRandom(index,true);

    while(t <= time){

    tPrev = t;

    accumPrev = accum;

    accum += random(minVal,maxVal);

    t += random(minPeriod,maxPeriod);

    }

    linear(time,tPrev,t,accumPrev,accum)

  • I think so. The pick whip knows what property you’re pointing at, and thisProperty knows which property you’re referring to, but an expression referring to another property needs to be told which property. I think that’s what you’re saying.

  • Dan Ebberts

    April 19, 2022 at 5:15 pm in reply to: Controlling AE light with layer luminance

    You could use sampleImage() to get the luminance of a section of the LED wall with something like this:

    L = thisComp.layer("LED Wall");

    s = L.sampleImage([L.width,L.height]/2,[100,100]);

    rgbToHsl(s)[2]*100

  • Sorry, I don’t get it. You could do something like:

    thisComp.layer("Medium Red Solid 3").effect("CC Particle World")(17).name

    and get the same result, but I suspect that’s not what you’re after…

  • I’m confused. If you want to reference the property name with an expression on another layer/property, why wouldn’t you just use the pickwhip, add .name, and end up with what you have in your example? Sorry, I’m missing something…

  • Dan Ebberts

    April 18, 2022 at 9:19 pm in reply to: Toggle transparency

    That’s correct, I think it just affects the transparency of thumbnails in the project panel.

  • Dan Ebberts

    April 18, 2022 at 8:17 pm in reply to: Toggle transparency

    It doesn’t really do anything and calls itself endlessly. Maybe you meant this:

    function turnTransparency(){

    app.project.transparencyGridThumbnails = true;

    }

  • Dan Ebberts

    April 18, 2022 at 6:38 pm in reply to: Increase position with comp markers

    Like this:

    easeTime = 1;

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

    m = marker;

    y = 0;

    if (m.numKeys > 0){

    n = m.nearestKey(time).index;

    if (time > m.key(n).time) n++;

    for (i = 1; i <= n-1; i++){

    y += sy.valueAtTime(m.key(i).time);

    }

    if (n <= m.numKeys){

    t = m.key(n).time - time;

    y += ease(t,0,easeTime,sy.valueAtTime(m.key(n).time),0);

    }

    }

    value + [0,y]

Page 92 of 1081

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