Tips on best setup... #18
-
Hi, and thank you for sharing this script. I am totally new to all this but your instructions look very helpful, even for a beginner :) I haven't started using it yet as I am still working out the best way to set up my mockups and input/output folders. I would be grateful for advice on the best way to do this, please. Sorry this is such a long message. I sell disc-bound notebooks and would like to produce several mockups for each cover design image:
I can create any mockups I need by replacing the SO contents with a new cover design image, then turning the different layers and clipping masks on and off and exporting the different versions. It is quite tedious (!) so I would like to automate it as a batch process. As I am creating a new mockup to work with this script anyway, I would like to make the process as efficient as possible. What would be the best way to design it (out of the options below - or another way)? (1) Keep it as one psd file, and modify the script so it turns the different disc layers and clipping mask layers on and off, and exports the file with different names in between. So, fully automate my current process. I don't always need all the variations so it would be handy to be able to toggle them on and off. (2) Keep one psd file and just turn the layers and masks on manually for each variation, then run the script to go through the input files. (3) Have a separate folder for each variation. The psd file in each folder would only have the relevant layers and masks active and I would run your script for each variation (e.g. A5, Metal discs, 1cm corners). They would all use the same input and output folders. I assume if I use the $ options for the file paths and keep the psd file name and target name the same then the script wouldn't change, and I could just edit it once then duplicate the folder and tweak the psd layers. Also, is it possible to name the output files after the input files but with a different extension for each variation? Any advice would be very much appreciated. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Yea, number 1 should be possible. You can add multiple mockups in one batch process and every single one can use the same mockup .psd file, if that is your want. In that example I'm basically feeding every mockup the same output options using a variable, but you can give each mockup their own custom output options, which in this case should be necessary in order to avoid overwriting the output files as they would all share the same output location by default and presumably same input filenames too.
// output: outputOpts,
output: {
format: 'jpg',
path: '$/Output/', // You can add as many nested folders as you want: '$/Output/black-spine/color-red'
// If you wanted some or all files in the same output folder, you could differentiate by customizing the filename:
filename: '@input', // You can add static text and only the keywords are replaced: 'black-spine--color-red--@input'
},
The script has options While you can fairly easily comment out lines or change the values, you can also have multiple setting scripts for different types of outputs.
I can imagine your settings file might end up looking a bit crowded due to repetition... So you could add helper functions to simplify it. Something like this (I didn't test it at all): #include "script/Batch Mockup Smart Object Replacement.jsx"
function addMockup( config ) {
var options = {
output: {
path: './Output' + (config.path || ''), // Outputs next to the mockup psd
format: config.format || 'jpg', // 'jpg', 'png', 'tif', 'psd', 'pdf'
filename: config.filename ? config.filename + ' @input' : '@mockup - @input',
},
showLayers: config.showLayers || [],
mockupPath: '$/assets/example-mockup.psd',
smartObjects: [
// Smart object #1
{
target: '@my-smart-object',
input: config.input || '$/input',
inputNested: true,
align: 'center center',
resize: 'fill',
},
]
};
return options;
};
mockups([
addMockup({
output: '/grey',
filename: 'grey',
showLayers: ['grey-stuff'],
input: ['$/input'],
}),
addMockup({
output: '/red',
showLayers: ['red-stuff'],
filename: 'red',
input: ['$/input'],
}),
addMockup({
output: '/green',
showLayers: ['green-stuff'],
filename: 'green',
input: ['$/input'],
}),
]); |
Beta Was this translation helpful? Give feedback.
Yea, number 1 should be possible.
You can add multiple mockups in one batch process and every single one can use the same mockup .psd file, if that is your want. In that example I'm basically feeding every mockup the same output options using a variable, but you can give each mockup their own custom output options, which in this case should be necessary in order to avoid overwriting the output files as they would all share the same output location by default and presumably same input filenames too.
// output: ou…