Forum Replies Created

Page 27 of 277
  • Unfortunately no, the mogrt doesn’t know how much it gets stretched, or anything else of what’s happening in premiere.

    Having the user manually input the length of the resulting clip into a text field is also the only workaround I’ve been able to come up with.

  • Filip Vandueren

    October 18, 2022 at 6:53 am in reply to: ExtendScript for After Effects

    Hi Anthony, it sounds like you are re-inventing the wheel:

    these scripts are extremely useful for inspecting properties of layers:

    The original Website is down, but you can find it here:

    https://web.archive.org/web/20200810005131/http://www.redefinery.com/ae/rd_scripts/

  • Filip Vandueren

    October 15, 2022 at 7:05 am in reply to: Compare Arrays in Extendscript

    If you need it in scripting, it’s easier to implement with indexOf(). This is also not in Extendscript, but it is a bit easier to ‘polyfill’:

    if (!Array.prototype.indexOf) {
    Array.prototype.indexOf = function(obj, start) {
    for (var i = (start || 0), j = this.length; i < j; i++) {
    if (this[i] === obj) { return i; }
    }
    return -1;
    }
    }
    myLayers = [1,12];
    containingLayers = [1,2,3,4,5];
    success = true;
    for (var i = 0; i < myLayers.length; i++){
    if (containingLayers.indexOf(myLayers[i])==-1) {
    success = false;
    break;
    }
    }
    succes;

    (Haven’t tested this)

  • Filip Vandueren

    October 14, 2022 at 8:30 am in reply to: Adjustable countdown for Essential Graphics

    Graag gedaan Gerben 🙂

  • Filip Vandueren

    October 14, 2022 at 7:34 am in reply to: Master Slider control other linear()

    To make the slider control the animation, you would not use time but slider value, and since you can animate the slider from 0-100 (same range as transition completion) you wouldn’t need a linear() to remap the ranges, this simple linked expression does it:

    effect("Slider Control")("Slider")

    But for the 2nd part of your question, it depends on what you mean by in sequence.

    Should they all react to the same slider, but delayed: the 2nd wipe 10 frames later and the 3rd wipe 20 frames later for example ?

    Or should the 1 slider control all 3, but the 2nd doesn’t start untill the 1st wipe is completed, and the 3rd wipe starts when the 2nd is completed ?

    Or is the slider not controlling the completion, but the delay ?

  • Filip Vandueren

    October 14, 2022 at 7:26 am in reply to: controlling 4 keyframes with sourcerectattime

    Hi Adam, this expression on the position keyframes seems to do it:

    marginRight = 1720;
    precomp1=thisComp.layer("right");
    txt1=precomp1.source.layer("title");
    sr1=txt1.sourceRectAtTime();
    precomp2 =thisComp.layer("titre droit");
    txt2 = precomp2.source.layer("day time");
    sr2=txt2.sourceRectAtTime();
    offset1 = parent.fromComp(
    precomp1.toComp(
    txt1.toComp(
    [sr1.left+sr1.width, sr1.top+sr1.height]
    ),2
    ),2
    ) - parent.fromComp([marginRight,0]);
    offset1[1]=0;
    offset2 = parent.fromComp(
    precomp2.toComp(
    txt2.toComp(
    [sr2.left+sr2.width, sr2.top+sr2.height]
    ),8
    ),8
    ) - parent.fromComp([marginRight,0]);
    offset2[1]=0;
    p1=key(1).value;
    p2=key(2).value;
    p3=key(4).value;
    p4=key(6).value;
    if (time<key(2).time) {
    linear(value[0],p1[0],p2[0],p2-offset1,p1);
    } else if (time<key(4).time) {
    linear(value[0],p2[0],p3[0],p2-offset1,p3-offset2);
    } else {
    linear(value[0],p3[0],p4[0],p3-offset2,p4);
    }

    I tested it with a number of different titles and it seems to work ok, but let me know if you run into an edge case where it doesn’t perform as expected.

  • Filip Vandueren

    October 12, 2022 at 6:30 am in reply to: controlling 4 keyframes with sourcerectattime

    Does it need to be set up with a precomp 5 levels deep ?

    That really complicates the setup and makes the expression a bit harder.

  • Filip Vandueren

    October 9, 2022 at 3:50 pm in reply to: Floating sphere’s forming a shape

    A simpler 2D approach can be done with the pastiche plugin

  • Filip Vandueren

    October 8, 2022 at 1:36 pm in reply to: Change dot to comma in expression

    I would do it compactly like this, letting Javascript do the number parsing/formatting

    myNumber = Math.floor(1234567890.835);

    mySeparator = "_";

    new Intl.NumberFormat('en-US').formatToParts(myNumber).reduce((r,e) => r+(e.value=="," ? mySeparator : e.value), '');

  • Filip Vandueren

    October 7, 2022 at 1:13 pm in reply to: Adjustable countdown for Essential Graphics

    Hi Gerben, my expression is for a text-layer’s sourceTect property, so it returns a correctly formatted string, not a number.

    If you need just the number (to use on a slider) delete everything starting at New Intl…

Page 27 of 277

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