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

Open raw file without settings

New Here ,
Jun 09, 2017 Jun 09, 2017

Hey,

Im trying to open a raw file without any settings. I can reset most of them with CameraRawOpenOptions but I still need to reset the crop and various brushes used in camera raw previously. Is there a way to open without the xmp or any other way to do this?

Thanks a lot!

TOPICS
Actions and scripting
942
Translate
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 1 Correct answer

Community Expert , Jun 10, 2017 Jun 10, 2017

This will only work on raw files that have the xmp sidecar and not dngs. The code below has a hard coded filename, but you can swap that out with a get statement to get a list of file names, then loop through that. There is an ending if statement to return the xmp to the original name.

#target photoshop

var file = new File('/c/Photos/test.RAF');

var fileXMP = new File(file.fsName.split('.')[0] + '.xmp');

if(fileXMP.exists){

    var originalName = fileXMP.name.split('.')[0];

    fileXMP.rename(original

...
Translate
Adobe
Community Expert ,
Jun 09, 2017 Jun 09, 2017

I'm not sure if there's code to do what you want, but you could rename the xmp file then open the image file, so there is no xmp data associated with the file. You could then rename it back to it's original name, if you want to keep any original corrections.

Translate
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 09, 2017 Jun 09, 2017

Another option would be to use ExifTool to remove the ACR data from the XMP sidecar file:

Mac OS:

exiftool -XMP-crs:all= '/mac os/path/to/file.xmp'

Win OS:

exiftool -XMP-crs:all= "C:\Users\Username\Path to\file.xmp"

Translate
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 10, 2017 Jun 10, 2017

Thanks!

Is there an option to remove/rename the xmp file (or clear it of the content) from photoshop via scripting? Unfortunately can't exif tool be used since this will be run on several computers.

Translate
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 10, 2017 Jun 10, 2017

This will only work on raw files that have the xmp sidecar and not dngs. The code below has a hard coded filename, but you can swap that out with a get statement to get a list of file names, then loop through that. There is an ending if statement to return the xmp to the original name.

#target photoshop

var file = new File('/c/Photos/test.RAF');

var fileXMP = new File(file.fsName.split('.')[0] + '.xmp');

if(fileXMP.exists){

    var originalName = fileXMP.name.split('.')[0];

    fileXMP.rename(originalName + '(orig).xmp');

    }

var doc = open(file);

   

if(fileXMP.exists){

    fileXMP.rename(originalName + '.xmp');

    }   

Translate
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 10, 2017 Jun 10, 2017

Thanks a lot Chuck,

This is exactly what I'm looking for. Just tried it out and it works like a charm.

Cheers

Translate
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 10, 2017 Jun 10, 2017
LATEST

Great, glad it worked for you.

Translate
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