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

Export Layers to PNGs

New Here ,
Jul 19, 2022 Jul 19, 2022

Hello,

 

Does anyone know a way I can export my layers in Adobe Animate as seperate PNG. For example in Photoshop I can use Layers to Files. A batch export. I need a way to do this.

1.3K
Translate
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 ,
Jul 19, 2022 Jul 19, 2022

1. you can set your publish settings (file>publish settings) to not include hidden layers.

2. hide all layers.

3. unhide the layer you want to export

4. export

 

repeat 3 and 4 as needed.  

 

and for automation, you can use a jsfl file to do this.

Translate
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 ,
Jul 20, 2022 Jul 20, 2022

Hello,

 

I can't seem to get the publish settings to export the layers as full size images of the canvas size. Unless I am doing something wrong. I assume I would need "image assets" but nothing publishes other than an empty folder. I don't want a sprite sheet. I just want the layer as is with the dimension of the canvas.

Where can I find a JSFL to do this?

Translate
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 ,
Jul 20, 2022 Jul 20, 2022

I think @sergiopop75 had a JSFL command for this. Can you help Sergio?

Translate
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
Contributor ,
Jul 21, 2022 Jul 21, 2022

Mario, thanks for the reference, it makes me feel important, 😂!

There is a Shane McCartney code:

 

var doc = fl.getDocumentDOM();
var lyrs = doc.getTimeline().layers;
var len = lyrs.length;
var lyr;
var originalType;
var i;
var saveDir = fl.browseForFolderURL("Choose a folder in which to save your exported SWFs:");

var layers = new Array();
var count = 0 ;

//create folder with the file name//
var docfoldername = doc.name ;
var numberOrNot = docfoldername.slice (17,18) ;

if ( numberOrNot == "0" || numberOrNot == "1" || numberOrNot == "2" || numberOrNot == "3" || numberOrNot == "4" || numberOrNot == "5" || numberOrNot == "6" || numberOrNot == "7" || numberOrNot == "8" || numberOrNot == "9" )
{
var exportDest = saveDir+ "/" + docfoldername.slice (0,18)+"_PNG"
}else{
var exportDest = saveDir+ "/" + docfoldername.slice (0,17)+"_PNG"
}
FLfile.createFolder(exportDest);


if (saveDir) {
fl.outputPanel.clear();
var originalTypes = new Array();


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

lyr = lyrs[i];

originalTypes[i] = lyr.layerType;

};


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

lyr = lyrs[i];

lyr.layerType = "guide";

};


for (i=0; i < len; i++) {
lyr = lyrs[i];

originalType = originalTypes[i]
if (originalType == "normal" && lyr.visible == true) {
lyr.layerType = "normal";

// padding 0s
if (count<10){
var padding = "0"+count
}else{
var padding = count
}

doc.exportPNG(exportDest +"/" + padding + "_"+lyr.name+".png", true);

fl.trace("Exported: " + lyr.name+".png");

lyr.layerType = "guide";

count += 1;

}
};


for (i=0; i < len; i++) {
lyr = lyrs[i];

lyr.layerType = originalTypes[i];
};
}


____
2D vector animator since 2000 & PhD
Translate
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 ,
Jul 21, 2022 Jul 21, 2022

@sergiopop75 

 

before you answer a bunch of questions helping the op to implement that code, you should address:  "I can't seem to get the publish settings to export the layers as full size images of the canvas size."

 

i think the op is under the impression that using jsfl will "solve" this.

Translate
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
Explorer ,
Apr 13, 2023 Apr 13, 2023

Hello, this is a very useful script, thank you!
I am having an issue where the script is generating about 70 extra empty pngs between keyframes,

explorer_2023-04-13_11-22-07.png

On a test file with default settings; get about 3 empty pngs between frames.

explorer_2023-04-13_11-07-29.png

Animate_2023-04-13_11-22-43.gif

Ever experience this issue before? It's something at the file level.

Translate
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
Contributor ,
Apr 18, 2023 Apr 18, 2023
LATEST

Do you have any empty layers?


____
2D vector animator since 2000 & PhD
Translate
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 ,
Jul 20, 2022 Jul 20, 2022

does following steps 1 to 4, export your layer as an image (with its size unchanged from the graphic on-stage in that layer)?

Translate
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 ,
Jul 22, 2022 Jul 22, 2022

It's a little bit of a round about approach, but you could publish SWFs, import those into an After Effects project, and then use File > Save Frame As... > Photoshop Layers to get to your Animate artwork over to Photoshop.

 

Working with Adobe Premiere Pro and After Effects

https://helpx.adobe.com/animate/using/premiere-pro-effects.html

 

Scroll down to Importing SWF files into After Effects.

Translate
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