Copy link to clipboard
Copied
Hello,
I want to make something similar as this => Automatic Photoshop script for mockups by GGdesigns - YouTube
I have about 20 psd Mockup and folder with 5000+ designs all with same size (dimensions) I want to generate from each design
20 variations of mockup this is why I need to make a script but I don't know the best way to do it.
On the video it's exactly what I want but can't find the script.
Thanks
Copy link to clipboard
Copied
If the Template comply with my four Mockup Template rules there a chance the BatchMockupTemplates.jsx Script in my package will be able to populate your 20 mockup in a single execution. It has been able to populate 84 Mockup with 41 label designs, That is 3,444 output files. Each template only needed one smart object updated. The script took around 5 hours the save the 3,444 populated mockups. Free Photoshop Photo Collage and Mockup Toolkit
Copy link to clipboard
Copied
My mockups look like this don't know if I can use your script with or I record action making one by one mockup then do it in batch for the folder not sur it's the best approch I'm very newbie for this !

Copy link to clipboard
Copied
It All depends on how you structure you mockup template. My Script require Smart Object Layer one the top of the layer stack I would have no problem creating mockup template for mockups that look like your. That can be populated with my scripts. If your are not compatible I most likely would be able to modify them to be compatible.
Start with a small test run. Do not try the full batch first. 20Templated X 5,000 Designs =100,000 output files will take he better part of a day perhaps more depending on the sizes. I would also think require disk spaced to store the 100,000 jpeg files and if you use the PSD option a lot more disk space to store the additional 100,000 layered psd files. Do a small test run before trying to create the 100,000 or 200,000files. Processing 120,000 files is going to take time
Copy link to clipboard
Copied
Here is an example mockup template that has 6 Smart Object that will be populated with replacements Images. 5 wall hanging images and floor replacement. Each Smart Object that need to be updated need to has a folder of replacement files. So there are 6 input image replacement folders required. If a had 20 room designs there could be 20 Template in the mockup templates folder
All the template would have the same 6 object layers input replacement image available. However, the templates may not need all 6. Perhaps just a main room wall picture and a floor. May be requited. Each room's visible smart object layer will transform the replacement for its room design.
The only problem I think you will have is knowing you need at three smart object layers in some of your templates to be able the handle image with the different aspect ratios the you seem to have in some templates. Only the smart object layer that has the correct aspect ration replacement need be visible. All you portrait image have an aspect rate close toe each other. It looks like you may have two different landscape image aspect ratios in your emplate collection



Copy link to clipboard
Copied
I see your example but in my case each mockup is separate not in one mockup regarding my collection it's just a sreenshot of course if I success to make script work I will separate for Landscape view mockup and Portrait to avoid problem. For my need I will most of time doing max 50 different designs on each mockup around 20 is enough.
So 1 design give me 20 mockup at the end then I have enough choice for my future needs.
About recording action with all PSD mockup is good idea or not the best approch ?
Thanks for your time ![]()
Copy link to clipboard
Copied
Yes you wrote they were all the same size it was easy to seen in your screen capture some of your template needs different aspect ratio images. If you want to use Replace content not only do the images need be the same aspect ratio and size they need to also have the same Print Resolution as the object in the template file. That is because Replace Content uses Photoshop Place feature which will resize different print resolution images differently.
An other way to populate a mockup template is to edit the object and updated the object in the smart object layer. Using that method you can fit any image into an object. The net result will look like an aspect ratio resized centered image crop.
My Script can use either method. Their default method is Replace Content. However, they have an Edit option if checked object will be edited and updated, replace content will not be used. Therefor thoese template must have Photoshop objects the need to be replaced. Not Placed RAW files or places Illustrator files like .svg, .ai these file types are not supported by Photoshop but can be placed in. So if they are Placed into to mockup templates Photoshop will not be able to edit then for they will open in ACR or Illustrator not Photoshop.
The BatchMockupTemplates.jsx script can process a folder of mockup files not just a single mockup template. One or more mockup templates can be processes using my script. I could not tell if the one seen on youtube can. It also does not seem to be available. I made mine available for free. I pay for the sever its on. Its almost like I'm paying you to use my script. Am I doing something wrong perhaps I should remove it from the web.
You can populate all you template withs any size imags asi long as yoy fine the way the scrit fite the image into the template acceptable.
Copy link to clipboard
Copied
I will look at the BatchMockupTemplates.jsx I run also on Mac photoshop cs6 I will separate mockup that have not same ratio to make it more simple and my folder with all images have same dimensions so not a big deal.
My usage will be for the web to display my designs no need high res for print just need to be able to present my designs in many different mockup as simple as that.
Regarding your scripts on your website I found them long time ago maybe for most people who are not familiar with scripting it can seems complicated even if it's not will depend the people by the way good job ![]()
Copy link to clipboard
Copied
The Mockup Scripts I just added a few month ago. Year ago when my son used a Mac I installed my script on his mac I had to make some changes like add .jpe to support his jpeg file. .jpe is not common on windows and was not in my list of supported image file types. Pleas let me know if you have any Mac related issues. I do not have access to a Mac with or without Photoshop.
If you use the Edit option replace content will not be used any size image will be fitted to the smart objects.
You can create any size and resolution mockup yoy need to create. For the web all that in important is the number of Pixels the mockup canvas has. Resolution is meaningless on the web.
However, if you are going to use replace content Print DPI resolution is not meaningless. Replace content uses Photoshop Place. Place is strange. Place will resize image based one Document Resolution and placed in Image file print dpi resolution. An object file may have a different Resolution then the mockup document. Therefor, replacement image need to have exactly the same size canvas as the Smart object canvas size and it must have the same print resolution as the smart object file object. If all do not match Place will resize the image differently then the file object in the template. The number of pixels rendered for the layer will be different the smart object layer associated transform will not transform the image correctly for the mockup.
Copy link to clipboard
Copied
Warning if you are using CC 2019 there seems to be a bug in Replace Content. Occasionally Replace Content statement may fail with an error that the users canceled the operation. My script will catch that error and alert you it has happened. At the point you should terminate the run. If you just dismiss the alert the script will continue processing but some of the output mockup will not be populated correctly for the error corrupted the mockup open in Photoshop addition replace content do not fail with an error, they also do not update the smart object. So the correct output file name is saved but the content is not correct. Replace content will start working correctly again when the script opens the next template to process. The mockup templates in the templates folders do not get corrupted only the in Photoshop document may become corrupt. The mockup template on disk on disk in the templates folder are never change by the scripts.
All Photoshop versions have bugs....
Copy link to clipboard
Copied
I get this error message for the BatchMockupTemplates.jsx
The target, "photoshop // this command only works in photoshop cs2 and higher", is unknown! Do you want to open the file for editing?
I use CS6 mac version
Copy link to clipboard
Copied
Help me with the code why does the function not work on a mac why would numberArray[0] be less than 9 CS6 should be version 13.0.6 or 13.1.2 on a mac numberArray[0] should be 13???
// CheckVersion
function CheckVersion() {
var numberArray = version.split(".");
if ( numberArray[0] < 9 ) {
alert( "You must use Photoshop CS2 or later to run this script!" );
throw( "You must use Photoshop CS2 or later to run this script!" );
}
}
Wait it look like the following is not working on a mac put a // in front make it a comment remove the statment
#target photoshop // this command only works in Photoshop CS2 and higher
Copy link to clipboard
Copied
In ESTK you can't set a comment behind the #target photoshop command - that doesn't work. The comment must be in an additional line.
Copy link to clipboard
Copied
I do not use ESTK so at some point I'll remove all the #target statements they just seem to cause problems if someone uses ESTK to understand my scripts execution using it debugger to step through the scripts.
Copy link to clipboard
Copied
It may be a Photoshop Mac scripting bug it works on Windows I did not specify any particular version of Photoshop I did not care which version a user uses. If I need a particular version or version level higher tha one I will test which version is running. Here what Adobe manual states.
#target name Defines the target application for this JSX file. The name value is an application
specifier; see Application and namespace specifiers. Enclosing quotes are optional.
If the Toolkit is registered as the handler for files with the .jsx extension (as it is by
default), opening the file opens the target application to run the script. If this
directive is not present, the Toolkit loads and displays the script. A user can open a
file by double-clicking it in a file browser, and a script can open a file using a File
objectās execute method.
Copy link to clipboard
Copied
I looked into the problem further. It seems that #Target Photoshop is only used by Adobe ExtendScript Toolkit which I do not use. That seem to require specific application versions like #target photoshop-130.064 which works Photoshop ScriptingSupport Plug-in seems to just ignore #target lines.
So if you going to use extendScript to test my scripts you are going to have problems all the populating script in my package include PCTpreferences.jsx whch has a #target photoshop line. This only seem to be a problem if you use ExtendScript. Try just running the scripts from Photoshop menu File>Scripts>My Script Name...
I only put the line in my scripts for I have seen it in most scripts boiler plate. Most run scripts in Photoshop and don't use ExtendScript.
If you have JSX associated with Photoshop. Photoshop should open from finder and the script should run in Photoshop without problem.
Some day I may get around to removing all those #target photoshop statements there is no way that I can remove the statement in all the downloaded files. If user have had the problem they did not report this to me....
Thank you Now I know
Copy link to clipboard
Copied
Please let me know if you get the scripts working on your Mac.
Copy link to clipboard
Copied
I will try tomorrow and let you know ![]()
Copy link to clipboard
Copied
Thanks
Copy link to clipboard
Copied
About the video on Youtube. I can not tell if their script can hand a collection of template in a single run or what their mockup template design requires and I do not see that their script can be downloaded. They are using a Mac. I use Windows. However, I believe my scripts will work on a Mac. For Mac and PC Photoshop version are mostly the same. The are slight OS system related differences and mac use addition file extension like .jpe for Jpeg images. If the there are compatibility issued they will most likely be easily fixed.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now