Author Topic: Lightroom Ratings don't register in Photoshop if ingesting via PM  (Read 23663 times)

Offline pjjones

  • Newcomer
  • *
  • Posts: 16
    • View Profile
Re: Lightroom Ratings don't register in Photoshop if ingesting via PM
« Reply #15 on: March 03, 2014, 02:15:04 PM »
Hi Kirk

I tentatively think I've found the bug...

When Photo Mechanic creates XMP files it adds a 'photoshop:DateCreated' field to the sidecar XMP file.

I compared the Photo Mechanic created field to a field created by Bridge, and the data format of the PM created field is different.

eg.
XMP created by Photo Mechanic for a photo - photoshop:DateCreated="2014-02-28T10:07:42-84:-6"
XMP created by Bridge for that same photo - photoshop:DateCreated="2014-02-28T10:07:42.01"

You'll see at the end of the time, that the format is quite different.  It seems that when Photoshop reads this data that it sees that it is incorrect and then rejects the rest of the XMP data.

If I do the following, Photoshop recognizes the rating correctly.

1. Injest using Photo Mechanic.
2. Edit the photoshop:DateCreated field using a text editing program so that it is the same format as Bridge creates.
3. Rate the photo with Bridge
4. Open it in Photoshop.  Result: it works PERFECTLY!

I also tried just deleting this field (that was actually what I tried first) and found that it works as well.

I have tried importing photos using the Canon 5D Mk II and the 5D Mk III with the same results.  Photo Mechanic seems to be creating the photoshop:DataCreated field with incorrect formatting.

Let me know your thoughts.
Paul

Offline pjjones

  • Newcomer
  • *
  • Posts: 16
    • View Profile
Re: Lightroom Ratings don't register in Photoshop if ingesting via PM
« Reply #16 on: March 03, 2014, 02:24:22 PM »
YAY!!!

I've just done the following to a Lightroom file and it solves my problem!

1. Right click the thumbnail in Lightroom and click on 'Metadata -> Save metadata to file'
2. Edit the XMP file with a text editor and remove anything after the time in the photoshop:Datacreated field. (eg. change '2014-02-28T10:07:42-84:-6' to read '2014-02-28T10:07:42'
3. Right click the thumbnail in Lightroom and click on 'Metadata -> Read metadata from file'
4. Edit in Photoshop.  Photoshop recognizes the rating, and Lightroom doesn't lose all my develop settings.

Just need to find some sort of text-replacing file command in windows to go through all the XMP files created by Lightroom and change the date on all of the XMP files in one go so they are correct.


Offline pjjones

  • Newcomer
  • *
  • Posts: 16
    • View Profile
Re: Lightroom Ratings don't register in Photoshop if ingesting via PM
« Reply #17 on: March 03, 2014, 03:00:56 PM »
Double YAY!

Found out why no one else is complaining about this!

Photo Mechanic seems to not like our Timezone setting here in New Zealand.  We are on UTC +12:00 hours (Auckland, Wellington)

If I change my computer to Brisbane, Australia Timezone, and import the files using Photo Mechanic, the format of the photoshop:Datacreated field is correct.  If I change it back to New Zealand, then the format of the photoshop:Datacreated field is wrong.

Australian Time Zone (UTC +10) set in Windows - photoshop:DateCreated="2014-02-28T10:04:41+10:00"
New Zealand Time Zone (UTC +12) set in Windows - photoshop:DateCreated="2014-02-28T10:04:41-84:-3"

Only New Zealand users (Fiji and also Samoa who are on UTC +13) will notice this bug.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Lightroom Ratings don't register in Photoshop if ingesting via PM
« Reply #18 on: March 03, 2014, 03:25:00 PM »
Paul,

Is the embedded XMP rating (<xmp:Rating>0</xmp:Rating>) in both the LR and PM injested files?

Yes.  The rating of zero is present in both of the CR2 files you provided.

If you ingest only with LR but rate with PM, is there any difference in the outcome of launching Photoshop via the several methods you've tried?

-Kirk

Offline pjjones

  • Newcomer
  • *
  • Posts: 16
    • View Profile
Re: Lightroom Ratings don't register in Photoshop if ingesting via PM
« Reply #19 on: March 03, 2014, 03:56:11 PM »
Hi Kirk

Gather you might not have seen my solution (bug discovery) that was posted above your latest reply?

Thanks
Paul

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Lightroom Ratings don't register in Photoshop if ingesting via PM
« Reply #20 on: March 03, 2014, 05:30:50 PM »
Hi Paul,

No, I had not seen the posts that made it to the second page.

Interesting.  Do you observe any daylight savings time in New Zealand?  If so, is it in effect right now?

I'm investigating the problem in the code but I need the above additional information.

Thanks,

-Kirk

Offline pjjones

  • Newcomer
  • *
  • Posts: 16
    • View Profile
Re: Lightroom Ratings don't register in Photoshop if ingesting via PM
« Reply #21 on: March 03, 2014, 05:35:16 PM »
Hi Kirk

Yes, we do have daylight savings of one hour, and yes, it is in effect right now.

Daylight savings ends on 6th April this year.

Thanks
Paul

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Lightroom Ratings don't register in Photoshop if ingesting via PM
« Reply #22 on: March 03, 2014, 06:27:45 PM »
Paul,

Thanks for your help on this.  I've got a fix in the works.  I'll message you with a link to a new build of PM 5 which should solve this problem.  It won't repair the other files however.

-Kirk

Offline pjjones

  • Newcomer
  • *
  • Posts: 16
    • View Profile
Re: Lightroom Ratings don't register in Photoshop if ingesting via PM
« Reply #23 on: March 03, 2014, 06:40:00 PM »
Fantastic.  Thanks so much for persevering with this and looking into this for me.

I've written a Windows Powershell script which goes through all of the XMP files in the directory and removes the incorrect timezone info from them, which has fixed the problem. 

To fix my files in Lightroom, I wrote all the metadata info from Lightroom, ran the script and then read the metadata back into Lightroom again and it is all running perfectly now.

Since no one else is posting about this issue, there is probably no point in sharing the script, but here it is anyway.

Code: [Select]
# Script to correct faulty XMP Date information in photoshop:DateCreated field
#
# Update 'path_to_directory' with the path to the folder that has the xmp files that you want to update.
# Note: the script updates all XMP files in that folder and in any subfolders as well

Get-ChildItem "c:\path_to_folder" -Recurse -Filter *.xmp |
Foreach-Object{
    $content = Get-Content $_.FullName
    $content | ForEach-Object { $_ -replace 'photoshop:DateCreated="(?<date>\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2})-.*"', 'photoshop:DateCreated="${date}"' } | Set-Content $_.FullName
}