Forum Replies Created

Page 5 of 7
  • Here’s a calculation-intensive idea: Loop through every previous frame to find the “highest yet” value, and there you go. That way the value would only ever rise.

    Pretty calculation-intensive because you’d have to recalculate everything on every frame, so for a long comp it could get pretty slow. You could probably get a similar result by only calculating every 3 frames in previous time, instead of every frame.

  • You could write a script that goes through all of project and sets a value to the parent comp name. (Or the first parent comp it comes to if there are more than one.) When the script comes to some kind of keyword in your expression, it could replace it with the parent’s comp name (making use of “.usedIn”). You’d probably want your expression to have error catching for when you haven’t run this script yet. You’d have to run the script every time it needed to be updated, then it would work. That’s the high level idea, the coding might get tricky. I did something like this a few years ago, but I couldn’t find the code for you.

  • Mitch Mann

    May 4, 2013 at 12:32 pm in reply to: Random looking wave by using Wave Warp?

    Two wave warp effects applied to the same layer, each with different values.

  • Mitch Mann

    April 23, 2013 at 1:54 pm in reply to: Position over time relative to width of comp

    After separating dimensions for your X & Y, here’s your X expression:

    myCompWidth = thisComp.width;
    myCompDuration = thisComp.duration;
    myCurrentTime = time;
    myPercentageIntoComp = myCurrentTime/myCompDuration;
    myResult = myCompWidth * myPercentageIntoComp;

  • Mitch Mann

    April 21, 2013 at 11:24 am in reply to: How to Combine 2 Expressions? Inerta Positon with Loop

    Maybe put one expression on a slider, and add it to the result of the other.

  • Mitch Mann

    March 20, 2013 at 1:34 pm in reply to: Parenting Source Text Between Two Compositions

    Expression in Child comp’s text layer for “Source Text”:

    comp(“Parent Text”).layer(“My Text Layer”).text.sourceText

  • Mitch Mann

    March 12, 2013 at 8:53 pm in reply to: Opacity fade in and out with marks

    Cool, I didn’t know you could do Eval’s in expressions, I’m going to try that. Thanks Dan!

  • Mitch Mann

    March 12, 2013 at 4:24 pm in reply to: Reference to expression text instead of final result

    I don’t think you can “Eval()” in expressions, unfortunately, so I’m not sure of a way to have one expression evaluate a line of code from a text layer, for example.

    Maybe just put your expression on a slider on a null layer, then have all the layers read the output of that slider.

  • Mitch Mann

    March 12, 2013 at 4:17 pm in reply to: Damping a rapidly changing value

    I’d probably do a college-dropout method, something like this:

    Get the value of the birth rate. Then get the value of the birthrate at a few places ahead in time and back in time (with valueAtTime.) Then use the highest value among these for your light. Or perhaps average all the values, depending on what you need / how it looks.

  • Mitch Mann

    March 12, 2013 at 4:08 pm in reply to: Opposite x and y position with expressions

    Expression on Solid’s Position:
    MyX = -thisComp.layer(“Null 1”).transform.position[0];
    MyY = -thisComp.layer(“Null 1”).transform.position[1];
    [MyX,MyY]

    Keep in mind that this will result in negative X & Y positions, which means they won’t be on the comp, they’ll be below zero. Just parent both the Null and the Solid to a master null in the middle of the comp to fix this.

    For faster and slower, just multiply or divide the results of this expression.

    Mitch

Page 5 of 7

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