6 Replies Latest reply on Nov 26, 2015 10:19 AM by JJMack

    Open file in Camera Raw - Manual Batch

    frontend89

      Hi

      I found http://www.ps-bridge-scripts.talktalk.net/ - PSCS Script - Manual Batch.

      It is very good solution for me becouse I can load folder with images, play other photoshop action and brush, retouch photos etc.

      But I have one problem becouse this script don't open RAW file in Camera Raw.

      Do you know what I need to add code to open files in Camera Raw ?

      When I later open Filter  -> Camera Raw Filter I don't have orginal settings from my camera , this is not for me .

       

      Best Regards

        • 1. Re: Open file in Camera Raw - Manual Batch
          Chuck Uebele Adobe Community Professional & MVP

          As far as I know, it isn't possible to open in Camera Raw.

          • 2. Re: Open file in Camera Raw - Manual Batch
            JJMack Most Valuable Participant

            I think only when a smart object layer object is a Image file that is Opened via Camera Raw would you have the Old ACR settings for the layer. Or if a smart object layer has a Camera Raw Smart Filter would you have the old ACR settings.  If ACR is used on a raster layer it would change the layers pixels  a permeate change  the original pixels will not longer exist anywhere.  With With Smart Object Layers, Object Files and Smart Object layer the original Pixels still exist for the actual pixels Photoshop renders for the layer exists and are not changed the ACR setting used are recorded for the smart object layer in the documents layer.

             

            If you reopen a smart object you Open a temp Files in ACR chances you commit will be recorded into the original smart object layer and the object layers pixels replaced for the smart layer.   You may need to use action manager code to be able to reopen a smart object layer or re-adjust a smart filter.  It may also need to be a interactive process. I would not think you can pass ACR a new set of settings like a new SaveFileOptions object.

             

            I could well be wrong for  I only hack at Photoshop scripting

            • 3. Re: Open file in Camera Raw - Manual Batch
              SuperMerlin Level 5
              var file = File.openDialog("Please select RAW file");  
              OpenCameraRaw( file,true );  
              
              function OpenCameraRaw(file,ACR) { 
                var desc = new ActionDescriptor(); 
                desc.putPath(charIDToTypeID('null'), File(file));  
                desc.putBoolean(stringIDToTypeID('overrideOpen'), true); 
                try{
                if(ACR){ executeAction(charIDToTypeID('Opn '), desc, DialogModes.ALL); 
                }else{ executeAction(charIDToTypeID('Opn '), desc, DialogModes.NO); 
                } }catch(e){}
              };
              
              
              
              • 4. Re: Open file in Camera Raw - Manual Batch
                frontend89 Level 1

                Thanks !

                I added this function to a script and change open function. Working fine !

                • 5. Re: Open file in Camera Raw - Manual Batch
                  Chuck Uebele Adobe Community Professional & MVP

                  Learn something new all the time. Nice.

                  • 6. Re: Open file in Camera Raw - Manual Batch
                    JJMack Most Valuable Participant

                    The Image Processor and Image Processor Pro  scripts  seem to be able to optionally open the first RAW file in a batch interactively in ACR, let you set ACT settings then to use those settings for all the other RAW being processed.  I Also believe if you do not use that option.  Raw Files will be converted by ACR using ACR settings preciously set for that  particular RAW File or ACR default settings it there are no settings for a RAW file.

                     

                    I see code like this in image processor.

                     

                    if ( ! gOpenedFirstCR && this.params["open"] && IsFileOneOfThese( cameraRawParams.fileName, gFilesForCameraRaw ) ){

                      // this is the first CR file and the user elected to open it and choose settings to apply to the

                      // rest of the CR files

                      gOpenedFirstCR = true;

                      cameraRawParams.useDescriptor = true;

                      this.OpenCameraRaw( cameraRawParams, true )

                      } else {

                      this.OpenCameraRaw( cameraRawParams, false, DialogModes.NO );

                      }

                     

                    Its open Camer Raw functiion look like this

                     

                    // open a camera raw file returning the camera raw action desc

                      this.OpenCameraRaw = function( inOutCameraRawParams, updateCRDesc, inDialogMode ) {

                      var keyNull = charIDToTypeID( 'null' );

                      var keyAs = charIDToTypeID( 'As  ' );

                      var adobeCameraRawID = stringIDToTypeID( "Adobe Camera Raw" );

                      var desc = new ActionDescriptor();

                      desc.putPath( keyNull, File( inOutCameraRawParams.fileName ) );

                      if ( inOutCameraRawParams.desc != undefined && inOutCameraRawParams.useDescriptor &&

                          IsFileOneOfThese( inOutCameraRawParams.fileName, gFilesForCameraRaw ) ) {

                      desc.putObject( keyAs, adobeCameraRawID, inOutCameraRawParams.desc );

                      }

                      if ( inDialogMode == undefined ) {

                      inDialogMode = DialogModes.ALL;

                     

                      // Suppress choose file dialog.

                      var overrideOpenID = stringIDToTypeID( 'overrideOpen' );

                      desc.putBoolean( overrideOpenID, true );

                      }

                      var returnDesc = executeAction( charIDToTypeID( 'Opn ' ), desc, inDialogMode );

                      if ( returnDesc.hasKey( keyAs ) ) {

                      if (updateCRDesc)

                      inOutCameraRawParams.desc = returnDesc.getObjectValue( keyAs, adobeCameraRawID );

                      if ( returnDesc.hasKey( keyNull ) ) {

                      inOutCameraRawParams.fileName = returnDesc.getPath( keyNull ).toString();

                      return true;

                      }

                      }

                      return false;

                      }