Information counter & troubleshooting
1. Sorting
The input files are sorted alphanumerically. To make sure your input files output in a specific order add numbers in the filename. It's easier to set that up if you sort the input folder in your file manager (Explorer, Finder, etc..) by filename in ascending order.
2. Mixed amount of input images between smart objects in a mockup
If you have more than one target smart object per a mockup file, the script will repeat the input files as many times as it takes to match the smart object with the most input files to make sure that every single output image has something in it. You can disable this behavior with the noRepeats
setting. Read more about it here.
3. Smart objects with transparent whitespace
Sometimes mockups have a bunch of whitespace in the smart object surrounding the placeholder graphic. Especially when the expected graphic is something like a logo.
It might be enticing to try and trim away this transparent whitespace, but any kind of adjustment that changes the smart object's document size is likely to cause issues you're not ready to face.
Fast method
In the mockup psd, open the
target
smart object by double-clicking the layer thumbnailConvert the placeholder graphic into a smart object. Right-click and then
Convert to smart object
You can also just make your own smart object in it's place. One good way is to draw a rectangle and converting that into a smart object.
Save and close the smart object, then save and close the mockup psd.
Use it's layer name in the settings script as the
nestedTarget
.You'll likely also want to use the
resize: fit
setting.
This way the script will switch the contents of the nested target instead and all the input files will resize and align according to the nested smart object's bounds.
You can see this in use in repository example-1 white-mug. as well as in the example-2 billboard. To get a better understanding, you should open the related mockup psd files.
Precise method
This method is slower because you need to make sure every single input file is specific size and possibly cropped a certain way that can't be done automatically.
Make sure all input image(s) are exactly the same size as the smart object document
Add settings
trimTransparency: false
withresize: false
I'd recommend using the smart object as a template for the input files. This saves some time and effort and slightly reduces the risk of human error.
You can see this in use in repository example-1: black-mug. To get a better understanding, you should open the related mockup psd file.
4. Dialogs interrupt the batch process
There are 3 dialog types that may interrupt the bathc process. All of them should have a checkbox that says either Don't show on document open or Don't show again, that I would recommend you tick and you won't see them again.
5. The last input file sticks around in the output when using noRepeats: true
Sometimes the smart objects in a mockup have been lifted to the top of the stack or perhaps separated into a labeled folder. This usually means that there is a duplicate smartobject somewhere in the document and so when the script runs out of input images, the target
smart object is hidden, but the duplicate smart object is still there. The simplest fix is to change the target
to that duplicate smart object instead.
Last updated