Skip to main content
taravasya
Known Participant
May 4, 2022
Answered

Step and repeat for curves/levels in a script/action.

  • May 4, 2022
  • 2 replies
  • 1921 views

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.

https://community.adobe.com/t5/photoshop-ecosystem-discussions/saving-curve-preset-as-acv/m-p/12536080

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?

This topic has been closed for replies.
Correct answer Kukurykus

 

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.

2 replies

Kukurykus
KukurykusCorrect answer
Legend
May 4, 2022

 

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.

taravasya
taravasyaAuthor
Known Participant
May 4, 2022

Yuo my hero!!!! Thank you very much!

I just place this code to my own script, instead of old one, where curves called.

Legend
May 4, 2022

If you want to adjust the curves values, you'll be stopping execution regardless. So I'm not sure what you want here.

taravasya
taravasyaAuthor
Known Participant
May 4, 2022

Hi! If I use modal dialog curves(not adjustment layer), script/action wait untill I press Ok, and aftre this script/action continued.