• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Exporting individual layers or symbols

New Here ,
Feb 02, 2017 Feb 02, 2017

Copy link to clipboard

Copied

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

Views

8.7K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Feb 03, 2017 Feb 03, 2017

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;

   

...

Votes

Translate

Translate
Community Expert ,
Feb 02, 2017 Feb 02, 2017

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 02, 2017 Feb 02, 2017

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 03, 2017 Feb 03, 2017

Copy link to clipboard

Copied

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

It would then be imported into After Effects afterwards.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 03, 2017 Feb 03, 2017

Copy link to clipboard

Copied

see message 1.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 03, 2017 Feb 03, 2017

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 03, 2017 Feb 03, 2017

Copy link to clipboard

Copied

Dude that's AWESOME! I just tried this myself and it totally works but you have no control over which layer it exports... it only exports the top layer not the others. How would you tweak it to tell it which layer to export? Or loop through all?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 03, 2017 Feb 03, 2017

Copy link to clipboard

Copied

Um, it should only be exporting the selected layers. Most of the code is dedicated to precisely that.

Did you try clicking on a different layer before running the script?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 05, 2017 Feb 05, 2017

Copy link to clipboard

Copied

Nope, but then in my weak defense, you didn't say as much in your initial post... Okay cool I'll try that! Thanks dude.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 15, 2022 Dec 15, 2022

Copy link to clipboard

Copied

This is great! Is there a way to modify it so that it only prints out a specified range of frames, but still only one layer?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 15, 2022 Dec 15, 2022

Copy link to clipboard

Copied

LATEST

@chimi227 

 

yes, you can use the link in the first reply here to see how to fill in the details, but the main idea is to use

 

dom.exportInstanceToPNGSequence()

 

instead of

 

dom.exportPNG()

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines