• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers

Is there a script to change a setting incrementally when batch processing in Camera Raw?

New Here ,
Apr 24, 2013 Apr 24, 2013

Copy link to clipboard

Copied

I am editing a batch of about 1000 photos in Camera Raw. There are certain settings like contrast or clarity that will be the same for all of them. But with the Exposure, I would like to have it decrease incrementally from the first picture (set to +1.25) to the last picture (set to -2.00).

So for certain settings that will be the same on all images I have done a simple "select all" and "synchronize." But I am wondering if there is a script that will have Camera Raw (or any other Adobe program) automatically split the difference between an exposure of +1.25 to -2.00 and apply incremental values to the images?

Any thoughts?

TOPICS
Scripting

Views

695

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Apr 24, 2013 Apr 24, 2013

Copy link to clipboard

Copied

Copy and paste the script into ExtendScript Toolkit

This gets installed with Photoshop and can be found:-

PC: C:\Program Files\Adobe\Adobe Utilities

MAC: <hard drive>/Applications/Utilities/Adobe Utilities

Start Bridge

PC: Edit - Preferences - Startup Scripts

Mac: Adobe Bridge menu - Preferences - Startup Scripts

At the bottom click the "Reveal Button" this will open the folder where the script should be saved.

Close and restart Bridge.

Accept the new script.

To use:-

Navigate to the folder with your Raw files.

Tools - Set Average Exposures

Make sure you do a test first on a temp folder of the raw files!


#target bridge  

   if( BridgeTalk.appName == "bridge" ) { 

setExposure = MenuElement.create("command", "Set Average Exposures", "at the end of Tools","exp");

}

setExposure.onSelect = function () {

var d=app.document;

d.deselectAll();

var sels = d.getSelection("cr2,crw,nef,mos,orf");

var noOfFiles =sels.length;

var diff = (3.25 / (noOfFiles-1));

var exp = 1.25;

var exp2=exp;

for(var a = 0;a<noOfFiles;a++){

    exp2 = exp - (diff*(a)).toFixed(3);

    var file = new File(sels.spec.toString().replace(/\....$/,'.xmp'));

    setExposure( file, exp2 )

    }

app.document.chooseMenuItem('PurgeCache');

function setExposure( file, expose ){

     file.open('r');

     file.encoding = "UTF8";

     file.lineFeed = "unix";

     file.open("r", "TEXT", "????");

     var xmpStr = file.read();

     file.close();

     if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");

     var xmp = new XMPMeta( xmpStr );

     xmp.setProperty( XMPConst.NS_CAMERA_RAW, "Exposure", Number(expose) );

     file.open('w');

     file.encoding = "UTF8";

     file.lineFeed = "unix";

     file.write( xmp.serialize() );

     file.close();

    };

};

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 31, 2021 Jan 31, 2021

Copy link to clipboard

Copied

Good Evening @Paul Riggott ,

 

How can I use the same script for Lightroom ? I want to also increment the pics gradually. same as the OP but in Lightroom Classis 9.4.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 31, 2021 Jan 31, 2021

Copy link to clipboard

Copied

As far as I know there's no scripting for Lightroom.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 01, 2021 Feb 01, 2021

Copy link to clipboard

Copied

LATEST

Lightroom scripts are written in Lua and so no, Bridge Extendscript won't work.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines