Jump to content
johs

Export layers to multiple files

Recommended Posts

Hi Affinity Team

 

Would it be possible to add functionality to export all the layers from a document to separate files? (especially in Affinity Photo)

 

We often get multilayer .psd's from our clients containing a bunch of supers and splashes that we need to animate on TVC's, and we always need to export each layer out as a separate image file.

In PS there is a "script" called "Export layers to files" but it is quite limited regarding file formats and saving options.

 

So I request the addition of a "Export layers to separate files" check box in the export dialog for all formats.

And regarding the naming of the outputted files then it could be just as simple as "documentName_layerName.ext".

 

 

Good work so far, I'm really looking forward for the official release of Affinity Photo

 

Cheers

/johs

 

 

Share this post


Link to post
Share on other sites

Hi johs,

 

Just go to the Export Persona, change to the 'Layers' panel and select all the layers in there and click 'Create Slice' and then go to the 'Slices' panel. Notice that you have now create an exportable slice for each layer. You can select each one and choose its export format and properties. Now you can either select 'Export all' or just click each one to export it individually :)

 

Hopefully that's what you're after? :)

Matt

Share this post


Link to post
Share on other sites

Hi Matt

 

Thanks for your reply.

 

I hadn't thought about doing it that way. It takes some clicks to set it up, but when it is done it is quite fast. And the export itself are like 100 - 1000 times faster than PS!!!!! 

I like that it is possible to change format and options for each slice, but also possible to change all at once by selecting them all, nice work.

 

The only problem is that the layers/slices are trimmed. Often the supers are placed correctly in the frame as the agency wants it when we get it, so it would be nice to be able to export it untrimmed so we can keep the original placement. Is that possible already?

 

And would it be possible to prefix all the filenames with the document name or a custom string? 

 

cheers

/johs

Share this post


Link to post
Share on other sites

Ah... I knew there'd be a catch! ;)  At the moment, I don't think it can export untrimmed - I'll add this to the list of sensible suggestions to implement! Also, power fields in the slice name (that expand to document name, for example) would be very cool, so I'll add that to the list too!  Sorry that there's no workaround there in the meantime though :(

 

Thanks,

Matt

Share this post


Link to post
Share on other sites

Hi Matt

 

Cool!

The naming is nice to have but no showstopper.

-And I can work with either regular export or the trimmed one at the moment, luckily we aren't to busy right now;)

 

Thanks for your help and for adding the request to the sensible suggestions list :)

 

cheers

/johs

Share this post


Link to post
Share on other sites

Heya! Is there a way to define export sizes? Eg I want to export a logo at different sizes. I know there is a 1x, 2x, 3x option, but quite often I design logos much larger than what I export them as. I'm new to this and am probably thinking of it in the wrong way :)

 

UPDATE: I see that this has already been requested :)

Share this post


Link to post
Share on other sites

Hi

 

The size of slices issue can be worked around with a rectangle with no fill and no stroke.

But it could be handy to be able to export sets of layers with same size and even a common set of layers.

Like when making icons for devices with a common frame but various images taking name from the image layer.

 

Great tool getting better :-)

Share this post


Link to post
Share on other sites

In affinity Designer I find the ability to export layers from the Export Persona a great feature but when trying to export layers with objects that go beyond the canvas slices take that into consideration and result in different proportions. It would be really helpful to have and option to limit the size of the created layer slices to the size of the canvas/artboard. I've tried to make a rectangle the size I want in the layer but the slice, when exported, shows the triangle and not the whole content of the layer.

 

Great tool!

And happy birthday to Affinity Designer!

Max

Share this post


Link to post
Share on other sites

I for one really need this production capability!

To be clear, what I need (and I'm sure others are in the same boat) is the ability to specify a "base layer" or layers (like a background pattern, logo, watermark, etc.) beneath/above which other layers are to be added, either individually or in groups, and then exported as fully composed individual files. 

For example, I'm doing a t-shirt design on multiple colors of shirts. The final, composed files for each color of shirt will all have the same drop shadow, background, logo, text, etc.

If there were a way to batch process export, it would be an enormous time, sanity and maybe life saver!

The document might look something like: 

Layer 1: Logo
Layer 2: Main t-shirt graphic
Layers 3-15 (maybe in a set): Shirts of the same geometry (size and shape), but of different colors. 
Layer 16: Shirt drop shadow
Layer 17: Contact/copyright info

Layer 18: Background

Of course, I can save off each composed piece of art (featuring a different colored t-shirt) separately, but this is time consuming and tedious, particularly when working with dozens of t-shirt designs! Computers are supposed to make repetitive tasks easy, right? 

If this could be done with a SIMPLE, easy to use interface, so much the better. 

I'm thinking there might be a toggle to "lock" all layers/groups which remain the same, and then another which is is labeled something like: "rotate thru images on save". 

You then go to Export and voila -- you've now got separate, composed, final files for the different t-shirt colors!

Anyway, I love Affinity Photo, but when it comes to stuff like this, it's looking like I'm going to have to back to Photoshop (and it's dread scripting ability). Unless you can tell me otherwise, of course! 

Thanks. 

 

FOLLOWUP: After MANY HOURS of trying various software and searching, I found one app on Mac that does the job quickly and easily, if simplistically. You can load in a background, bulk upload a set of pics to be overlayed (in my case, .png files of t-shirts), and then batch output to a folder. It's NCH's Pixillion. FYI. It's even got a free trial. I still hope Affinity can come up with a more robust method of doing this. :-)
 

Edited by Graphix Guru
Clarification and Add'l Info

Share this post


Link to post
Share on other sites

I think it's a bit complicated since you still have to click on each slide to export them separately. Would like to see the options in the dialogue box saying what we want to export:

- Whole document

- Layer 1

- Layer 2

- Layer 3

- etc.

Share this post


Link to post
Share on other sites

It looks like Photo still can't do this?

I will have to download GIMP to get this functionality for now. What a bummer.

I'm preparing alphas for use as texturing tools. there are about 600 of various sizes and I need them all to be exactly 2048 x 2048 to work well in texturing software. So I need to import them so that they all line up perfectly in the center of the document, and then export all layers individually. I thought the batch job tool would do this, but apparently not.

Share this post


Link to post
Share on other sites

Export layers maintaining the document size and its position in it is a must for matte painters to be able to re-comp them into nuke. Keep us posted if there is updates! Thank you!

Share this post


Link to post
Share on other sites

Let me also vote for this feature. I hope to easily export each layer as PNG. Then my game dev tool can pack these as spritesheet (trimming the alpha, but maintaining relative position).

In case it helps anyone, let me share my workaround:

- Save the art to SVG from Affinity Designer. 

- Call Inkscape (free/open source) command line to export individual symbol from SVG. inkscape "sourceFile.svg" -i symbolName -j -C -e "layer1.png" --without-gui. Quick explanation: "-i" - only export specific symbol, "-j" - only export symbol (all other content is hidden), "-C" - export entire page. 

Share this post


Link to post
Share on other sites

I need the exported layer to remain a specific size for its final use, and by the time I've gone and fussed with positioning a slice, I might as well have just saved the layer by turning everything else off and on again. It would work better for me if I could set the dimensions of a slice, or make it snap to the edges instead of overshooting into the artboard and having to be dragged back into place. However, having to size the slice rather than setting its dimensions pre-click means it's too labour intensive compared to the Photoshop alternative (not that it's worth it to me, I just use Tinytask to record a macro of the clicks and keyboard shortcuts I use so I only have to hit one button to do a few moves). It's useful to know about the slices option but count this as another vote for the feature to export all layers as pngs with a different name, at a specific set size. It is a feature I would use if it were added.

Share this post


Link to post
Share on other sites

Hi

i need defenatly the function to export layers to png with the size of the canvas..so positioning is still right..in illustrator i have a simple script for that..

but i want to switch completly..pls...pls..thnaks 🙂

 

Share this post


Link to post
Share on other sites

If your document layers are pixel layers with 100% opacity you could try this

1. In the Layers panel select all pixel layers that will be trimmed in the Export Persona, then

Edit > Matte (Opacity 1%)

The Matte is applied to all selected layers at once hence no need to do them separately

Now when you export the slices in the Export Perona they will all be at the full canvas size - if you export to PNG format they will all have a transparent background (well almost transparent)

Since the Matte we applied was 1% there will still be a faint colour applied to the background of the exported PNG files which is invisible to the naked eye but if that will still be a problem in whatever process you do next with the files, you could try this...

2. Open one of the exported PNG files then...

Select > Alpha Range > Select Partially transparent (which should select all the background Matte)
Then hit the Delete key - which should make the transparent background truly transparent.

You should be able to create a Macro for all the steps in stage 2 and run that via File > New Batch Job to process all the PNG files at once.


I doubt the above will solve every requirement for this feature but it may help in some of them


Due to the fact that Boris Johnson is now our Prime Minister, punctuation, spelling and grammar will never be worried about ever again.  We now have far bigger problems to be worried about.

Share this post


Link to post
Share on other sites

This feature is definitely missed in Affinity Designer, another vote from me. When creating slices from layers, having the option of setting the slice dimension from the canvas dimension would be a great addition to the software.

Share this post


Link to post
Share on other sites
Quote

If your document layers are pixel layers with 100% opacity you could try this

1. In the Layers panel select all pixel layers that will be trimmed in the Export Persona, then

Edit > Matte (Opacity 1%)

The Matte is applied to all selected layers at once hence no need to do them separately

Now when you export the slices in the Export Perona they will all be at the full canvas size - if you export to PNG format they will all have a transparent background (well almost transparent)

Since the Matte we applied was 1% there will still be a faint colour applied to the background of the exported PNG files which is invisible to the naked eye but if that will still be a problem in whatever process you do next with the files, you could try this...

2. Open one of the exported PNG files then...

Select > Alpha Range > Select Partially transparent (which should select all the background Matte)
Then hit the Delete key - which should make the transparent background truly transparent.

You should be able to create a Macro for all the steps in stage 2 and run that via File > New Batch Job to process all the PNG files at once.

I found a workaround that is a little bit easier (for us at least :) ) than the suggested approach above. 

  1. Create a layer with 0 % opacity covering the whole canvas. Duplicate as many times as the layers you want to export
  2. Now, group one canvas sized transparent layer with each desired original layer to export  
  3. Switch to Export Persona and create slices from your new groups
  4. Export 
  5. Voilá

Share this post


Link to post
Share on other sites
19 hours ago, akldjf said:

I found a workaround that is a little bit easier (for us at least :) ) than the suggested approach above. 

  1. Create a layer with 0 % opacity covering the whole canvas. Duplicate as many times as the layers you want to export
  2. Now, group one canvas sized transparent layer with each desired original layer to export  
  3. Switch to Export Persona and create slices from your new groups
  4. Export 
  5. Voilá

Is it possible to improve this approach further ? I'm thinking symbols, etc. 

Share this post


Link to post
Share on other sites
On 5/29/2020 at 7:33 AM, akldjf said:

Is it possible to improve this approach further ? I'm thinking symbols, etc. 

I couldn't get your approach to work for me -- my layers are individual images which frequently bleed outside the canvas margins, and despite the mention of "trimmed" results above I find Export All Slices seems to export at a variety of pixel dimensions larger than the 0% opacity "canvas sized" pixel layer I group to each slice. In other words, the grouped transparent layer pushes the margins out to the edge of the canvas, but if the layer content already extends beyond the canvas, I can't get it to trim to the canvas.

+1 vote for Export All Layers in Affinity Photo, creating a series of canvas-sized export files each preserving the relative positioning of the layer within (otherwise transparent) canvas-sized images. This would be useful for all sorts of mock-up and presentation work.

 

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

Please note the Annual Company Closure section in the Terms of Use. These are the Terms of Use you will be asked to agree to if you join the forum. | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.