Copy link to clipboard
Copied
Hello! I work with print production photo studio and have to do a lot of cropping and color adjusting before print photos.
To do this, I first created an action, and over time, script a more convenient for me, which i use with droplet and the essence of which comes down to a few fairly simple steps:
1. By the name of the folder with special tags, the script determines the required aspect ratio and print format.
2. A cropping dialog opens, in which I can adjust the cropping frame depending on the scene in the photo.
3. A modal window of curves opens, which I can also correct.
4. The image is resampled according to the required print size.
5.The photo is saved with the parameters specified in the script and closes...
..then the droplet calls the next photo and everything starts again.
This process has been established for a long time and quite suits me. Except for a couple of points of solution that I still can’t find, and about one of which, I want to ask the respected community.
When processing photos in a stream, very often photos come in a series from one scene, then a series from another scene. When I have to curve edit photos from the same scene, I end up applying very similar curves settings to the photos from that scene. Again and again... If I'm not working within a droplet, then I'm using Photoshop's "step and repeat" trick for curves. Pressing CTRL+ALT+M while photos of the same series, I open a previuos curves settings, only slightly edit them, apply, save photo and on the next photo, again use the previous curves settings with CTRL+ALT+M. This greatly speeds up the process.
But unfortunately, no matter how many options I have tried and how much I have searched for information about this, I have not found the ability to use curve step and repeat in a script / action / droplet. Since when recording an action, the current value of the curves is simply recorded but not repetition of previous one.
As an option, I considered saving the value of the curves to the acv file during processing, and the next time then open the curves, load this acv, and save it again upon completion .. and so on in a circle.
However, I only found how to save the values of the active adjustment layer with curves.
This is very likely, but this doesn't work for me... since the adjustment layer cannot be used within a droplet with the ability to adjust curves settings. To correct it, must either stop the execution of the droplet / script, or apply an adjustment layer, without the possibility of control/editing it. In real life, when printing photos, the option of applying correction without control is unacceptable.
So... Maybe somebody can help me with this?
try{dsc = getCustomOptions('curves')}catch(err){dsc = new ActionDescriptor()}
try{dsc = executeAction(stringIDToTypeID('curves'), dsc, DialogModes.ALL),
putCustomOptions('curves', dsc, false)}catch(err){}
Save it as 'Curves.jsx' to 'Presets/Scripts' folder of your Photoshop. Launch app and instead of current Curves item in your action, from expandable contextual menu 'Insert Manu Item' and choose 'File > Scripts > Curves'.
Now any time you play the action and set curves it will remember la
...Copy link to clipboard
Copied
If you want to adjust the curves values, you'll be stopping execution regardless. So I'm not sure what you want here.
Copy link to clipboard
Copied
Hi! If I use modal dialog curves(not adjustment layer), script/action wait untill I press Ok, and aftre this script/action continued.
Copy link to clipboard
Copied
try{dsc = getCustomOptions('curves')}catch(err){dsc = new ActionDescriptor()}
try{dsc = executeAction(stringIDToTypeID('curves'), dsc, DialogModes.ALL),
putCustomOptions('curves', dsc, false)}catch(err){}
Save it as 'Curves.jsx' to 'Presets/Scripts' folder of your Photoshop. Launch app and instead of current Curves item in your action, from expandable contextual menu 'Insert Manu Item' and choose 'File > Scripts > Curves'.
Now any time you play the action and set curves it will remember last used settings to play them back.
Copy link to clipboard
Copied
Yuo my hero!!!! Thank you very much!
I just place this code to my own script, instead of old one, where curves called.
Copy link to clipboard
Copied
The OP has their answer, however, when I use the script the last used curve settings are not applied (the curve is linear).
Copy link to clipboard
Copied
Perhpas reset entirely Photoshop preferences and try again.
Copy link to clipboard
Copied
Oh how I hate resetting prefs... Did it but no good, both 2021 and 2022 versions don't use the last used curve when the script is called, but they do when manually holding down the opt key.
Copy link to clipboard
Copied
On Windows it doesn't need Alt key to work, so Opt on macOS shouldn't be needed.
Copy link to clipboard
Copied
I meant that when doing this manually, one would use CMD M for curves, then CMD OPT M to repeat the last curves...
When running the script, all it does is the equivalent of CMD M bringing up a default linear curve, not the last curve performed in that session (tried on both same doc and new doc).
Also tested in Windows with the same lack of expected result.
Copy link to clipboard
Copied
Okay - I understand. It works the same as last used settings, but aside of purely manual action. It's how it's designed - script remembers user input and then the same script retrieves it.