Forum Replies Created

Page 6 of 32
  • The script Zorro will do most of this i believe.

    https://aescripts.com/zorro-the-layer-tagger/

    Xavier

  • You can use indexOf, as many times as there are letters to test:

    str = thisLayer.textSource.value;
    if (str.indexOf("Ó")>=0 || str.indexOf("Ż")>=0 || str.indexOf("Ń")>=0 || str.indexOf("Ć")>=0){
    thisValue;
    }
    else{
    thatValue;
    };

    If you like it short, this also works:

    if (RegExp("\[ÓŻŃĆ\]").test(thisLayer.textSource.value)) thisValue else thatValue;

    Xavier

  • Xavier Gomez

    September 24, 2016 at 8:27 pm in reply to: Mouseover on palette

    Not for floating palettes.

  • Xavier Gomez

    September 24, 2016 at 3:03 pm in reply to: Mouseover on palette

    Which system / AE version do you use to get it to work on a floating palette ?

  • Xavier Gomez

    September 24, 2016 at 1:50 pm in reply to: Mouseover on palette

    Hi Jacob,

    I tried your idea on Windows7 , CC2014, and the event does not trigger.
    Only when a child is added, it does trigger, but on the child, not the window itself.

    It’s pretty cool idea though, given that .onActivate does not work for dockable panels.
    I tried it on a dockable panel instead of a palette, and it seems to work, but again might be version dependant (AE or OS).
    This is the code i used:


    pal = this instanceof Panel ? this : new Window("palette", "name", undefined, {resizeable:false});

    pal.add("button{text: 'button 1'}");
    pal.add("button{text: 'button 2'}");
    pal.add("button{text: 'button 3'}");

    pal.addEventListener("mouseover", mouseoverHandler);
    function mouseoverHandler(ev){
    if (!ev.view.parent){
    this.children[1].enabled = !this.children[1].enabled;
    };
    };
    pal instanceof Window ? pal.show() : pal.layout.layout(true);

    (i removed the alert and changed it to something softer, otherwise the event never stops triggering).

    Event stuff is ancient Egyptian for me, but this should be roughly true:
    Inside the event, ‘this’ is the graphic element the listener was attached to (the window or panel).
    ev.view is the graphic element that triggers the event.
    So: !ev.view.parent means that the graphic element that triggered the event is a top level container.

    Xavier

  • Xavier Gomez

    September 23, 2016 at 9:20 pm in reply to: Converting 2D expressions to 1D

    What error do you get ?

  • Xavier Gomez

    September 23, 2016 at 2:08 pm in reply to: Timeline segmentation

    Sketch is ideal.

    I realized some lines in the expression are superfluous and even not used. This one is better:

    t1 = 0;
    t2 = thisComp.duration;
    numCycles = 6;
    numStepsPerCycle = 8; // 6+2
    // ============================

    if (time<=t1 || t2<=time){0;}else{
    t = time-t1;
    fullDuration = t2-t1;

    stepDuration = fullDuration/(numCycles*numStepsPerCycle);
    cycleDuration = numStepsPerCycle*stepDuration;
    cycleIndex = Math.floor(t/cycleDuration);

    phaseShiftPerCycle = 360/numCycles;
    shiftStart = cycleIndex*phaseShiftPerCycle;
    linear(t%cycleDuration, stepDuration, cycleDuration-stepDuration, shiftStart, shiftStart+360)%360;
    };

    Xavier

  • Xavier Gomez

    September 23, 2016 at 1:39 pm in reply to: Timeline segmentation

    Hi,
    you can try this, which seems to reproduce your graphics.
    But i’m surprised because your graphics has no color doubling as announced in the first post.

    t1 = 0;
    t2 = thisComp.duration;
    numCycles = 6;
    numStepsPerCycle = 8; // 6+2
    // ============================

    if (time<=t1 || t2<=time){0;}else{
    t = time-t1;
    fullDuration = t2-t1;

    stepDuration = fullDuration/(numCycles*numStepsPerCycle);
    cycleDuration = numStepsPerCycle*stepDuration;
    stepIndex = Math.floor(t/stepDuration);
    cycleIndex = Math.floor(stepIndex/numStepsPerCycle);
    stepIndexInCycle = stepIndex%numStepsPerCycle;

    phaseShiftPerCycle = 360/numCycles;
    shiftStart = cycleIndex*phaseShiftPerCycle;
    linear(t%cycleDuration, stepDuration, cycleDuration-stepDuration, shiftStart, shiftStart+360)%360;
    };

    Xavier

  • Xavier Gomez

    September 22, 2016 at 6:08 pm in reply to: Timeline segmentation

    Thank you for sharing 😉

    Can you post a screenshot of how it should look like in the graph editor ?

  • Xavier Gomez

    September 22, 2016 at 12:47 pm in reply to: Limit movement to Comp dimensions

    You could also hit P to reveal the position property of the layer, then either :
    right click the position property, > reset to recenter,
    or shift+scroll the x value to scroll faster.

    Xavier

Page 6 of 32

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