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,
ToneCurveName2012 = "Linear",
ToneCurvePV2012Red = {--table: 2
Here's an updated list that includes video fields and Whites2012:
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.
Video fields:
duration = "01:04.0",
frameRate = "30.000 fps",
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",
Video fields:
album = "This is Album",
altTapeName = "This is alternate tape name",
audioSampleRate = "44100",
cameraAngle = "Birds Eye Shot",
cameraModel = "This is camera model",
cameraMove = "Truck Left",
client = "This is client",
comment = "This is comment",
composer = "This is composer",
description = "Hello world"}}
dimensions = {--table: 5
director = "This is director",
directorPhotography = "This is directory of photography",
dm_artist = "This is artist",
dm_scene = "This is scene",
durationInSeconds = 64.066666666667,
durationRatio = {--table: 6
numerator = 961,
denominator = 15},
engineer = "This is engineer",
genre = "This is Genre",
good = "True",
instrument = "This is instrument",
logComment = "This is log comment",
projectName = "This is project name",
releaseDate = "This is release date",
shotDate = "This is shot date",
shotDay = "This is day of shoot",
shotLocation = "This is shot location",
shotName = "This is shot name",
speakerPlacement = "This is speaker placement",
tapeName = "This is tape name",
trimmedDurationInSeconds = 64.066666666667,
trimmedDurationRatio = {--table: 4
numerator = 961,
denominator = 15},
videoPixelAspectRatio = 1,
photo:getDevelopSettings()
ProcessVersion has these values:
"5.0" = PV 2003
"5.7" = PV 2010
"6.6" = PV 2012 beta
"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
Whites2012 = 0,
Video fields:
TrimEnd = {--table: 7
denominator = 15,
numerator = 961},
TrimStart = {--table: 6
denominator = 1,
numerator = 0},
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
Maybe we get API cropping for Lightroom 5.0?
Almost all the mechanism is already present: photo:getDevelopSettings() returns the a photo's current crop settings, and LrApplication.addDevelopPresetForPlugin() lets a plugin create new presets. The only problem is that develop presets don't allow crop settings.
North America
Europe, Middle East and Africa
Asia Pacific