Forum Replies Created

Page 144 of 1081
  • Obviously I haven’t tested this, and I’m not even sure the syntax is exactly right, but it might give you an idea and get you headed in the right direction. This example is for Position:


    n = thisLayer("Effects").numProperties;
    accum = [0,0];
    for (i = 1; i <= n; i++){
    if (thisLayer("Effects").property(i).name.indexOf("PSR Offset") > -1){
    accum += thisLayer("Effects").property(i).property("Position");
    }
    }
    value + accum

    Dan

  • Try it this way:


    if (numKeys > 1){
    t1 = key(1).time;
    t2 = key(2).time;
    t3 = key(3).time;
    t4 = key(4).time;
    v1 = 100;
    v2 = effect("Slider1")("Slider");
    v3 = effect("Slider2")("Slider");
    v4 = 100;
    if (time < t2)
    linear(time,t1,t2,v1,v2)
    else if (time < t3)
    linear(time,t2,t3,v2,v3)
    else
    linear(time,t3,t4,v3,v4);
    }else
    value

    Dan

  • Dan Ebberts

    May 11, 2020 at 8:31 pm in reply to: Opacity change around a layer marker

    For one thing, you were using the code that finds the most recent, previous marker, not the nearest marker. The dead giveaway is this line:

    if (thisLayer.marker.key(n).time > time) n–;

    You do that if you want to trigger something at the most recent, previous marker, not if you want to center your action around the nearest marker.

    Dan

  • Dan Ebberts

    May 11, 2020 at 7:52 pm in reply to: Opacity change around a layer marker

    This should work:


    n = 0;
    fadeFrames = 30;
    tFade = framesToTime(fadeFrames)/2;

    if (marker.numKeys > 0){
    t = marker.nearestKey(time).time;
    if (time < t)
    ease (time, t-tFade, t, 100, 0)
    else
    ease (time, t, t+tFade, 0, 100);
    }else
    value

    Dan

  • Dan Ebberts

    May 11, 2020 at 1:32 pm in reply to: propertyValueType returns a number

    Just ignore the numbers and use the names in the scripting guide, like this, and it will work out the way you want:

    var pvt = myProperty.propertyValueType;
    if (pvt == PropertyValueType.OneD || pvt == PropertyValueType.TwoD || etc…){
    // do something
    }

    Dan

  • Dan Ebberts

    May 10, 2020 at 4:53 am in reply to: Change wiggle speed with slider control
  • Dan Ebberts

    May 9, 2020 at 11:22 pm in reply to: Fade out Shape Layer when Path is revealed

    If this is tied into your previous question, it would probably be like this:

    splitName = name.split(“_”);
    tEnd = framesToTime(parseInt(splitName[2],10));
    linear(time,tEnd,tEnd+2,100,0)

    Dan

  • Dan Ebberts

    May 9, 2020 at 5:54 pm in reply to: Close layer properties list

    The only way I know of is to duplicate the layer and delete the original.

    Dan

  • Not possible, as far as I know.

    Dan

  • Dan Ebberts

    May 9, 2020 at 3:56 pm in reply to: Get Values from Layers Name

    Probably something close to this:

    splitName = name.split(“_”);
    tStart = framesToTime(parseInt(splitName[1],10));
    tEnd = framesToTime(parseInt(splitName[2],10));
    linear(time,tStart,tEnd,0,100)

    Dan

Page 144 of 1081

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