Forum Replies Created

Page 158 of 1081
  • Dan Ebberts

    January 21, 2020 at 5:05 am in reply to: Source text as thisComp.name but also have it lowercase

    As a simple example, if you wanted to split long names at the first space character, you could do something like this:

    maxLength = 20;
    compName = thisComp.name;
    compName = thisComp.name.toLowerCase();
    n = compName.substring(0, compName.indexOf(‘//’));
    n.length > maxLength ? n.replace(” “, “\r”) : n

    Dan

  • Dan Ebberts

    January 20, 2020 at 11:24 pm in reply to: Source text as thisComp.name but also have it lowercase

    >What can expression can I add to this so that I am able to have the text within the comp all lowercase regardless of the case of the comp

    Like this maybe:

    compName = thisComp.name.toLowerCase();

    > is there anyway I can add text to the end of my comp’s name without it appearing in the text?

    You could maybe preface the info with a character that would never appear in the artist or title text, like “~”:

    ~16:9

    and then change the second expression to something like this:

    compName = thisComp.name.toLowerCase();
    compName.substring(compName.indexOf(‘//’)+2,compName.indexOf(‘~’) )

    Dan

  • Dan Ebberts

    January 20, 2020 at 10:36 pm in reply to: timeToFrames “layer index out of range” error

    I think you have your test backwards. Seems like it should be:

    (thisComp.numLayers < idx)

    Dan

  • Dan Ebberts

    January 20, 2020 at 1:15 am in reply to: Scripting iterative changes

    I’d probably structure it something like this:


    var numDups = 10;
    var myPosOffset = [50,50];
    var myComp = app.project.activeItem;
    var myDupComp;
    var myDupLayer;
    var myPos;
    for (var i = 1; i <= numDups; i++){
    myDupComp = myComp.duplicate();
    myDupLayer = myDupComp.layer(1);
    myPos = myDupLayer.property("Position").value;
    myDupLayer.property("Position").setValue([myPos[0]+myPosOffset[0],myPos[1]+myPosOffset[1]]);
    // do render stuff
    myComp = myDupComp;
    }

    Dan

  • This rotation expression should work (turn off auto-orient):

    L=thisComp.layer(“Shape Layer 1”);
    p=L.content(“Rectangle 1”).content(“Path 1”).path;
    t = p.tangentOnPath(effect(“Slider Control”)(1),time);
    radiansToDegrees(Math.atan2(t[1],t[0]))

    except when your slider gets to 1.0, so you may want to limit it to .999 or so.

    Dan

  • Dan Ebberts

    January 17, 2020 at 5:33 pm in reply to: multiple linear() expressions in a row

    See if this works for you:


    s = effect("Slider Control")("Slider").value;
    if (s <= 25){
    t = linear(s,0,25,key(1).time,key(2).time);
    }else if (s <=50){
    t = linear(s,25,50,key(2).time,key(3).time);
    }else if (s <= 75){
    t = linear(s,50,75,key(3).time,key(4).time);
    }else{
    t = linear(s,75,100,key(4).time,key(5).time);
    }
    valueAtTime(t)

    Dan

  • Dan Ebberts

    January 16, 2020 at 7:40 am in reply to: All Layer Style Outer Glow Opacity Expressions Error

    >Does the glow pulsate on and off in what you rendered…

    Yes, definitely.

    Dan

  • Dan Ebberts

    January 16, 2020 at 5:36 am in reply to: All Layer Style Outer Glow Opacity Expressions Error

    I only rendered some of it, but the part that I saw looks fine (the glow pops into view with the audio).

    Dan

  • Dan Ebberts

    January 16, 2020 at 3:06 am in reply to: All Layer Style Outer Glow Opacity Expressions Error

    I’m not getting any errors. The glow pulsates on and off with the auido.

    Dan

  • Dan Ebberts

    January 16, 2020 at 1:59 am in reply to: All Layer Style Outer Glow Opacity Expressions Error

    You can get my contact info from my web site. If it’s too big to email, WeTransfer, maybe?

    Dan

Page 158 of 1081

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