Skip navigation
Currently Being Moderated

LR 4 changes to photo:get*Metadata()

Apr 27, 2012 9:55 PM

Since we have no idea when the LR 4 SDK documentation might arrive, I started reverse-engineering changes to photo:getFormattedMetadata() and photo:getRawMetadata().  Here are the differences I've observed between LR 3.6 and LR 4.1 RC2:

 

photo:getFormattedMetadata()

 

gpsAltitude is now in feet rather than meters:

 

"2500.0 ft" rather than "762.00 m"

 

I don't know if this is localized to each country.

 

photo:getRawMetadata()

 

The representation of photos not in a stack has changed.  In LR 3.6 it is:

 

countStackInFolderMembers = 1,

stackInFolderMembers = {--table: 3

            [1] = LrPhoto( id "14000" )},

stackPositionInFolder = 1,

topOfStackInFolderContainingPhoto = LrPhoto( id "14000" ),

 

In LR 4.1 RC2 it is:

 

countStackInFolderMembers = 0,

stackInFolderMembers = {},

stackPositionInFolder = 1,

 

LR 4's representation is inconsistent but more memory-efficient.

 

At last, there's pickStatus!

 

0 = unflagged

1 = flagged

-1 = rejected

 

I haven't tested whether pickStatus can be changed via photo:setRawMetadata().

 

There's a new field root_uiid:

 

root_uuid = "545E7456-C7D3-40F1-8E65-6F4225D057A4",

 

photo:getDevelopSettings()

 

ProcessVersion has these values:

 

"5.0" = PV 2003

"5.7" = PV 2010

"6.7" = PV 2012

 

These fields represent the new settings of PV 2012:

 

AutoLateralCA = 0,

Blacks2012 = 0,

Clarity2012 = 0,

Contrast2012 = 0,

DefringeGreenAmount = 0,

DefringeGreenHueHi = 60,

DefringeGreenHueLo = 40,

DefringePurpleAmount = 0}

DefringePurpleHueHi = 70,

DefringePurpleHudeLo = 30,

Exposure2012 = 0,

Highlights2012 = 0,

Shadows2012 = 0,

ToneCurveName2012 = "Linear",

ToneCurvePV2012 = {--table: 6
ToneCurvePV2012Blue = {--table: 5
ToneCurvePV2012Green = {--table: 3

ToneCurvePV2012Red = {--table: 2

 
Replies
  • Currently Being Moderated
    Apr 27, 2012 10:56 PM   in reply to John R. Ellis

    Thanks John!

     

    Also, ProcessVersion = "6.6" may be returned for PV2012/beta-not-yet-converted to "6.7".

     

    R

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 28, 2012 3:54 AM   in reply to Rob Cole

    Btw, how does a photo actually get updated from 6.6 to 6.7?  I'm puzzled if I would need to handle 6.6 in my code at all (I'm not currently doing it, I know my UI doesnt work properly with 6.6 version)

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 28, 2012 2:34 PM   in reply to jarnoh

    jarnoh wrote:

     

    Btw, how does a photo actually get updated from 6.6 to 6.7?

    Automagically, and leisurely.

     

    @Lr4.0, Lightroom would not convert all entries from 6.6 to 6.7 - only when one goes to view or make an adjustment. I'm really not sure what-all prompts it, I just noticed they've been sorta disappearing over time...

     

    So, YES - any robust code must be able to recognize 6.6. I've gotten away with assuming it's identical to 6.7, but obviously there could be some differences or there wouldn't have been a different number in the first place.

     

    I mean, I discovered it via error messages in my code that was originally not recognizing it.

     

    I wish Adobe would have just converted all entries when reading a beta catalog, so there would not be this issue, but alas, that is not the case.

     

    R

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 28, 2012 2:46 PM   in reply to John R. Ellis

    I'm assuming Adobe wanted to get the new defringing parameters in there before releasing the new SDK...

     

    Thx John,

    R

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 29, 2012 5:05 AM   in reply to John R. Ellis

    Just tested:

     

    photo:setRawMetadata("pickStatus", -1) -- reject

    photo:setRawMetadata("pickStatus", 0) -- no flag

    photo:setRawMetadata("pickStatus", 1) -- pick

     

    These seem to be working as expected with 4.1 RC2.  Maybe we get API cropping for Lightroom 5.0?

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 29, 2012 11:29 AM   in reply to John R. Ellis

    yep I know - its like saying that LR3 almost supported pick status?

     

    BTW LR4 does have some weird behaviour if you try to set CropWidth/CropHeight, the picture is then shown in wrong aspect ratio.  I had to filter out those from my XMP preset ripper plugin.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points