Forum Replies Created

Page 12 of 1081
  • Dan Ebberts

    November 29, 2024 at 7:39 pm in reply to: 2D Position Projected to 3D Layer

    Happy to help. 🙂

  • Dan Ebberts

    November 29, 2024 at 3:54 pm in reply to: 2D Position Projected to 3D Layer

    This might be what you’re looking for:

    L = thisComp.layer("2DNull");
    fromCompToSurface(L.position)
  • Dan Ebberts

    November 25, 2024 at 10:24 pm in reply to: Scripts don’t work

    >because if the code was not correct then it would not work anywhere.

    That’s not necessarily true. It’s possible that your code uses a JavaScript capability that doesn’t actually exist in the version of JavaScript used to implement ExtendScript. A good example is indexOf() for arrays. Sometimes you can get away with it because another script has modified Array.prototype to add that functionality and so any other scripts that (incorrectly) use that capability luck out and run without error (in that environment only). I have no idea if anything like that is happening in your case, but I wanted to point out that it does happen, and causes symptoms like you’re experiencing.

  • Dan Ebberts

    November 25, 2024 at 3:48 pm in reply to: Parenting text layers to other text layers

    That would be like this:

    gap = 20;
    L = thisComp.layer("other layer");
    r = L.sourceRectAtTime(time,false);
    p = L.toComp(L.anchorPoint);
    hisRight = p[0] + (r.left + r.width - L.anchorPoint[0])*L.scale[0]/100;
    r = sourceRectAtTime(time,false);
    myLeft = position[0] + (r.left - anchorPoint[0])*scale[0]/100;
    delta = hisRight - myLeft;
    value + delta + gap
  • I’m not sure this is what you’re after, but it might help. If your text gets generated without keyframes, maybe you could get your timing info from a layer marker on your text layer that that you set where the text is done animating. Then you could do something like this:

    L = thisComp.layer(index-1);
    t = L.marker.key(1).time;
    w = L.sourceRectAtTime(t).width;
    m = effect("Slider Control")(1);
    an = w + m;
    x = linear(time,0,t,0,an);
    [x,value[1]]
  • Dan Ebberts

    November 25, 2024 at 2:23 pm in reply to: Parenting text layers to other text layers

    Ah yes. All the code from the old days got mangled when they did some kind of conversion on this site (don’t remember when that was exactly). All the quote characters and minus signs got messed up. This should be better:

    gap = 20;
    L = thisComp.layer("other layer");
    r = L.sourceRectAtTime(time,false);
    hisRight = L.position[0] + (r.left + r.width - L.anchorPoint[0])*L.scale[0]/100;
    r = sourceRectAtTime(time,false);
    myLeft = position[0] + (r.left - anchorPoint[0])*scale[0]/100;
    delta = hisRight - myLeft;
    value + delta + gap
  • Dan Ebberts

    November 25, 2024 at 2:09 pm in reply to: Expression to set font/size of just one line of text

    I think if you want to set the font size of the middle line, you just need to do something like this:

    blurb = text.sourceText;
    splitBlurb = blurb.split("\r");
    style.setFontSize(400,splitBlurb[0].length+1,splitBlurb[1].length)
  • Dan Ebberts

    November 24, 2024 at 8:00 pm in reply to: Per character pop-up text animation

    Try this. Start with your string of text and apply a Scale Animator and set the Scale value to 0,0. Add an Expression Selector and delete the Range Selector. Replace the expression in the Expression Selector’s Amount property with this:

    rampUp = .5;
    rampDn = .5;
    delay = .25;
    myDelay = (textIndex-1)*delay;
    t = time - (inPoint + myDelay);
    if (t < rampUp)
    linear(t,0,rampUp,100,-50)
    else
    linear(t,rampUp,rampUp+rampDn,-50,0);

    Adjust the rampUp, rampDn, and delay variables to suit your needs.

  • Dan Ebberts

    November 20, 2024 at 7:21 pm in reply to: per-character styling

    If there’s always a space between the day and the time, you could use a single source layer, like this:

    txt = thisComp.layer("Day Time").text.sourceText.value;
    L1 = txt.split(" ")[0].length;
    L2 = txt.substr(L1+1).length;
    style.setFont("ArialMT",0,L1).setFont("Arial-Black",L1+1,L2).setText(txt)
  • Dan Ebberts

    November 18, 2024 at 2:03 pm in reply to: Setting position with a Dropdown Menu Controller

    Try it this way:

    dropdown = effect("Line")("Menu").value;
    if (dropdown==1){
    val = [60,1018];
    }else if (dropdown==2){
    val = [60,947];
    }else{
    val = [60,876];
    }
    val
Page 12 of 1081

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