Class LrKeyword
Access the functions and properties from the object. Retrieve the objects for all the keywords by calling LrCatalog.getKeywords().
Summary
LrCatalog
) The catalog object that contains this keyword.Functions
- keyword:getAttributes()
-
Retrieves the attributes of this keyword.
First supported in version 3.0 of the Lightroom SDK.
Return value
(table) A table of attributes; seesetAttributes()
. As of Lightroom 6.0, a keywordType attribute may also be present. If the keyord is a face tag, this attribute will be present with the value "person". - keyword:getChildren()
-
Retrieves the children of this keyword, if any.
This function must be called from within an asynchronous task started using
LrTasks
.First supported in version 3.0 of the Lightroom SDK.
Return value
(array ofLrKeyword
) The child keyword objects, or an empty array if there are no children. - keyword:getName()
-
Retrieves the name of this keyword.
This function must be called from within an asynchronous task started using
LrTasks
.First supported in version 3.0 of the Lightroom SDK.
Return value
(string) The name. - keyword:getParent()
-
Retrieves the parent of this keyword, if any.
This function must be called from within an asynchronous task started using
LrTasks
.First supported in version 3.0 of the Lightroom SDK.
Return value
(LrKeyword
) The parent keyword object, or nil if this is a top-level keyword. - keyword:getPhotos()
-
Retrieves the photos that have this keyword.
This function must be called from within an asynchronous task started using
LrTasks
.First supported in version 3.0 of the Lightroom SDK.
Return value
(array ofLrPhoto
). The photo objects. - keyword:getSynonyms()
-
Retrieves the synonyms for this keyword.
This function must be called from within an asynchronous task started using
LrTasks
.First supported in version 3.0 of the Lightroom SDK.
Return value
(array of string) The synonyms. - keyword:setAttributes( keywordInfo )
-
Sets attributes for this keyword.
Must be called from within one of the
catalog:with___WriteAccessDo
gates.This call can be used within the same
catalog:with___WriteAccessDo
call that created this keyword.First supported in version 3.0 of the Lightroom SDK.
Parameters
- 1. keywordInfo
- (table) A table that contains these fields:
- keywordName: (string) The name of the keyword.
- synonyms: (table) The names of synonyms.
- includeOnExport: (Boolean) True to include the keyword when the photo is exported.
Return value
True on success, false if there is already a keyword which has the same name and parent. - keyword:type()
-
Reports the type of this object.
First supported in version 3.0 of the Lightroom SDK.
Return value
(string) 'LrKeyword'
Properties
- keyword.catalog : (Read-Only)
-
(
LrCatalog
) The catalog object that contains this keyword.First supported in version 3.0 of the Lightroom SDK.
See also: LrCatalog - keyword.localIdentifier : (Read-Only)
-
(number) The local identifier of the keyword, unique within this catalog.
First supported in version 3.0 of the Lightroom SDK.