Namespace LrExportSettings
This namespace allows you to check or set an image file format for an export operation, and (as of Lightroom 4.0) it also provides access to
LrVideoExportPreset
objects which represent the presets available for video export. These objects, in turn, can be used to access the names of the video export presets, as shown in the Export Dialog, as well as the strings used to represent each preset in export settings (export_videoPreset
property). Access the functions directly from the imported namespace.
Summary
LrExportSettings.addVideoExportPresets( definition, pluginObject )
Adds to the available presets for video export in the export/publish dialog in the form of additional entries in the 'Format' and 'Quality' popup menus in the Video section.
LrExportSettings.applyVideoExportPreset( exportSettings, preset )
Applies the specified video export preset to the 'exportSettings' property table.
LrExportSettings.extensionForFormat( format )
Retrieves the proper file extension to use for a file format.
LrExportSettings.removeVideoExportPreset( presetObject, pluginObject )
Removes a custom video export preset previously added by this plug-in via addVideoEXportPresets.
Retrieves an array of tables, each of which describes a format supportable for video export.
Retrieves the
LrVideoExportPreset
objects associated with the available presets for video export.LrExportSettings.videoExportPresetsForPlugin( pluginObject )
Returns a list of custom video export presets previously added by this plug-in via addVideoEXportPresets.
Functions
- LrExportSettings.addVideoExportPresets( definition, pluginObject )
-
Adds to the available presets for video export in the export/publish dialog in the form of additional entries in the 'Format' and 'Quality' popup menus in the Video section.
The video export preset file (.epr) is required to be generated with Adobe Media Encoder.
First supported in vesion 4.0 of the Lightroom SDK.
Parameters
- 1. definition
- (table) A table specifying information about video export presets to be added the Video section of the export/publish dialog.
- 2. pluginObject
- (LrPlugin) The LrPlugin instance representing the plug-in, typically accessed through _PLUGIN.
Return value
(table) Array containing LrVideoExportPreset objects for the presets just added.local pluginDir = _PLUGIN.path
local presetFile = 'aiff.epr'
LrExportSettings.addVideoExportPresets( {
[ 'My h.264' ] = {
-- The format identifier for the video export format that this preset
-- corresponds to. This identifier must be equal to the 'formatName'
-- entry in one of the entries in the table returned by
-- LrExportSettings.supportableVideoExportFormats, i.e. 'h.264'.
format = 'h.264',
-- Must be an absolute path
presetPath = LrPathUtils.child( _PLUGIN.path, 'mypreset.epr' ),
-- To be displayed as target info in export dialog.
targetInfo = 'my preset target info',
}, _PLUGIN
} ) - LrExportSettings.applyVideoExportPreset( exportSettings, preset )
-
Applies the specified video export preset to the 'exportSettings' property table. Typically used while constructing properties for an LrExportSession instantiation.
First supported in version 4.0 of the Lightroom SDK.
Parameters
- 1. exportSettings
- (table) The property table containing export settings.
- 2. preset
- (LrVideoExportPreset) The video export preset to apply to the propertyTable.
- LrExportSettings.extensionForFormat( format )
-
Retrieves the proper file extension to use for a file format.
First supported in version 1.3 of the Lightroom SDK.
Parameters
- 1. format
- (string or
LrVideoExportPreset
) A file format string as used by export settings (One of: 'ORIGINAL', 'JPEG', 'PNG', 'TIFF', 'PSD', or 'DNG'), or, as of Lightroom 4.0, anLrVideoExportPreset
object can also be passed in.
Return value
(string) The file extension to be used (such as 'jpg', 'png', 'mp4')See also
LrPhoto - LrExportSettings.removeVideoExportPreset( presetObject, pluginObject )
-
Removes a custom video export preset previously added by this plug-in via addVideoEXportPresets.
This call will return true if successful, false otherwise. Only presets added by this plug-in can be removed.
First supported in version 4.0 of the Lightroom SDK.
Parameters
- 1. presetObject
- (LrVideoExportPreset or string) The preset object corresponding to the preset to remove, or the string 'ALL' to remove all custom video export presets provided by this plug-in.
- 2. pluginObject
- (LrPlugin) The LrPlugin instance representing the plug-in, typically accessed through _PLUGIN.
Return value
(Boolean) True if successful, false otherwise. - LrExportSettings.supportableVideoExportFormats()
-
Retrieves an array of tables, each of which describes a format supportable for video export.
First supported in version 4.0 of the Lightroom SDK.
Return value
(table) Array of tables. Each table contains- extension: (string) The file extension any video exported using this format will receive.
- formatName: (string) The name of this format. Use this when adding video export presets in your plug-in.
- LrExportSettings.videoExportPresets()
-
Retrieves the
LrVideoExportPreset
objects associated with the available presets for video export.First supported in version 4.0 of the Lightroom SDK.
Return value
(table) Array ofLrVideoExportPreset
- LrExportSettings.videoExportPresetsForPlugin( pluginObject )
-
Returns a list of custom video export presets previously added by this plug-in via addVideoEXportPresets.
First supported in version 4.0 of the Lightroom SDK.
Parameters
- 1. pluginObject
- (LrPlugin) The LrPlugin instance representing the plug-in, typically accessed through _PLUGIN.
Return value
(table) Array ofLrVideoExportPreset