Skip to main content
Pedro Cortez Marques
Legend
December 6, 2013
Answered

Script to: Make defaults specific to camera serial number? How?

  • December 6, 2013
  • 1 reply
  • 1281 views

I was trying to find a way of activating by script the preferences to activate the color profile by serial camera id.

It is just to turn on this option on bridge Camera Raw Preferences:

Edit > Camera Raw Preferences > Make defaults specific to camera serial number (to ON)

I have a contralized multi-studio color profiles calibration that are updated daily when any computer starts bridge or photoshop, and it is all done by script automatically.

It is just this line that is missing and I couldn't activate it by script.

This topic has been closed for replies.
Correct answer Pedro Cortez Marques

So simple and I couldn't find it.

It is on the same folder as the xmp color profile sidecars.

File(Folder.userData + "/Adobe/CameraRaw/Defaults/Preferences.xmp");

DefaultsSpecificToSerial="True"

Solved!

1 reply

Inspiring
December 6, 2013

There is no mention of setting this field in the documentation, so it may be held it the binary preferences in the registry. Maybe you could examine this?

HKEY_CURRENT_USER\Software\Adobe\Camera Raw\8.0

Pedro Cortez Marques
Pedro Cortez MarquesAuthorCorrect answer
Legend
December 9, 2013

So simple and I couldn't find it.

It is on the same folder as the xmp color profile sidecars.

File(Folder.userData + "/Adobe/CameraRaw/Defaults/Preferences.xmp");

DefaultsSpecificToSerial="True"

Solved!

Inspiring
December 9, 2013

Hi, found it as well and here is a script to set it to true.

#target bridge

var crsPrefs = new File( Folder.userData + "/Adobe/CameraRaw/Defaults/Preferences.xmp" );

setMetadata(crsPrefs);

function setMetadata( file){

try{

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

  if(file.exists){

     file.open('r');

     file.encoding = "UTF8";

     file.lineFeed = "unix";

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

     var xmpStr = file.read();

     file.close();

     }else{

         var xmpStr='';

         }

     var xmp = new XMPMeta( xmpStr );

   xmp.deleteProperty("http://ns.adobe.com/camera-raw-settings/1.0/", "DefaultsSpecificToSerial");

    xmp.setProperty("http://ns.adobe.com/camera-raw-settings/1.0/", "DefaultsSpecificToSerial","True");

     file.open('w');

     file.encoding = "UTF8";

     file.lineFeed = "unix";

     file.write( xmp.serialize() );

     file.close();

     }catch(e){alert(e+"-"+e.line);}

};