Class LrPlugin

This class represents a Lightroom plug-in, and the object provides access to configuration information, such as the path and resources. All resources must exist within the plug-in folder.

A reference to the active plug-in is stored in the global environment as _PLUGIN. There is currently no way to access other plug-ins.

Summary

Reports whether a resource exists in this plug-in.
Retrieves a reference to a resource in this plug-in.
Reports the type of this object.
Reports whether the plug-in is enabled.
Retrieves the unique identifier of this plug-in.
Retrieves the absolute path of the plug-in folder or package.

Functions

plugin:hasResource( name )
Reports whether a resource exists in this plug-in. Typically this is a file in the plug-in folder.

First supported in version 1.3 of the Lightroom SDK.

Parameters

1. name
(string) The name of the resource, with no path information included..

Return value

(Boolean) True if the resource exists; false if not
plugin:resourceId( name )
Retrieves a reference to a resource in this plug-in. Typically this is a file in the plug-in folder.

First supported in version 1.3 of the Lightroom SDK.

Parameters

1. name
(string) The name of the resource, with no path information included.

Return value

(string) A reference to the resource, which can be passed to an LrView picture control, for example. (If the type changes in future, it will still be usable in this way.)

See also

LrView
plugin:type()
Reports the type of this object.

First supported in version 4.1 of the Lightroom SDK.

Return value

(string) 'LrPlugin'.

Properties

plugin.enabled : (Read-Only)
Reports whether the plug-in is enabled.

First supported in version 3.0 of the Lightroom SDK.

plugin.id : (Read-Only)
Retrieves the unique identifier of this plug-in.

First supported in version 1.3 of the Lightroom SDK.

plugin.path : (Read-Only)
Retrieves the absolute path of the plug-in folder or package.

First supported in version 1.3 of the Lightroom SDK.