Skip to main content
RuryBild
Participant
Feb 2, 2017 4:49 PM UTC
Answered

Exporting individual layers or symbols

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 is closed to new replies. Start a new post to keep the conversation going.
ClayUUIDCorrect answer
Legend
Feb 3, 2017 9:18 PM UTC

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

10 replies

RuryBild
RuryBildAuthor
Participant
Feb 3, 2017 2:29 PM UTC

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

It would then be imported into After Effects afterwards.

Translate
kglad
Community Expert
Community Expert
Feb 3, 2017 2:42 PM UTC

see message 1.

Translate
Legend
Feb 2, 2017 5:55 PM UTC

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

Translate
kglad
Community Expert
Community Expert
Feb 2, 2017 5:11 PM UTC