Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Batch Replace Smart Layer & Save as Jpg using S/L Name.

New Here ,
Dec 16, 2019 Dec 16, 2019

Copy link to clipboard

Copied

Hi There, 

 

I have a pickle and am a bit of a novice when it comes to scripting. I have a Polo Design .PSD file with a smart object. 
Inside this smart object are going to be literally a couple of thousand different designs each with their own layer name eg: MP-001.jpg, MP-002.jpg etc etc. 

 

Here is what I need to do;

  • Save the Polo design using the top smart layer as either a jpg or psd using the smart layer name: ie MP-001.jpg
  • After the file is saved, delete or turn off the smart layer that has been saved.
  • Then move on to the next one...

 

Is there a script or some sort of batch setting that could help me accomplish this? 

Any help would be greatly appreciated.

TOPICS
Actions and scripting, How to, Import and export, Mac

Views

1.4K

Likes

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
Adobe Community Professional ,
Dec 16, 2019 Dec 16, 2019

Copy link to clipboard

Copied

Likes

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
Adobe Community Professional ,
Dec 16, 2019 Dec 16, 2019

Copy link to clipboard

Copied

I must admit, before anything else that I do not understand your problem. Based on first screenshot I have idea that you are looking for File > Export > Layers as Files but that can be my idea only.

You can record Photoshop action but to give you more precise guidelines I must understand what exactly you want or what is the problem. For now I think that you have Smart Object layer with lots of layers inside which you want to export as separate files.

Likes

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 16, 2019 Dec 16, 2019

Copy link to clipboard

Copied

Hi Bojan. 

I have attached a screen cast to help explain. In the example I only have 5 design in the smart object layers.  There is infact 3000 in total that I need to save as jpgs. 

https://www.sportsdistributors.co.nz/wp-content/uploads/2019/12/Screen-Recording-2019-12-17-at-11.47...

 

NOTE: In the video I have been saving as PSD, this infact needs to be .jpg

 

 

Likes

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
Adobe Community Professional ,
Dec 16, 2019 Dec 16, 2019

Copy link to clipboard

Copied

My conclusion is: you have files with Smart Object layers which contains several images without layer comps, just layers one above another. You want to edit/open Smart Object layer, hide top most layer, save that change and export main file as JPG image. You want to edit smart object layer several time and to save several JPG files.

The question is: do you have same amount of layers inside smart object layer in all your templates? Or you have only this template which needs update and replacement plus save as JPG?

Likes

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 16, 2019 Dec 16, 2019

Copy link to clipboard

Copied

Thanks for your reply, 

The smart object layer will have nearly 3000 layers, or possibly in smaller batches. 

 

It would be the second issue you stated where the template will need to be updated and replacement plus save as jpg.

Likes

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
Adobe Community Professional ,
Dec 16, 2019 Dec 16, 2019

Copy link to clipboard

Copied

LATEST

That is crazy amount of layers. I would not recommend to you to work in that way. It is much better option to use other technique to replace existing shirt and save as JPEG file. This is easier to do if your shirt images share same dimensions and of course orientation.

Likes

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
Adobe Community Professional ,
Dec 16, 2019 Dec 16, 2019

Copy link to clipboard

Copied

Perhaps this might help... Paul Riggott's Layer Saver Plus script will allow a common layer to be checked, then all unchecked layers will be combined with the common layer. Just select all layers before running the script. Thank you Paul!

 

https://raw.githubusercontent.com/Paul-Riggott/PS-Scripts/master/Layer%20Saver%20Plus.jsx

 

https://community.adobe.com/t5/photoshop/layer-saver-script-no-longer-works-in-photoshop-cc-2017/m-p...

 

https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html

Likes

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
Adobe Community Professional ,
Dec 16, 2019 Dec 16, 2019

Copy link to clipboard

Copied

Likes

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
Adobe Community Professional ,
Dec 16, 2019 Dec 16, 2019

Copy link to clipboard

Copied

There are many T-Shirt( Polo Design) mockup Templates available on the web some are free, others are for sale. Some are very good others poor and some can easily be batch populated and have Jpeg files saved.  Having more than one design or multiple mockup in a single PSD template is not the kind of PSD file you want to have for a batch process.   For a Batch Process you need a Mockup that is created to be easy to populate with a script.  A relatively simple script can populate multiple mockup psd files with multiple designs. The script will replace the contents or edit the contents of smart object layers in the Mockup PSD files. To replace the single design in the Smart object layer. Your mockup can be a composite where there are multiple T-shirts  with front and back views. The design in each front and back views will be in a smart object layer one smart object layer for each of the views. Not a single smart object layer.

 

Having 3000 design layers in a smart object layer object is not something  you want to deal with.  If will create a huge file, Slow down Photoshoop, be hard to maintain and update. Should you loose that file do to an error you loose all your work.

 

Photoshop Photo Collage and Mockup Toolkit

 

Photoshop scripting is powerful and I believe this package demonstrates this. Here is a video showing a 5 image collage PSD template being populated with images

 

The package includes four simple rules to follow when making Photo Collage Template PSD files so they will be compatible with my Photoshop scripts.

  1. Size the photo collage templates for the print size you want - width, height and print DPI resolution.
  2. Photo collage templates must have a Photoshop background layer. The contents of this layer can be anything.
  3. Photo collage templates must have alpha channels named "Image 1", "Image 2", ... "Image n".
  4. Photo collage templates layers above the background layers must provide transparent areas to let the images that will be placed below them show through.

 

There are nineteen scripts in this package they provide the following functions:

  1. HelpPhotoCollageToolkit.jsx - Online Help
  2. TestCollageTemplate.jsx - Used to test a Photo Collage Template while you are making it with Photoshop.
  3. CollageTemplateBuilder.jsx - Can build Templates compatible with this toolkit's scripts.
  4. LayerToAlphaChan.jsx - Used to convert a Prototype Image Layer stack into a template document.
  5. InteractivePopulateCollage.jsx - Used to interactively populate Any Photo Collage template. Offers most user control inserting pictures and text.
  6. ReplaceCollageImage.jsx - use to replace a populated collage image Smart Object layer with an other image correctly resized and positioned.
  7. ChangeTextSize.jsx - This script can be used to change Image stamps text size when the size used by the populating did not work well.
  8. PopulateCollageTemplate.jsx - Used to Automatically populate a Photo Collage template and leave the populated copy open in Photoshop.
  9. BatchOneImageCollage.jsx - Used to Automatically Batch Populate Collage templates that only have one image inserted. The Collage or Image may be stamped with text.
  10. BatchMultiImageCollage.jsx - Used to Automatically Batch Populate Any Photo Collage template with images in a source image folder. Easier to use than the interactive script. Saved collages can be tweaked.
  11. PasteImageRoll.jsx - Paste Images into a document to be print on roll paper.
  12. BatchPicturePackage.jsx - Used to Automatically Batch Populate Any Photo Collage template with an image in a source image folder. Images Rotates for best fit.
  13. BatchPicturePackageNoRotate.jsx - Used to Automatically Batch Populate Any Photo Collage template with an image in a source image folder.
  14. PopulatePicturePackage.jsx - Used to Automatically populate a Photo Collage template Fill with the same single image and leave the populated copy open in Photoshop.
  15. PCTpreferences.jsx - Preferences Use in several of the above scripts. Edit this file to change default settings and add layer styles.
  16. BatchReplaceOneObject.jsx - Used to populate simple Mockup templates. Simple Mockup have one rule the top layer must be a Smart Object Layer it contents will be replaced and a Jpeg file saved.
  17. BatchUpdateSmartObject.jsx - Used to populate simple Mockup templates like BatchReplaceOneObject script but can update more than a single smart object layer.
  18. BatchMockupTemplates.jsx - Used to populate multiple Mockup Template that need to be populated with the same replacement image objects.
  19. PopulateAlbumPageMockups.jsx - Used to populate a collection of Photo Page Mockup templates for a Picture Album.

 

Mockup Support Added

 

I created my Photoshop Photo Collage Toolkit nine years ago and Avoided supporting Templates that used Smart Object layers to warp, to add perspective, to rotate, add any distortion to images. Because replacement Image file needed to have exactly the same Aspect Ratio, Size and Print resolution as the Object in the Template's smart object layers object. Lately there have been some threads in Adobe Photoshop scripting forums dealing with updating/populating products Mockups Templates that have prototype smart object layers that need to be updated to create the output mockup files. These were good threads and prompted me to do some thinking.

 

So like my Photo Collage Template design has four simple rules. I came up with four simple rules for Mockup templates. I find that I can easily modify Photo Collage Templates and Mockup Template files I download from the web so they comply with my Photo Collage Template rules or my Simple Mockup Template rules. Mockup templates may be far from simple the only simple part is they are easy to update. So I have add support to my Photo Collage Toolkit to support Mockup templates.

 

Simple Mockup Templates Four Rules

  1. Simple Mockup Templates Only the Smart Object Layer on the top of the Template layers stack will be updated then a Jpeg file saved.
  2. Only Photoshop Objects are supported in the top smart objects layers. That is they can not be Object File that is not supported by Photoshop for example Camera RAW Files or Illustrator file like .ai, .svg.
    I suggest these objects should be PSD or PSB that Photoshop creates. Avoid using PNG objects in Mockup template. For when replace content is used to replace .png objects within a .psd template which has your png's object the replace content operation is very slow.
  3. The first None Smart Object Layer near the top of the layer stack Marks the end of Smart Object Layers the will be updated. Lower Smart Object Layers only update if they share top layers objects.
  4. The Replacement Image Collection need to be in sub folders named obj0, obj1, obj2, .... objN. Each folder must contains the same number of replacement Image files.

 

For Details and Download use this link Free Photoshop Photo Collage and Mockup Toolkit

JJMack

Likes

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
Adobe Community Professional ,
Dec 16, 2019 Dec 16, 2019

Copy link to clipboard

Copied

Read this full thread think T-shirt not Candy Jars  They had 41 designs in a smart object layer and 84 layer groups where each group was a product mockup. The file was over 1.59GB in size.

 

I converted it to into 84 mockup PSD files with one smart object in them and 41 design replacement files. The 1.59GB file was split into 125 small manageable simple files. The files still required 1.84GB of disk space.   However Photoshop was dealing with small document not always dealing with a document the compressed size is 1.59GB.

 

A single batch script populated the 84 mockup templates with the 41 designs in a single run it took quite some time to create the 3,444 jpeg files

JJMack

Likes

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