Forum Replies Created

Page 136 of 1081
  • Dan Ebberts

    August 4, 2020 at 7:08 pm in reply to: index shows 3 but is 4 how?

    Another really useful tool for figuring this stuff out is Jeff Almasol’s wonderful rd_GimmePropPath script. You can get it from his redefinery site.

    Dan

  • Dan Ebberts

    August 4, 2020 at 6:27 pm in reply to: index shows 3 but is 4 how?

    You can’t necessarily go by what’s visible in the UI. Especially with shape layers, there are hidden groups. Some of the ones you can see are likely in a hidden group called “Contents”. You can suss things out by poking around with a text layer with a source text expression like this:

    p = thisComp.layer(“Shape Layer 1”).content(“Rectangle 1”).transform.rotation;
    p.propertyGroup(2)(1).name

    Dan

  • Dan Ebberts

    August 3, 2020 at 6:25 pm in reply to: Combining two expressions

    Try it this way:

    parentStyle = thisComp.layer(“TEXT 3”).text.sourceText.style;
    parentStyle.setText(thisComp.name)

    Dan

  • Dan Ebberts

    August 3, 2020 at 12:29 am in reply to: Using current time with expressions

    The problem is that expressions have no memory, so you can’t keep track of when an event like that happens. What you could do is check if the sampleImage() result is currently above the threshold, and if so, then you can have the the expression go backwards in time, frame by frame, (using sampleImage’s time parameter) to find the frame where the value went from below the threshold to above the threshold. From that you can calculate how long ago that happened, and how far you should be into the time remapping. Tricky, but do-able.

    Dan

  • I haven’t tested it, but it should be like this:

    reload = effect(“Magazine Reload”)(“Slider”).nearestKey(time).index;
    if (time < effect(“Magazine Reload”)(“Slider”).key(reload).time) reload–;
    Math.round(value)+(25*reload);

    Dan

  • Dan Ebberts

    July 30, 2020 at 2:05 pm in reply to: multiple if else expressions

    I’m not sure what you’re asking. The expression can only have one result.

    Dan

  • Dan Ebberts

    July 29, 2020 at 8:03 pm in reply to: multiple if else expressions

    For a multi-conditional structure, you need an if, followed by a number of else if statements, and finally, an else. So your example might look like this:


    if (thisComp.layer("COLOR MASTER").effect("HOME SWAP")("Checkbox") == 1) {
    sampleImage([920,440],[1,1]);
    }else if (thisComp.layer("COLOR MASTER").effect("HOME PRI TO TER")("Checkbox") == 1) {
    sampleImage([930,536],[1,1]);
    }else{
    sampleImage([760,444],[1,1]);
    }

  • Like this maybe?

    linear(time,inPoint,outPoint,0,100)

    Dan

  • Dan Ebberts

    July 21, 2020 at 4:11 pm in reply to: Understanding layer/comp space transformation

    Try this:

    L = comp(“main_01”).layer(thisComp.name);
    fromComp(L.effect(“Point Control”)(“Point”))

    Dan

  • Dan Ebberts

    July 16, 2020 at 5:47 pm in reply to: Scale based on location/position

    I haven’t tested it, but it should be like this:

    pct = .25; // increase by 25%
    r = 100; // distance to begin increasing scale
    center = thisComp.height/2;
    p = toWorld(anchorPoint);
    d = length(p,[p[0],center]);
    mult = ease(d,0,r,pct,0);
    value*(1+mult)

    Dan

Page 136 of 1081

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