Forum Replies Created

Page 152 of 1081
  • Dan Ebberts

    April 1, 2020 at 1:01 am in reply to: text expressions for character size and tracking

    Try it this way:

    tracking = effect(“Tracking”)(“Slider”);
    fontSize = effect(“Font Size”)(“Slider”);
    newStyle = style.setTracking(tracking);
    newStyle.setFontSize(fontSize);

    Dan

  • Dan Ebberts

    March 31, 2020 at 11:09 pm in reply to: Small jump in size after time mark is passed

    One problem you might be having is that there will be discontinuities at 1 and 2 seconds, where the amount of delay changes abruptly. You might want to ease through those changes with something like this (not tested at all):


    easeTime = .25;
    delay = thisComp.layer("xp").effect("d")("Slider");
    t=time;
    d = delay*thisComp.frameDuration*(index - 1);
    if (t < 2){
    dly = ease(t,1-easeTime,1,-d,0);
    }else{
    dly = ease(t,2,2+easeTime,0,d);
    }
    thisComp.layer(6).scale.valueAtTime(time + dly)

    Dan

  • Dan Ebberts

    March 31, 2020 at 10:48 pm in reply to: Small jump in size after time mark is passed

    I don’t think while will help, but what exactly are you trying to do?

    Dan

  • Dan Ebberts

    March 31, 2020 at 9:52 pm in reply to: Small jump in size after time mark is passed

    For starters, you don’t define what s is when t is between 1 and 2. I’d set it up like this:


    if (t < 1){
    s = // value when t less than 1
    }else if (t <= 2){
    s = // value when t between 1 and 2
    }else{
    s = // value when t > 2
    }
    s

    I’m not sure that’s the only issue, but it should help…

    Dan

  • Dan Ebberts

    March 30, 2020 at 8:50 pm in reply to: Scripting – Add to Essential Graphics Panel

    I haven’t tested this, but something like this:


    app.beginUndoGroup("Add to EGP");

    function add(theLayer){

    var myComp = app.project.activeItem; //Active comp
    var selectProp = theLayer.position; //Position on selected layer;
    var myLayer = theLayer.name; //Get layer name;
    var myProp = "Position"; //Property name;
    var myControl = myProp + " " + "-" + " " + myLayer;//Combine property name and layer name
    selectProp.addToMotionGraphicsTemplateAs(myComp, myControl); //Add property to EGP and rename;
    app.project.activeItem.motionGraphicsTemplateName = "Master Properties"; //Set template name;
    myComp.openInEssentialGraphics(); //Opens comp in essential graphics panel;

    }
    var myLayers = app.project.activeItem.selectedLayers;
    for (var i = 0; i < myLayers.length; i++){
    add(myLayers[i]);
    }

    app.endUndoGroup();

    Dan

  • Dan Ebberts

    March 28, 2020 at 10:03 pm in reply to: Scripting – Add to Essential Graphics Panel

    I haven’t tried addToMotionGraphicsTemplate(), but my guess is that you need to provide it a comp object, not a comp name. Try that.

    Dan

  • This should work:


    s = thisComp.layer("Controller").effect("Slider Control")("Slider");
    n = 0;
    if (s.numKeys > 0){
    n = s.nearestKey(time).index;
    if (time < s.key(n).time)n--;
    }
    n

    Dan

  • Dan Ebberts

    March 18, 2020 at 10:36 pm in reply to: Finding value of a keyframe

    Something like this:

    myKeyValue = transform.xPosition.key(2).value;

    or (if dimensions aren’t separated):

    myKeyValue = transform.position.key(2).value[0];

    Dan

  • Dan Ebberts

    March 17, 2020 at 11:05 pm in reply to: Set an expression value to a layers name.

    Like this maybe:

    veloc = parseInt(thisComp.layer(1).name,10);
    x = position[0] + (time – inPoint) *veloc;
    y = position[1];
    [x,y]

    Dan

  • Probably something close to this:


    m = marker;
    n = 0;
    if (m.numKeys > 0){
    n = m.nearestKey(time).index;
    if (time < m.key(n).time) n--;
    }
    seedRandom(n,true);
    Math.floor(random(1,thisComp.numLayers))+1

    Dan

Page 152 of 1081

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