Forum Replies Created

Page 41 of 1081
  • Dan Ebberts

    August 15, 2023 at 4:33 pm in reply to: Expression to randomize a size of an object

    Maybe a wiggle expression like this:

    min = 20;
    max = 80;
    freq = 2;
    center = (min + max)/2;
    amp = (max - min)/2;
    w = wiggle(freq,amp) - value;
    [center,center] + [w[0],w[0]]
  • Dan Ebberts

    August 11, 2023 at 4:50 pm in reply to: Link values ​​between precompositions

    That does complicate things. I think you need to either duplicate Precomp 1 and Precomp 2 in the project panel so that each copy can have a different expression, or maybe somehow rig them up with Essential Properties so each instance can have its own values (not sure about that one).

  • Dan Ebberts

    August 10, 2023 at 5:43 pm in reply to: Link values ​​between precompositions

    Here’s an example. Say you have a main comp (named “Main”) with a keyframed slider on a layer named “Control”. Main also has a precomp layer named “Precomp 1”. Inside Precomp 1 is Precomp 2, which has a layer with an expression that needs to reference the slider in Main. This is what that expression would need to look like if the precomp layers don’t start at time=0:

    s = comp("Main").layer("Control").effect("Slider Control")("Slider");
    t1 = comp("Precomp 1").layer(thisComp.name).startTime;
    t2 = comp("Main").layer("Precomp 1").startTime;
    s.valueAtTime(time + t1 + t2);
  • Dan Ebberts

    August 10, 2023 at 3:57 pm in reply to: Link values ​​between precompositions

    Any time you have a pre-comped<font color=”rgba(0, 0, 0, 0)” face=”inherit”> expression referencing a keyframed control in the main comp and the precomp doesn’t start at time = 0 in the main comp, your expression needs to compensate for that time difference. It sounds like you may have two levels of pre-comping, which could complicate things. It would help if you could post a screen shot that shows layer names and start times for all the elements in the </font>hierarchy<font color=”rgba(0, 0, 0, 0)” face=”inherit”>.</font>

  • Dan Ebberts

    August 6, 2023 at 11:00 pm in reply to: How to link with relative values?

    I’m having a hard time picturing what it is that you’re asking. Can you provide more detail?

  • Unfortunately, there’s no way to have multiple font styles in a single text layer once an expression has been applied to the source text.

  • Dan Ebberts

    July 28, 2023 at 10:11 pm in reply to: Need to Optimize Expression Evaluation (valueAtTime)

    I’m not sure, but I’d say it’s worth a try.

  • Have you tried beginning your expressions with posterizeTime(0) ?

  • Dan Ebberts

    July 27, 2023 at 4:23 pm in reply to: 1 box around two text-layers

    Nice. You could also set it up with different variables to define each margin:

    leftMargin = 70;
    topMargin = 20;
    rightMargin = 70;
    bottomMargin = 25;
    L1 = thisComp.layer("Text 1");
    L2 = thisComp.layer("Text 2");
    r1 = L1.sourceRectAtTime(time,false);
    r2 = L2.sourceRectAtTime(time,false);
    ul1 = L1.toComp([r1.left, r1.top]);
    lr1 = L1.toComp([r1.left + r1.width, r1.top + r1.height]);
    ul2 = L2.toComp([r2.left, r2.top]);
    lr2 = L2.toComp([r2.left + r2.width, r2.top + r2.height]);
    top = Math.min(ul1[1], ul2[1]) - topMargin;
    bottom = Math.max(lr1[1], lr2[1]) + bottomMargin;
    left = Math.min(ul1[0], ul2[0]) - leftMargin;
    right = Math.max(lr1[0], lr2[0]) + rightMargin;
    ul = fromComp([left, top]);
    ur = fromComp([right, top]);
    lr = fromComp([right, bottom]);
    ll = fromComp([left, bottom]);
    createPath([ul, ur, lr, ll], [], [], true);
  • Dan Ebberts

    July 26, 2023 at 3:01 pm in reply to: 1 box around two text-layers

    If you have two text layers (“Text 1” and “Text 2”) and you create a shape layer by just clicking on an empty spot in the comp window with the pen tool, if you apply this expression to the shape layer’s path, you should get a box around your text layers:

    margin = 10;
    L1 = thisComp.layer("Text 1");
    L2 = thisComp.layer("Text 2");
    r1 = L1.sourceRectAtTime(time,false);
    r2 = L2.sourceRectAtTime(time,false);
    ul1 = L1.toComp([r1.left, r1.top]);
    lr1 = L1.toComp([r1.left + r1.width, r1.top + r1.height]);
    ul2 = L2.toComp([r2.left, r2.top]);
    lr2 = L2.toComp([r2.left + r2.width, r2.top + r2.height]);
    top = Math.min(ul1[1], ul2[1]) - margin;
    bottom = Math.max(lr1[1], lr2[1]) + margin;
    left = Math.min(ul1[0], ul2[0]) - margin;
    right = Math.max(lr1[0], lr2[0]) + margin;
    ul = fromComp([left, top]);
    ur = fromComp([right, top]);
    lr = fromComp([right, bottom]);
    ll = fromComp([left, bottom]);
    createPath([ul, ur, lr, ll], [], [], true);
Page 41 of 1081

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