Skip to main content
Participant
May 30, 2020
Question

Batch Relink Smart Object and Save

  • May 30, 2020
  • 2 replies
  • 2108 views

I am a novice at scripts and actions; and am looking to batch create JPGs in Photoshop from a mock up PSD.
Please advise on the following : 

1. All JPG assests are in a Folder
2. JPGS relink to a smart object in a mock up PSD

3. After each relink; file is saved with a naming convention that includes the linked file name + "mock up". 

4. Repeat

I am using CC on a Mac. How do I accompligh this?
Thank You

This topic has been closed for replies.

2 replies

JJMack
Community Expert
Community Expert
May 31, 2020

That is not how  templates work.  Images are either placed in or pasted or duplicated  into to Templates when images are populated by adding new image layer.  Templates that have Smart Object layers are populated by replacing the Template's smart object layers content. This is done via replace content or opening the templates smart object and editing replacement content into the templates object. The Smart Object replacement must be the correct size, aspect ratio and resolution as the object in the template. The the Smart Object associated object transform is not change during the replacement process. Changing a templates Linked Smart object link would have the same requirement Size, Aspect ratio  and Print resolution of replacement object must be correct. If you are going to be saving Jpeg output files there is no advantage of using linked smart object in your templates. Jpeg image are just a background  layer no transparency so smart object layer.

 

Actions have a very hard time doing this for they can not use logic for the things like finding out how many image need to be populated and also dealing with varying images size and image location.  Action steps are more ole less fixed all settings are recorded into action stem which doe not change.  You need an action to populate one image an action to populate two images etc. All Image names locations and size are recorded into the action steps you must change the image  before running  the action or the action steps would need to be made interactive so your interaction can handle images selection image sized and image locations.

 

Template are either populated manually using tools like photoshop or automated with Photoshop Scripting.  Photoshop Action can not hack the process. Interactive actions can be used to assist with the manual populating process.

 

Free Photoshop Photo Collage and Mockup Toolkit 

JJMack
Inspiring
June 1, 2020

Good day JJMach, 


I see you are an absolute wizzard with photoshop JS. **,)
I know this is probably the wrong place to be posting; but i don't know how else to contact you directly.

Is there a way for me to change the unit entry from 'Inches / Feet' to 'mm' in the PasteImageRoll.jsx?
It's been driving me crazy, i have tried everything and just can't seem to get it to work with 'mm'.

 

Also, do you think it would be possible to modify the script so that if i have 5 artworks selected, but each artwork needs to be included into the canvas with different quantities (eg. A x5, B x3, C x26, D x7, E x5 - all artworks being the same size ofcourse) and do you think its possible for the JS to then fetch the number of times each graphic needs to be placed via the file name?

Your response will be SUPER apprecaited! 


Thank you so much for all your contributions.