Namespace LrSelection
Access the functions directly from the imported namespace.
Summary
Functions
- LrSelection.clearLabels()
-
Clears all color labels from the selection.
First supported in version 6.0 of the Lightroom SDK.
- LrSelection.decreaseRating()
-
Decreases the rating of the selection.
First supported in version 6.0 of the Lightroom SDK.
- LrSelection.deselectActive()
-
Removes the active photo from the selection.
First supported in version 6.0 of the Lightroom SDK.
- LrSelection.deselectOthers()
-
Deselects all photos except for the active photo.
First supported in version 6.0 of the Lightroom SDK.
- LrSelection.extendSelection( direction, amount )
-
Extends the existing selection, selecting more photos to its beginning or end. Behaves exactly like the Shift+Left/Right Arrow keys in Library grid.
First supported in version 6.0 of the Lightroom SDK.
Parameters
- 1. direction
- (string) either "left" or "right"
- 2. amount
- (number) number of photos to add to the selection in that direction
- LrSelection.flagAsPick()
-
Sets the flag state of the selction to pick.
First supported in version 6.0 of the Lightroom SDK.
- LrSelection.flagAsReject()
-
Sets the flag state of the selection to reject.
First supported in version 6.0 of the Lightroom SDK.
- LrSelection.getColorLabel()
-
Returns the color label assigned to the active photo, one of: "red", "yellow", "green", "blue", "purple", "other", or "none". The underlying metadata values that these names map to will depend on the current Color Label Set. The default label set maps these names to "Red", "Yellow", "Green", "Blue", and "Purple". The return value "other" indicates that the photo has a label that does not match any values in the current set.
First supported in version 6.0 of the Lightroom SDK.
Return value
(string) The current color label, one of: "red", "yellow", "green", "blue", "purple", "other", or "none". - LrSelection.getFlag()
-
Returns the pick flag state of the active photo as a number (-1 = reject, 0 = none, 1 = pick).
First supported in version 6.0 of the Lightroom SDK.
- LrSelection.getRating()
-
Returns the rating of the selection as a number (0-5).
First supported in version 6.0 of the Lightroom SDK.
- LrSelection.increaseRating()
-
Increases the rating of the selection.
First supported in version 6.0 of the Lightroom SDK.
- LrSelection.nextPhoto()
-
Advances the selection to the next photo in the filmstrip.
First supported in version 6.0 of the Lightroom SDK.
- LrSelection.previousPhoto()
-
Advances the selection to the previous photo in the filmstrip.
First supported in version 6.0 of the Lightroom SDK.
- LrSelection.removeFlag()
-
Clears the flag state of the selection.
First supported in version 6.0 of the Lightroom SDK.
- LrSelection.selectAll()
-
Selects all photos in the filmstrip.
First supported in version 6.0 of the Lightroom SDK.
- LrSelection.selectFirstPhoto()
-
Selects the first photo in the selection, or in the entire filmstrip if there is no selection. Only available in the Library module.
First supported in version 6.0 of the Lightroom SDK.
- LrSelection.selectInverse()
-
Inverts the selection in the filmstrip.
First supported in version 6.0 of the Lightroom SDK.
- LrSelection.selectLastPhoto()
-
Selects the last photo in the selection, or in the entire filmstrip if there is no selection. Only available in the Library module.
First supported in version 6.0 of the Lightroom SDK.
- LrSelection.selectNone()
-
Deselects all photos in the filmstrip.
First supported in version 6.0 of the Lightroom SDK.
- LrSelection.setColorLabel( label )
-
Sets the color label of the selection, one of: "red", "yellow", "green", "blue", "purple", or "none". The underlying metadata values that these names map to will depend on the current Color Label Set. The default label set maps these names to "Red", "Yellow", "Green", "Blue", and "Purple".
First supported in version 6.0 of the Lightroom SDK.
Parameters
- 1. label
- (string) A color label name, one of: "red", "yellow", "green", "blue", "purple", or "none".
- LrSelection.setRating( rating )
-
Sets the rating of the selection.
First supported in version 6.0 of the Lightroom SDK.
Parameters
- 1. rating
- (number) A number between 0 and 5.
- LrSelection.toggleBlueLabel()
-
Toggles the state of the Blue color label of the selection.
First supported in version 6.0 of the Lightroom SDK.
- LrSelection.toggleGreenLabel()
-
Toggles the state of the Green color label of the selection.
First supported in version 6.0 of the Lightroom SDK.
- LrSelection.togglePurpleLabel()
-
Toggles the state of the Purple color label of the selection.
First supported in version 6.0 of the Lightroom SDK.
- LrSelection.toggleRedLabel()
-
Toggles the state of the Red color label of the selection.
First supported in version 6.0 of the Lightroom SDK.
- LrSelection.toggleYellowLabel()
-
Toggles the state of the Yellow color label of the selection.
First supported in version 6.0 of the Lightroom SDK.