Copy link to clipboard
Copied
Hi, I have been using a script to batch replace a single smart object layer and export to jpeg. It is working well but now I need to replace two smart objects in the same file and then export each iteration as a jpeg. Is there any way to update the code so it can replace one smart object with images from one folder, and the other smart object with images from another folder?
My coding knowledge is minimal so have no idea where to start, or if this is possible. All my images will be the same size if that makes any difference. Thanks!
1 Correct answer
If anyone is interested, I managed to get this sorted. Here is the script that will batch replace 3 smart objects within a PSD using files saved in 3 separate folders. The 3 smart objects need to be called 'Left' , 'Right', 'Middle' but I'm sure this can be easily edited for those with any coding knowledge. It also helps that the files in each folder all use the same file name system so that the images are paired up as you want. The script exports each iteration as a jpeg in the same folder loct
...Explore related tutorials & articles
Copy link to clipboard
Copied
Here is the code I have been using to replace a single smart object layer:
Copy link to clipboard
Copied
If anyone is interested, I managed to get this sorted. Here is the script that will batch replace 3 smart objects within a PSD using files saved in 3 separate folders. The 3 smart objects need to be called 'Left' , 'Right', 'Middle' but I'm sure this can be easily edited for those with any coding knowledge. It also helps that the files in each folder all use the same file name system so that the images are paired up as you want. The script exports each iteration as a jpeg in the same folder loction as the PSD:

