Skip to main content
Adobe Photoshop Family

19 Messages

 • 

562 Points

Fri, Mar 22, 2019 9:17 PM

Lightroom Classic: LrPhoto quick develop actions in latest SDK have incorrect documentation

In the latest Lightroom Classic SDK documentation, the LrPhoto methods beginning with quickDevelop have documentation stating that the method is for the current photo. However, appying the method to any photo that is in a group of selected photos will apply the action to all selected photos.

I like that it is applied to all selected photos. That is what the user would typically expect. However the documentation, as stated above, is wrong.

To give an example, if two photos are selected and we apply photo:rotateRight to both photos, the photos end up rotated right twice for a 180 degree rotation. If we apply photo:rotateRight to one photo, both are rotated 90 degrees right.

Responses

85 Messages

 • 

1.3K Points

a year ago

Hi Rory,

We just ran below sample to verify 

local catalog = import 'LrApplication'.activeCatalog()
local photos1 = catalog:getTargetPhoto()
photos1.rotateRight()

We're not seeing the behaviour you mentioned.
Can you provide more details and sample script which you're using to reproduce the issue.

Thanks,
Bhargav

19 Messages

 • 

562 Points

a year ago

Yes. Select two photos. Run your script again. You will see that both photos rotate right, not just the current photo.

Champion

 • 

5K Messages

 • 

91.6K Points

a year ago

I observe the same behavior as Rory -- that script rotates all the selected photos.

Also, that script has a typo -- "photos1.rotateRight()" rather than "photos1:rotateRight()". Since "." was used rather than ":", that means that "rotateRight()" is not being invoked as a method call, and "photos1" is not being passed to "rotateRight()".  Thus, "photo:rotateRight()" must necessarily operate on the current selection, even if the selection doesn't include "photo".

That's a wierd definition for a method of LrPhoto. You'd expect that "photo:rotateRight()" would rotate "photo" only, just like any other method call on "photo". 

Thus, this is really a bug in the implementation of "photo:rotateRight()" rather than a documentation mistake.

It would be better to fix this bug and, if Adobe wants to provide the functionality of rotating all the selected photos, add LrSelection.rotateRight() and LrSelection.rotateLeft().