Adobe 65007312 Programming Guide - Page 45

Defining a post-process action, Service Provider.

Page 45 highlights

CHAPTER 3: Creating Export and Publish Services Adding an export post-process action 45 }, { title = "Lines", file = "lineAction.lua", id = "lines", requiresFilter = "main", }, }, Defining a post-process action An action definition script must return a table which can contain these entries. All entries are optional. postProcessRenderedPhotos A function that defines how this action processes the list of rendered photos that it receives. See "Defining post-processing of rendered photos" on page 46. Typically, only the main action in a group defines this function. shouldRenderPhoto A function that selects photos to be removed from the list of rendered photos that it receives. See "Removing photos from the export operation" on page 46. startDialog endDialog Initialization and termination functions that run when the action is selected or deselected in the Export dialog. See "Initialization and termination functions for services" on page 38. exportPresetFields A set of export preset settings that you define for your plug-in (in addition to the built-in settings defined by Lightroom). If provided, these fields are transferred from the Export dialog's property table to any export preset that is created when this post-process action is selected for the current Export session. See "Remembering user choices" on page 57. sectionForFilterInDialog A function that defines a new section in the Export dialog which appears when the action is selected, allowing the user to make choices that affect the operation. Any action in a group can define a dialog section. The function must conform to this prototype: sectionForFilterInDialog = function( viewFactory, propertyTable ) ... end, This function is defined in the same way as sectionsForTopOfDialog and sectionsForBottomOfDialog, except that the function returns a single section definition, not an array of section definitions; see "Adding custom sections to the Export or Publishing Manager dialog" on page 53. The section is always added at the bottom of the Export dialog, but above any "bottom" sections defined for the active Export Service Provider. The property table passed to this function is shared among all Export Filter Providers and Export Service Providers defined by this plug-in.

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204

C
HAPTER
3: Creating Export and Publish Services
Adding an export post-process action
45
},
{
title = "Lines",
file = "lineAction.lua",
id = "lines",
requiresFilter = "main",
},
},
Defining a post-process action
An action definition script must return a table which can contain these entries. All entries are optional.
postProcessRenderedPhotos
A function that defines how this action processes the list of rendered
photos that it receives. See
“Defining post-processing of rendered
photos” on page 46
.
Typically, only the main action in a group defines this function.
shouldRenderPhoto
A function that selects photos to be removed from the list of rendered
photos that it receives. See
“Removing photos from the export
operation” on page 46
.
startDialog
endDialog
Initialization and termination functions that run when the action is
selected or deselected in the Export dialog. See
“Initialization and
termination functions for services” on page 38
.
exportPresetFields
A set of export preset settings that you define for your plug-in (in
addition to the built-in settings defined by Lightroom). If provided,
these fields are transferred from the Export dialog’s property table to
any export preset that is created when this post-process action is
selected for the current Export session. See
“Remembering user
choices” on page 57
.
sectionForFilterInDialog
A function that defines a new section in the Export dialog which
appears when the action is selected, allowing the user to make choices
that affect the operation. Any action in a group can define a dialog
section.
The function must conform to this prototype:
sectionForFilterInDialog = function( viewFactory,
propertyTable ) ... end,
This function is defined in the same way as
sectionsForTopOfDialog
and
sectionsForBottomOfDialog
, except that the function returns a
single section definition, not an array of section definitions; see
“Adding custom sections to the Export or Publishing Manager dialog”
on page 53
. The section is always added at the bottom of the Export
dialog, but above any “bottom” sections defined for the active Export
Service Provider.
The property table passed to this function is shared among all Export
Filter Providers and Export Service Providers defined by this plug-in.