Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Creating a Zorro-like script that functions via dialogue popup (no UI panel)

  • Creating a Zorro-like script that functions via dialogue popup (no UI panel)

    Posted by Rob Frese on July 25, 2014 at 2:19 am

    Hey guys and gals. This forum’s been so helpful to me in the past. Can’t thank you all enough.

    I’m trying to write a script to augment my use of Zorro-the layer tagger. I don’t want it to have a UI panel, instead I want it to be invoked via File>Scripts (actually via a keyboard shortcut that points to it).

    I have half the code written, but I need help with the other half as I’m very new to scripting and have no idea where to start (and countless searches haven’t led to anything).

    Ideally it will operate as follows:

    When the script is invoked, a dialogue UI pops up with an area for you to enter text. You enter text, the box goes away and the script searches for layers with Zorro tags (aka comments) that contain the text you entered. It then isolates those layers, aka it shys all layers that don’t have that tag and activates the comp shy toggle.

    I already wrote a script that isolates all layers with the tag of your choice (in this case the tag was “CONTROL”, script is attached in the code below) — using this script via keyboard shortcut has saved me so much clicking and such (especially when combined with a script/shortcut that resets all shy settings).
    I’m dying for a script that operates like this, but lets me type in what tag it’ll isolate.

    Some of you might say “why don’t you just click around Zorro to do this” — yes, but the way my workflow goes, constantly switching tag/isolation combinations and such, this would save me so much time (the aforementioned script has already saved me tons of time).

    Ideally, if I really learn scripting, I would be able to have the thing remember/read tags, give you options of tags, etc. Kind of like Zorro being invoked by a Quicksilver/Alfred type launcher.

    Any help with this is greatly appreciated.

    var thisComp = app.project.activeItem;

    for(var i = 1; i <=app.project.activeItem.layers.length; i++) {
    if (thisComp.layer(i).comment.indexOf( "CONTROL" ) != -1) {
    thisComp.layer(i).shy = false;
    } else {
    thisComp.layer(i).shy = true;
    }
    }
    thisComp.hideShyLayers = true;

    Rob Frese replied 11 years, 10 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

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