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

Is there any jsx to execute the auto tone of camera raw ?

Explorer ,
Nov 06, 2018 Nov 06, 2018

Copy link to clipboard

Copied

I write some code to execute the auto tone of camera raw , but the image has no effects. I konw the Action Manager can't record the auto tone of camera raw,so i add the follow code :

desc1.putBoolean(charIDToTypeID('Auto'), true);

and  the auto function is still not work.Any help will be appreciated!

All code is as follows:

(function () {

  // Camera Raw Filter

    var desc1 = new ActionDescriptor();

    desc1.putString(charIDToTypeID('CMod'), "Filter");

    desc1.putEnumerated(charIDToTypeID('Sett'), charIDToTypeID('Sett'), charIDToTypeID('Cst '));

    desc1.putEnumerated(charIDToTypeID('WBal'), charIDToTypeID('WBal'), charIDToTypeID('AsSh'));

    desc1.putBoolean(charIDToTypeID('Auto'), true);

    desc1.putInteger(charIDToTypeID('Temp'), 0);

    desc1.putInteger(charIDToTypeID('Tint'), 0);

    desc1.putBoolean(charIDToTypeID('CtoG'), false);

    desc1.putInteger(charIDToTypeID('Strt'), 0);

    desc1.putInteger(charIDToTypeID('Shrp'), 0);

    desc1.putInteger(charIDToTypeID('LNR '), 0);

    desc1.putInteger(charIDToTypeID('CNR '), 0);

    desc1.putInteger(charIDToTypeID('VigA'), 0);

    desc1.putInteger(charIDToTypeID('BlkB'), 0);

    desc1.putInteger(charIDToTypeID('RHue'), 0);

    desc1.putInteger(charIDToTypeID('RSat'), 0);

    desc1.putInteger(charIDToTypeID('GHue'), 0);

    desc1.putInteger(charIDToTypeID('GSat'), 0);

    desc1.putInteger(charIDToTypeID('BHue'), 0);

    desc1.putInteger(charIDToTypeID('BSat'), 0);

    desc1.putInteger(charIDToTypeID('Vibr'), 0);

    desc1.putInteger(charIDToTypeID('HA_R'), 0);

    desc1.putInteger(charIDToTypeID('HA_O'), 0);

    desc1.putInteger(charIDToTypeID('HA_Y'), 0);

    desc1.putInteger(charIDToTypeID('HA_G'), 0);

    desc1.putInteger(charIDToTypeID('HA_A'), 0);

    desc1.putInteger(charIDToTypeID('HA_B'), 0);

    desc1.putInteger(charIDToTypeID('HA_P'), 0);

    desc1.putInteger(charIDToTypeID('HA_M'), 0);

    desc1.putInteger(charIDToTypeID('SA_R'), 0);

    desc1.putInteger(charIDToTypeID('SA_O'), 0);

    desc1.putInteger(charIDToTypeID('SA_Y'), 0);

    desc1.putInteger(charIDToTypeID('SA_G'), 0);

    desc1.putInteger(charIDToTypeID('SA_A'), 0);

    desc1.putInteger(charIDToTypeID('SA_B'), 0);

    desc1.putInteger(charIDToTypeID('SA_P'), 0);

    desc1.putInteger(charIDToTypeID('SA_M'), 0);

    desc1.putInteger(charIDToTypeID('LA_R'), 0);

    desc1.putInteger(charIDToTypeID('LA_O'), 0);

    desc1.putInteger(charIDToTypeID('LA_Y'), 0);

    desc1.putInteger(charIDToTypeID('LA_G'), 0);

    desc1.putInteger(charIDToTypeID('LA_A'), 0);

    desc1.putInteger(charIDToTypeID('LA_B'), 0);

    desc1.putInteger(charIDToTypeID('LA_P'), 0);

    desc1.putInteger(charIDToTypeID('LA_M'), 0);

    desc1.putInteger(charIDToTypeID('STSH'), 0);

    desc1.putInteger(charIDToTypeID('STSS'), 0);

    desc1.putInteger(charIDToTypeID('STHH'), 0);

    desc1.putInteger(charIDToTypeID('STHS'), 0);

    desc1.putInteger(charIDToTypeID('STB '), 0);

    desc1.putInteger(charIDToTypeID('PC_S'), 0);

    desc1.putInteger(charIDToTypeID('PC_D'), 0);

    desc1.putInteger(charIDToTypeID('PC_L'), 0);

    desc1.putInteger(charIDToTypeID('PC_H'), 0);

    desc1.putInteger(charIDToTypeID('PC_1'), 25);

    desc1.putInteger(charIDToTypeID('PC_2'), 50);

    desc1.putInteger(charIDToTypeID('PC_3'), 75);

    desc1.putDouble(charIDToTypeID('ShpR'), 1);

    desc1.putInteger(charIDToTypeID('ShpD'), 25);

    desc1.putInteger(charIDToTypeID('ShpM'), 0);

    desc1.putInteger(charIDToTypeID('PCVA'), 0);

    desc1.putInteger(charIDToTypeID('GRNA'), 0);

    desc1.putInteger(charIDToTypeID('LPEn'), 0);

    desc1.putInteger(charIDToTypeID('MDis'), 0);

    desc1.putInteger(charIDToTypeID('PerV'), 0);

    desc1.putInteger(charIDToTypeID('PerH'), 0);

    desc1.putDouble(charIDToTypeID('PerR'), 0);

    desc1.putInteger(charIDToTypeID('PerS'), 100);

    desc1.putInteger(charIDToTypeID('PerA'), 0);

    desc1.putInteger(charIDToTypeID('PerU'), 0);

    desc1.putDouble(charIDToTypeID('PerX'), 0);

    desc1.putDouble(charIDToTypeID('PerY'), 0);

    desc1.putInteger(charIDToTypeID('AuCA'), 0);

    desc1.putDouble(charIDToTypeID('Ex12'), 0);

    desc1.putInteger(charIDToTypeID('Cr12'), 0);

    desc1.putInteger(charIDToTypeID('Hi12'), 0);

    desc1.putInteger(charIDToTypeID('Sh12'), 0);

    desc1.putInteger(charIDToTypeID('Wh12'), 0);

    desc1.putInteger(charIDToTypeID('Bk12'), 0);

    desc1.putInteger(charIDToTypeID('Cl12'), 0);

    desc1.putInteger(charIDToTypeID('DfPA'), 0);

    desc1.putInteger(charIDToTypeID('DPHL'), 30);

    desc1.putInteger(charIDToTypeID('DPHH'), 70);

    desc1.putInteger(charIDToTypeID('DfGA'), 0);

    desc1.putInteger(charIDToTypeID('DPGL'), 40);

    desc1.putInteger(charIDToTypeID('DPGH'), 60);

    desc1.putInteger(charIDToTypeID('Dhze'), 0);

    desc1.putInteger(charIDToTypeID('TMMs'), 0);

    var list1 = new ActionList();

    list1.putInteger(0);

    list1.putInteger(0);

    list1.putInteger(255);

    list1.putInteger(255);

    desc1.putList(charIDToTypeID('Crv '), list1);

    var list2 = new ActionList();

    list2.putInteger(0);

    list2.putInteger(0);

    list2.putInteger(255);

    list2.putInteger(255);

    desc1.putList(charIDToTypeID('CrvR'), list2);

    var list3 = new ActionList();

    list3.putInteger(0);

    list3.putInteger(0);

    list3.putInteger(255);

    list3.putInteger(255);

    desc1.putList(charIDToTypeID('CrvG'), list3);

    var list4 = new ActionList();

    list4.putInteger(0);

    list4.putInteger(0);

    list4.putInteger(255);

    list4.putInteger(255);

    desc1.putList(charIDToTypeID('CrvB'), list4);

    desc1.putString(charIDToTypeID('CamP'), "Embedded");

    desc1.putString(charIDToTypeID('CP_D'), "54650A341B5B5CCAE8442D0B43A92BCE");

    desc1.putInteger(charIDToTypeID('PrVe'), 167772160);

    desc1.putString(charIDToTypeID('Rtch'), "");

    desc1.putString(charIDToTypeID('REye'), "");

    desc1.putString(charIDToTypeID('LCs '), "");

    desc1.putString(charIDToTypeID('Upri'), "<x:xmpmeta xmlns:x=\"adobe:ns:meta/\" x:xmptk=\"Adobe XMP Core 5.6-c140 79.160451, 2017/05/06-01:08:21        \">\n <rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n  <rdf:Description rdf:about=\"\"\n    xmlns:crs=\"http://ns.adobe.com/camera-raw-settings/1.0/\"\n   crs:UprightVersion=\"151388160\"\n   crs:UprightCenterMode=\"0\"\n   crs:UprightCenterNormX=\"0.5\"\n   crs:UprightCenterNormY=\"0.5\"\n   crs:UprightFocalMode=\"0\"\n   crs:UprightFocalLength35mm=\"35\"\n   crs:UprightPreview=\"False\"\n   crs:UprightTransformCount=\"6\"/>\n </rdf:RDF>\n</x:xmpmeta>\n");

    desc1.putString(charIDToTypeID('GuUr'), "<x:xmpmeta xmlns:x=\"adobe:ns:meta/\" x:xmptk=\"Adobe XMP Core 5.6-c140 79.160451, 2017/05/06-01:08:21        \">\n <rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n  <rdf:Description rdf:about=\"\"\n    xmlns:crs=\"http://ns.adobe.com/camera-raw-settings/1.0/\"\n   crs:UprightFourSegmentsCount=\"0\"/>\n </rdf:RDF>\n</x:xmpmeta>\n");

    desc1.putString(charIDToTypeID('Look'), "");

    desc1.putString(charIDToTypeID('Pset'), "");

    executeAction(stringIDToTypeID('Adobe Camera Raw Filter'), desc1, DialogModes.NO);

})();

TOPICS
Actions and scripting

Views

8.7K

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

correct answers 2 Correct answers

People's Champ , Nov 06, 2018 Nov 06, 2018

Try

desc1.putBoolean(charIDToTypeID("AuTn"), true);

Votes

Translate

Translate
People's Champ , Oct 31, 2019 Oct 31, 2019

Votes

Translate

Translate
Adobe
People's Champ ,
Nov 06, 2018 Nov 06, 2018

Copy link to clipboard

Copied

Try

desc1.putBoolean(charIDToTypeID("AuTn"), true);

Votes

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
Explorer ,
Nov 06, 2018 Nov 06, 2018

Copy link to clipboard

Copied

Thank you very much. You are right.

Votes

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 Beginner ,
May 10, 2020 May 10, 2020

Copy link to clipboard

Copied

Hi zero3s,

 

Could you share the JSX for me?

When I copy your script and use it with Photoshop 2020/ACR 12.2 it does nothing? It runs the script, but there are no changes.

 

I did try to add and replace: desc1.putBoolean(charIDToTypeID('Auto'), true); with desc1.putBoolean(charIDToTypeID("AuTn"), true); in your script. But it didn't solve it.

 

Votes

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 ,
May 10, 2020 May 10, 2020

Copy link to clipboard

Copied

Try this for a more concise block of code that only does one thing in the Camera Raw Filter (not to be confused with ACR, Adobe Camera Raw):

 

 

 

 

(function () {
  // Camera Raw Filter - Auto
    var desc1 = new ActionDescriptor();
    desc1.putBoolean(charIDToTypeID("AuTn"), true); // AuTn = Auto
    executeAction(stringIDToTypeID('Adobe Camera Raw Filter'), desc1, DialogModes.NO);
})();

 

 

 

or:

 

 

autoCRF();

function autoCRF() {
  // Camera Raw Filter - Auto
    var desc1 = new ActionDescriptor();
    desc1.putBoolean(charIDToTypeID("AuTn"), true); // AuTn = Auto
    executeAction(stringIDToTypeID('Adobe Camera Raw Filter'), desc1, DialogModes.NO);
}

 

 

P.S. ACR and raw files would be covered by this topic post:

 

How to record button click on action?

 

Votes

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 ,
May 10, 2020 May 10, 2020

Copy link to clipboard

Copied

While I am about it, here is an example of a setting with a parameter/value:

 

 

exposureCRF(expValue = 1.000000); // +1

function exposureCRF() {
  // Camera Raw Filter - Exposure
    var desc1 = new ActionDescriptor();
    desc1.putDouble(charIDToTypeID('Ex12'), expValue); // Variable 
    executeAction(stringIDToTypeID('Adobe Camera Raw Filter'), desc1, DialogModes.NO);
}

 

 

Votes

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 ,
May 04, 2022 May 04, 2022

Copy link to clipboard

Copied

This code won't work until you use some temp and tint values.

Votes

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 ,
May 04, 2022 May 04, 2022

Copy link to clipboard

Copied

First of all I don't understand why you posted unworking code.

Votes

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 ,
May 04, 2022 May 04, 2022

Copy link to clipboard

Copied

desc46.putInteger(idTemp, 1)
desc46.putInteger(idTint, 1)

Votes

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 ,
May 04, 2022 May 04, 2022

Copy link to clipboard

Copied

'This movie is private'

Votes

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 ,
May 05, 2022 May 05, 2022

Copy link to clipboard

Copied

It wasn't public. Now it is for some reason.

 

sTT = stringIDToTypeID;
(ref = new ActionReference())
.putIndex(fx = sTT('filterFX'), 1)
ref.putEnumerated(sTT('layer'), '', sTT('targetEnum'));
(dsc = new ActionDescriptor()).putReference(sTT('null'), ref);
dsc.putObject(fx, '', new ActionDescriptor())
executeAction(sTT('set'),
dsc, DialogModes.ALL)

 

Votes

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 Beginner ,
May 11, 2020 May 11, 2020

Copy link to clipboard

Copied

Stephen_A_Marsh
That was exactly what i'm looking for... thank you for your quick response!
 

Votes

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 ,
May 11, 2020 May 11, 2020

Copy link to clipboard

Copied

No worries, happy to make a minor contribution based on the work of zero3s and r-bin!

 

P.S. Just keep in mind that this is for rendered images using the Camera Raw Filter, which is not the same thing as a raw camera image file processed via Adobe Camera Raw.

Votes

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 Beginner ,
May 11, 2020 May 11, 2020

Copy link to clipboard

Copied

I'll understand...

 

The script is used to automate the following steps: Open TIFF - Filter - Camera Raw Filter - Auto -Ok

 

Last question: What's the difference between the 2 scripts you posted?

 

Thanks again

Votes

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
People's Champ ,
May 11, 2020 May 11, 2020

Copy link to clipboard

Copied

 

try {
    var d = new ActionDescriptor();
    d.putBoolean(stringIDToTypeID("dontRecord"), false);
    d.putBoolean(stringIDToTypeID("forceNotify"), true);
    d.putPath(stringIDToTypeID("null"), new File("/c/000/DSC_3030.NEF")); // your raw file
    var d1 = new ActionDescriptor();

    d1.putBoolean(charIDToTypeID("AuTn"), true);

    d1.putEnumerated(stringIDToTypeID("colorSpace"), stringIDToTypeID("colorSpace"), stringIDToTypeID("sRGB"));
    d1.putEnumerated(stringIDToTypeID("bitDepth"), stringIDToTypeID("bitDepth"), stringIDToTypeID("bitDepth8"));
    d1.putDouble(stringIDToTypeID("resolution"), 300);

    d.putObject(stringIDToTypeID("as"), stringIDToTypeID("Adobe Camera Raw"), d1);

    d.putDouble(stringIDToTypeID("overrideOpen"), true);
    d.putBoolean(stringIDToTypeID("smartObject"), true);

    executeAction(stringIDToTypeID("open"), d, DialogModes.ALL); // ALL - for dialog to control, NO - silent
    }
catch (e) { throw(e); }

 

Votes

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 ,
May 12, 2020 May 12, 2020

Copy link to clipboard

Copied

"Last question: What's the difference between the 2 scripts you posted?"

 

The first script is a "self-invoking" function, it does not need to be called, it executes when parsed by the JS interpreter.

 

The second script is a "declared" function, it has to be "called" or executed using the declared function name.

 

As a beginner, I am just starting to learn through trial and error some of the basics when it comes to functions!

Votes

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
Advocate ,
May 14, 2020 May 14, 2020

Copy link to clipboard

Copied

Is it possible to get the values from the camera raw filter if you have applied it to a smartobject?

Votes

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
Advocate ,
May 06, 2022 May 06, 2022

Copy link to clipboard

Copied

There may be new insights...

 

So the question again:

(How) is it possible to read certain values of the raw filter (applied to a smart object) - e.g. Temperature or Tint?

 

If that doesn't work directly, then maybe by temporarily saving it as a preset (xml) and reading out the desired value?

 

Thanks in advance for your help 🙂

Votes

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 ,
May 06, 2022 May 06, 2022

Copy link to clipboard

Copied

LATEST

 

cTT=charIDToTypeID,sTT=stringIDToTypeID;(ref = new ActionReference())
.putEnumerated(sTT('layer'), sTT('ordinal'), sTT('targetEnum'))
dsc = executeActionGet(ref).getObjectValue(sTT('smartObjectMore'))
.getObjectValue(sTT('filterFX')).getList(sTT('filterFXList'))
.getObjectValue(0).getObjectValue(sTT('filter'))
tat = ['Tint', 'Temp']; while(tat.length)
	alert(dsc.getInteger(cTT(tat.shift())))

 

Votes

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 ,
Oct 15, 2020 Oct 15, 2020

Copy link to clipboard

Copied

wow this works.  would you happen to know what the variable would be to execute Geometry > apply level correction?

 

Votes

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 ,
Oct 15, 2020 Oct 15, 2020

Copy link to clipboard

Copied

r-bin probably does, I just inserted the code into a concise stand-alone script rather than the more verbose script originally posted.

Votes

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
Explorer ,
Mar 11, 2021 Mar 11, 2021

Copy link to clipboard

Copied

Took me lots of digging to find this. Here you go.

 

/*
Camera Raw Filter - Transform Values:
1 = Auto, 2 = Full, 3 = Level, 4 = Vertical
*/
transformCRF( transValue = 1 );

function transformCRF() {
var actDesc = new ActionDescriptor();
var transCode = charIDToTypeID("PerU");
actDesc.putInteger(transCode, transValue);
executeAction(stringIDToTypeID("Adobe Camera Raw Filter"), actDesc, DialogModes.NO);
}

Votes

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 ,
Jun 19, 2021 Jun 19, 2021

Copy link to clipboard

Copied

This is awesome! Is there somewhere I can reference the variable names so I can fine tune a script to edit specific filter settings? Specifically, I'm looking for the variable for Texture? 

Votes

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 ,
Jun 19, 2021 Jun 19, 2021

Copy link to clipboard

Copied

Use script listener to record/find the codes and values. Texture was added after the original post in this thread.

 

Here is the ID:

'CrTx'

 

Here is the raw recording simplified for a +50 texture value:

 

// Camera Raw Filter, Texture:
// 'CrTx' +/- 100
var desc1 = new ActionDescriptor();
desc1.putDouble(charIDToTypeID('CrTx'), 50); 
executeAction(stringIDToTypeID('Adobe Camera Raw Filter'), desc1, DialogModes.NO);

 

 

Here it is in a named function, where you can pass the parameter value.

 

textureCRF(texValue = 50.000000);

function textureCRF() {
  // Camera Raw Filter, Texture:
  // 'CrTx' +/- 100
    var desc1 = new ActionDescriptor();
    desc1.putDouble(charIDToTypeID('CrTx'), texValue); // Variable 
    executeAction(stringIDToTypeID('Adobe Camera Raw Filter'), desc1, DialogModes.NO);
}

 

 

Votes

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
Explorer ,
Oct 30, 2019 Oct 30, 2019

Copy link to clipboard

Copied

Hello, I want to do batch processing of photos using "File > Scripts > Image Processor ..." that call a sting of Actions to tune the pictures with different exposure settings.

Amongst these Actions, I would record "Camera Raw Filter" click "Auto" so that the filter tuned the picture automatically.  However, I found that the Action recorded the "Camera Raw Filter" with absolute parameters applied to the model picture being recorded.  Then, when the Action is run, the Camera Raw Filter applied the same static parameters of the model picture to all other pictures in the batch.

Is there a way to make recording of "Camera Raw Filter" with click "Auto" to work, so that the pictures are tuned based on the Auto measurements applicable to the picture in work, instead of the static parameters relevant to the model picture.

 

{Thread renamed by moderator}

Votes

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