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

Open raw file without settings

New Here ,
Jun 09, 2017 Jun 09, 2017

Copy link to clipboard

Copied

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

Views

792

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 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

...

Votes

Translate

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

Copy link to clipboard

Copied

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.

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

Copy link to clipboard

Copied

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"

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

Copy link to clipboard

Copied

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.

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

Copy link to clipboard

Copied

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');

    }   

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

Copy link to clipboard

Copied

Thanks a lot Chuck,

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

Cheers

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

Copy link to clipboard

Copied

LATEST

Great, glad it worked for you.

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