Forum Replies Created

Page 145 of 1081
  • Dan Ebberts

    May 7, 2020 at 10:15 pm in reply to: Scripting – Color of Layer Marker Label

    I just tried this and it seems to work:

    var myLayer = app.project.activeItem.layer(1);
    var myMarker = new MarkerValue(“my comment”);
    myMarker.label = 1; // red
    myLayer.property(“Marker”).setValueAtTime(1, myMarker);

    Dan

  • Dan Ebberts

    May 7, 2020 at 2:26 pm in reply to: Add an ellipse via script

    I’m not sure if this does what you want, but give it a try:

    var myGroup = app.project.activeItem.selectedLayers[0].property(“Contents”).addProperty(“ADBE Vector Group”);
    myGroup.moveTo(1);

    Dan

  • This should morph between the two keyframe values, based on the audio amplitude:

    amp = thisComp.layer(“Audio Amplitude”).effect(“Both Channels”)(“Slider”);
    maxAmp = 20; // get this value by looking at the audio keyframes in graph editor
    t = linear(amp,0,maxAmp,key(1).time,key(numKeys).time);
    valueAtTime(t)

    Dan

  • Not that I know of. I always just have the script create a Point Control, apply the toComp() expression to it, harvest the result, and delete the control. It’s cumbersome, but it works.

    Dan

  • Try this:

    L = thisComp.layer(“Null 1”);
    fromComp(L.toComp(L.anchorPoint))

    Dan

  • As far as I know, there’s no easy way to do it. You have to create a new keyframe, and copy all the attributes from the original keyframe. It’s somewhat complicated, but you may be able to find some good examples out there.

    Dan

  • Dan Ebberts

    May 4, 2020 at 7:03 pm in reply to: Messaging Automation Question

    I guess you’d have to move the part that calculates moveAmt into the section after n is calculated, like this (not tested):


    m = marker;
    n = 0;
    moveTime = .2;

    if (m.numKeys > 0){
    n = m.nearestKey(time).index;
    if (time < m.key(n).time) n--;
    }
    if (n > 0){
    innerMessageHeight = comp("Messages_Comp").layer(index+n).sourceRectAtTime().height+20;
    moveAmt = innerMessageHeight;
    t = time - m.key(n).time;
    value + [-(n-1)*moveAmt-ease(t,0,moveTime,0,moveAmt)];
    }else
    value

    Dan

  • Dan Ebberts

    May 4, 2020 at 6:42 pm in reply to: Messaging Automation Question

    Actaully, I’d change the whole last part to this:


    if (m.numKeys > 0){
    n = m.nearestKey(time).index;
    if (time < m.key(n).time) n--;
    }
    if (n > 0){
    t = time - m.key(n).time;
    value + [-(n-1)*moveAmt-ease(t,0,moveTime,0,moveAmt)];
    }else
    value

    Dan

  • Dan Ebberts

    May 4, 2020 at 6:27 pm in reply to: Messaging Automation Question

    For one thing, I think you need to switch the order of these two lines:

    t = time – m.key(n).time;
    if (time < m.key(n).time) n–;

    Dan

  • Dan Ebberts

    May 4, 2020 at 5:53 pm in reply to: Get layer from selected property (in a script)

    Try this:

    var myProperty = app.project.activeItem.selectedProperties[0];
    var myLayer = myProperty.propertyGroup(myProperty.propertyDepth);

    Dan

Page 145 of 1081

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