Forum Replies Created

Page 43 of 65
  • Andrei Popa

    December 11, 2019 at 2:19 pm in reply to: Autoscale Text Box with fixed height ?

    Would modifying the white box accordingly bee a problem? So when you have Q’s, the white box would also be higher?

    Andrei
    My Envato portfolio.

  • Andrei Popa

    December 6, 2019 at 9:27 am in reply to: Count how many objects within a given bounding area

    Try this:

    Draw your area as a Shape Layer. Make sure to add fill to it.
    Name it “Area” for the expression to work. Choosing another name means you must change the name in the expression too.

    Make a text layer. Add this expression to the text field.


    layerCount = 0;
    startCount = 2; //index of the first counted layer
    stopCount = 5; //index of the last counted layer
    target = thisComp.layer("Area");
    for(var i = startCount; i<=stopCount;i++){
    if (target.sampleImage(thisComp.layer(i).transform.position,[1,1],true,time)[3] == 1) {
    layerCount++;
    }
    }
    layerCount;

    Andrei
    My Envato portfolio.

  • Put this expression to your anchorpoint


    var top = sourceRectAtTime(time,false).top;
    var myHeight = sourceRectAtTime(time,false).height;
    var y = top + myHeight/2;
    [value[1],y]

    If you want the anchor point to be in the middle vertically as well as horizontally use this:


    var left = sourceRectAtTime(time,false).left;
    var top = sourceRectAtTime(time,false).top;
    var myWidth = sourceRectAtTime(time,false).width;
    var myHeight = sourceRectAtTime(time,false).height;
    var x = left + myWidth/2;
    var y = top + myHeight/2;
    [x,y]

    Andrei
    My Envato portfolio.

  • If you want to use your new line for any shape(not just a rectangle), just use and index instead of the name. Something like:


    c = content(1).content("Fill 1").color

    If you want to find out exactly what index that is, I suggest installing “GimmePropPath” script form redefinery.com. Actually, if you want to continue doing scripting, you should definitely install that script.
    Here’s a link for a collection that contains GimmePropPath and a bunch of other really cool scripts.
    https://www.redefinery.com/ae/rd_scripts/

    Andrei
    My Envato portfolio.

  • Andrei Popa

    December 3, 2019 at 8:04 am in reply to: Change color tones with expressions?
  • You can’t access the position of a letter or a word inside a paragraph.

    Andrei
    My Envato portfolio.

  • Andrei Popa

    November 29, 2019 at 12:17 pm in reply to: control slider keyframe with MARKER

    What do you mean use them like toggle hold keyframe? To have the slider the value of first keyframe until it reaches the second and then snap to that value?

    And if you want to rename the markers as you please, you can re-create those 2 keyframes and add this expression instead. The values are now taken from the keyframes.


    v1 = valueAtTime(key(1).time);
    v2 = valueAtTime(key(2).time);
    t1 = marker.key(1).time;
    t2 = marker.key(2).time;
    (isNaN(v1+v2)) ? value : linear(time,t1,t2,v1,v2);

    Andrei
    My Envato portfolio.

  • Andrei Popa

    November 29, 2019 at 6:45 am in reply to: control slider keyframe with MARKER

    If you plan to use it like this, you don’t even need keyframes. This expression will take the values from the markers comments. Just make sure the comments are always a number.

    v1 = parseInt(marker.key(1).comment);
    v2 = parseInt(marker.key(2).comment);
    t1 = marker.key(1).time;
    t2 = marker.key(2).time;
    (isNaN(v1+v2)) ? value : linear(time,t1,t2,v1,v2);

    Andrei
    My Envato portfolio.

  • Andrei Popa

    November 28, 2019 at 12:37 pm in reply to: control in and out with SLIDER

    You can’t move layers with expression. But i think you could do this:

    Set all layers start point and end point equal.
    Make 3 sliders(duration of A, B and C);

    So let’s say you have the “Controls” layer that has 3 sliders, “Text A”, “Text B” and “Text C”.

    Write this in the opacity expressions of the layers.

    Text A

    s = inPoint;
    d = thisComp.layer("Controls").effect("duration A")("Slider");
    (time > s && time < s+d) ? value : 0;

    Text B

    s = inPoint+thisComp.layer("Controls").effect("duration A")("Slider");
    d = thisComp.layer("Controls").effect("duration B")("Slider");
    (time > s && time < s+d) ? value : 0;

    Text C

    s = inPoint+thisComp.layer("Controls").effect("duration A")("Slider")+thisComp.layer("Controls").effect("duration B")("Slider");
    d = thisComp.layer("Controls").effect("duration C")("Slider");
    (time > s && time < s+d) ? value : 0;

    Andrei
    My Envato portfolio.

  • Andrei Popa

    November 28, 2019 at 12:23 pm in reply to: Text Style Expressions in AE2020

    Try this

    text.sourceText.style.setFontSize(100)

    The style belongs to the ‘sourceText’ Class, not in ‘global’ Class.

    Andrei
    My Envato portfolio.

Page 43 of 65

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