Forum Replies Created

Page 58 of 65
  • Andrei Popa

    February 15, 2018 at 5:50 pm in reply to: marker name in the expression

    I tried your expression and found 2 flaws to it. It said that K1 is a function and it needed a number on line 22, and got out of reach for either markers or layers. So i modified it a bit. Tell me if it works, or what does’nt work, in case something is wrong. This is what i got
    n= 0;
    if (marker.numKeys > 0){
    n = marker.nearestKey(time).index;
    if (marker.key(n).time > time){
    n--;
    }
    };

    prev = n;

    next = (n>=marker.numKeys) ? marker.numKeys : (n+1);
    K1 = prev;
    K2 =next;

    Val1 = thisComp.layer("val "+prev.toString()).text.sourceText;
    Val2 = thisComp.layer("val "+next.toString()).text.sourceText;

    T1 = parseInt(Val1.split(' '));

    T2 = parseInt(Val2.split(' '));

    U = marker.key(K1).time;

    B = marker.key(K2).time;

    TT = ease(time, U, B, T1, T2);

    [TT, TT]

    Andrei
    My Envato portfolio.

  • Andrei Popa

    February 15, 2018 at 8:41 am in reply to: Expressions for mega dummies

    There is a script called iExpressions on aescripts.com . But has some costs to it. If you look for free information, i think your best bet is to google what you need and save it to your personal expression collection once you find it. And when you find something similar, but not quite what you need, you can always post on this forum and search for guidance.

    Andrei
    My Envato portfolio.

  • Andrei Popa

    February 14, 2018 at 2:55 pm in reply to: Layers opacity dependent on each other

    One workaround would be to make a null and add a slider. And make the layer that the slider indicates visible, and the rest invisible. Something like this would fix the situation. In my case the layer is called “Controls” and the slider is called “Visible layer”. visibleLayer = Math.floor(thisComp.layer("Controls").effect("Visible layer")("Slider"));
    if (visibleLayer == index) 100 else 0

    The condition for this would be that your layers start at layer 1 and don’t have any other layers between them

    Andrei
    My Envato portfolio.

  • Andrei Popa

    February 13, 2018 at 8:45 am in reply to: Insert line break after n words

    I don’t really know what you ask. And how your start text look. You have something like “Starts Tuesday 6th March 9pm” and want it split, or you have multiple dates and want them split?

    Andrei
    My Envato portfolio.

  • Andrei Popa

    January 30, 2018 at 7:52 am in reply to: Bar Graph Issues (file included)

    In the folowing expression the camera can not be parented as it will return the wrong value. You can use toWorld() or toComp() in that case(haven’t really used those, so i can not go in more detail). You put a null at the top of the bar and make it stay there. Then use this expression on your logo layers position. Modify mult until the position is the one you want. Mult should be the distance between camera and your logo. It is not my expression, I got it from here https://zacklovatt.com/points-along-a-line/

    p1 = thisComp.layer("Camera").transform.position;
    p2 = thisComp.layer("NullAtTopOfBar").transform.position;
    mult = thisComp.layer("HELPER").effect("Distance")("Slider");

    p1 + mult*(p2-p1)/length(p1,p2);

    Andrei
    My Envato portfolio.

  • What if you reload the project after you replace the footage with a shorter one? Maybe it sticks to the duration in some kind of RAM way, like AE does with some variables used in scripts.

    Andrei
    My Envato portfolio.

  • Andrei Popa

    January 26, 2018 at 8:32 am in reply to: Peak value calculation

    You will have to excuse my delay, i had to go to sleep and just got to the office right now. I have tested it with Dan’s expression and worked. The difference is that in my expression, i initiate the min with 0, which stays the minimum for all the duration. That is why it didn’t work. The big difference between Dan’s expression and mine is that his shows the value as it changes, while mine just snaps when getting to the keyframe. I recommend you try both. So for mine to work just change min initialization and use Math.mina =thisComp.layer("Shape Layer 1").transform.opacity
    max = a.key(1).value;
    for(i = 1;i<=a.numKeys;i++){
    if (a.key(i).time <= time) max = Math.max(max, a.key(i).value);
    }
    max

    Andrei
    My Envato portfolio.

  • Andrei Popa

    January 25, 2018 at 11:24 pm in reply to: Peak value calculation

    Maybe the first value is tha absolute minimum… I have just tried it and it work on my side.

    Andrei
    My Envato portfolio.

  • Andrei Popa

    January 25, 2018 at 10:44 pm in reply to: Peak value calculation

    You should use Math.min instead of Math.max

    Andrei
    My Envato portfolio.

  • Andrei Popa

    January 25, 2018 at 10:28 pm in reply to: Add expression to selection of properties

    This should not be so hard. Should look like thisif (layerProperty.expression == ''){ //the layer does not have an expression
    layerProperty.expression = yourExpression;
    }else{ //the layer already has an expression
    expr = layerProperty.expression;
    layerProperty.expression = yourExpression +'\n'+expr;
    }

    layerProperty should be the property you choose and yourExpression should be the expression you use. The ‘\n’ is used there as an empty line.

    Andrei
    My Envato portfolio.

Page 58 of 65

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