Namespace LrApplication
Access the functions directly from the imported namespace.
Summary
Functions
- LrApplication.activeCatalog()
-
Retrieves the catalog that is currently open in Lightroom.
First supported in version 1.3 of the Lightroom SDK.
Return value
(LrCatalog
) The catalog object.See also
LrCatalog - LrApplication.addDevelopPresetForPlugin( plugin, presetName, presetValue )
-
Adds a preset hidden within a plug-in. These presets are stored in a special folder called "Plugin Develop Presets." They do not appear in the presets panel in the Develop module, and cannot be retrieved by ID.
This type of preset can be retrieved using
LrApplication:getDevelopPresetsForPlugin()
. To apply the preset, useLrPhoto:applyDevelopPresetFromPlugin
.First supported in version 3.0 of the Lightroom SDK.
Parameters
- 1. plugin
- (
_PLUGIN
) Your plug-in object. - 2. presetName
- (string) The preset's name.
- 3. presetValue
- (table) The setting values for the preset. For allowed values, see
LrDevelopPreset:getSetting
.
Return value
(LrDevelopPreset
) The preset object. - LrApplication.developPresetByUuid( uuid )
-
Retrieves a develop preset from its unique identifier. This does not retrieve presets added using
LrApplication:addDevelopPresetForPlugin
.First supported in version 3.0 of the Lightroom SDK.
Parameters
- 1. uuid
- (string) The unique identifier, as returned by
LrDevelopPreset:getUuid
.
Return value
(LrDevelopPreset
) The preset object. - LrApplication.developPresetFolders()
-
Retrieves all defined develop preset folders.
First supported in version 3.0 of the Lightroom SDK.
Return value
(array ofLrDevelopPresetFolder
) The preset folder objects. - LrApplication.filenamePresets()
-
Reports available file-naming presets.
First supported in version 3.0 of the Lightroom SDK.
Return value
(table) A table describing each of the available file-naming presets, or an empty table if no presets exist.- key: The preset name.
- value: The UUID or path to the preset's definition.
- LrApplication.getDevelopPresetsForPlugin( plugin, uuid )
-
Retrieves a specific develop preset, or all develop presets associated with this plug-in.
First supported in version 3.0 of the Lightroom SDK.
Parameters
- 1. plugin
- (
_PLUGIN
) Your plug-in object. - 2. uuid
- (string) Optional, the unique identifier of a preset. See
LrDevelopPreset:getUuid
.
Return value
(LrDevelopPreset
or array ofLrDevelopPreset
) The specified preset object, or an array of all associated presets if no unique ID is supplied. - LrApplication.metadataPresets()
-
Reports available metadata presets. The returned table contains the name of each metadata property along with its string ID. For example, an entry might be:
"_MSD Basic Details" = "BEDF33BA-47FE-4076-9088-2FC3CBACAF10",
.First supported in version 3.0 of the Lightroom SDK.
Return value
(table) A table describing each of the available metadata presets, or an empty table if no presets exist.- key: The preset name.
- value: The UUID or path to the preset's definition.
- LrApplication.serialNumberHash()
-
Retrieves a unique identifier that is keyed to the Lightroom serial number. This can be used to implement plug-in registrations.
First supported in version 3.0 of the Lightroom SDK.
Return value
(string) The unique ID, or "trial" if no serial number is installed (as in 30-day trial mode). - LrApplication.versionString()
-
Retrieves the current version of the application as a user-displayable string (for instance, "2.0").
First supported in version 2.0 of the Lightroom SDK.
Return value
(string) Lightroom version - LrApplication.versionTable()
-
Retrieves the current version of the application as a table that can be parsed. For example, a version such as 2.1.4 contains three components, the major version, the minor version, and the revision number of a specific release. There is also be a build number (usually a 6-digit number), and a public beta number or indicator.
First supported in version 2.0 of the Lightroom SDK.
Return value
(table) Lightroom version. Contains the following members:- major: (number) Major version number
- minor: (number) Minor version number
- revision: (number) Revision number
- build: (number) Build number (usually a six-digit number)
- publicBeta: (number or Boolean) Public beta number, or false for final or near-final release.
- LrApplication.viewFilterPresets()
-
Reports available view-filter presets.
First supported in version 3.0 of the Lightroom SDK.
Return values
- (table) A table describing each of the available view-filter presets, or an empty table if no presets exist.
- key: The preset name.
- value: The UUID or path to the preset's definition.
- (string) If a named filter is currently invoked, the name of that filter.
- (table) A table describing each of the available view-filter presets, or an empty table if no presets exist.