Skip to main content
RuryBild
Participant
February 2, 2017
Answered

Exporting individual layers or symbols

  • February 2, 2017
  • 3 replies
  • 10218 views

Hello,

So with the current type of work I do, a lot of my workflow revolves around After Effects. I would love to be able to render individual layers or symbols to treat them independently in AE (whether it's SFX or a strange form of compositing or mapping).

Is there currently a way to do that? As it stands, I am only able to get a single still of a symbol, if it's solo-ed.

Cheers,

Rury

This topic has been closed for replies.
Correct answer ClayUUID

This may do what you want. Copy this code into a blank text file, then give it the extension JSFL.

// export selected layers of current timeline to image sequence

function main() {

    var dom = fl.getDocumentDOM();

    if (!dom) {

        alert("ERROR: No document available.");

        return;

    }

    var tl = dom.getTimeline();

    if (!tl) {

        alert("ERROR: No timeline selected.");

        return;

    }

    var layers = tl.layers;

    var sel = tl.getSelectedLayers();

    var len = layers.length;

    var vis = [];

    var t = 0;

    var i, type;

   

    // hide all but selected layers

    for (i = 0; i < len; i++) {

        type = layers.layerType;

        vis.push(layers.visible);

        if (i == sel) {

            t++;

        }

        else if (type == "normal" || type == "guided" || type == "masked") {

            layers.visible = false;

        }

    }

   

    // export timeline

    dom.exportPNG("", false, false);

   

    // restore initial state

    for (i = 0; i < len; i++) {

        layers.visible = vis;

    }

}

main();

Then double-click the JSFL file to run it against the current Animate document. Or to have it appear under the Commands menu, copy it into:

%LOCALAPPDATA%\Adobe\Animate CC 2017\en_US\Configuration\Commands

3 replies

RuryBild
RuryBildAuthor
Participant
February 3, 2017

I wish to render out a single layer or object from Animate.

It would then be imported into After Effects afterwards.

kglad
Community Expert
Community Expert
February 3, 2017

see message 1.

Legend
February 2, 2017

Are you talking about a single layer in After Effects, or a single layer in Animate?

kglad
Community Expert
Community Expert
February 2, 2017