Forum Replies Created

Page 11 of 1081
  • Dan Ebberts

    January 21, 2025 at 4:29 pm in reply to: setJustification and setText

    Actually, this seems to work:

    txt = thisComp.layer("first").text.sourceText;
    style.setText(txt).setJustification("alignRight")
  • Dan Ebberts

    January 21, 2025 at 4:13 pm in reply to: setJustification and setText

    I think this is all you need:

    txt = thisComp.layer("first").text.sourceText;
    style.setJustification("alignRight").setText(txt)
  • Dan Ebberts

    January 14, 2025 at 12:15 am in reply to: This expression no longer works

    Hard to tell what’s going on there, but it seems like you would need the mask applied to both the front and back layers.

  • Dan Ebberts

    January 13, 2025 at 10:39 pm in reply to: This expression no longer works

    If you’re using the JavaScript expression engine, you’ll need to change the expression to something like this:

    toCompVec([0, 0, 1])[2] > 0 ? value : 0
  • I haven’t tested this at all, but my hunch is that your keyframe processing code changes what’s selected, so you may need to collect the selected properties for all layers before you start manipulating things.

  • The expressions I posted are for the Position property. It looks like your existing expressions are for Source Text, is that correct?

  • Assuming that your text layers (renamed to “Text 1” and “Text 2” in this example) are not parented to anything and have not been scaled, you should be use position expressions like these to center the combined length (plus a gap between them).

    Expression for Text 1:

    gap = 20;
    w1 = thisComp.layer("Text 1").sourceRectAtTime(time,false).width;
    w2 = thisComp.layer("Text 2").sourceRectAtTime(time,false).width;
    centerX = thisComp.width/2;
    targetX = centerX - (w1 + gap + w2)/2;
    curX = value[0] + sourceRectAtTime(time,false).left;
    offsetX = curX - targetX;
    value - [offsetX,0]

    Expression for Text 2:

    gap = 20;
    w1 = thisComp.layer("Text 1").sourceRectAtTime(time,false).width;
    w2 = thisComp.layer("Text 2").sourceRectAtTime(time,false).width;
    centerX = thisComp.width/2;
    targetX = centerX + (w1 + gap + w2)/2 - w2;
    curX = value[0] + sourceRectAtTime(time,false).left;
    offsetX = curX - targetX;
    value - [offsetX,0]
  • Dan Ebberts

    December 23, 2024 at 9:16 pm in reply to: Controlling the Speed of offset Turbulence

    That’s essentially what he has already, right? The issue is that it is not straightforward to animate speed in AE. I describe the problem and a solution here:

    https://www.motionscript.com/articles/speed-control.html

  • Dan Ebberts

    December 23, 2024 at 2:56 pm in reply to: Extendscript naming Dropdown Menu effect

    I’m not sure this is what you’re asking, but it appears that setting the parameter list invalidates your object reference, so to change the selection afterwards, you need to re-establish the reference with a full property spec path, like this:

    boxLayer.property("Effects").property("Dropdown Menu Control").property(1).setValue(2);
  • Dan Ebberts

    December 7, 2024 at 7:13 pm in reply to: Expression to delete every 13th frame

    I don’t think there’s any practical way to do that with expressions. You’d have to use sampleImage(), and I think it would take forever to analyze enough pixels to determine two frames were the same.

Page 11 of 1081

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