-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathluce.r
307 lines (262 loc) · 10.4 KB
/
luce.r
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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
// ****************************************************************************
// By Antonino Perricone
// http://amicoperry.altervista.org/luce/
//
// This work is licensed under the Creative Commons
// Attribution-NonCommercial-ShareAlike 3.0 Unported License.
// To view a copy of this license, visit
// http://creativecommons.org/licenses/by-nc-sa/3.0/.
// ****************************************************************************
#if (defined(macintosh) || defined(__POWERPC__) || defined(__powerc)) || defined(__APPLE_CC__)
#include <Carbon.r>
#include "PIGeneral.r"
#include "luce_photoshop_params.h"
#elif (defined(MSDOS) || defined(WIN32) || defined(_WIN32) || (defined(__INTEL__) && !defined(__MACH__)) || defined(_MSC_VER))
#define Rez
#include "luce_photoshop_params.h"
#include "PIGeneral.h"
#endif
#include "PIActions.h"
resource 'PiPL' ( 16000, "Luce", purgeable )
{
{
Kind { Filter },
Name { plugInName "..." },
Category { vendorName },
Version { (latestFilterVersion << 16 ) | latestFilterSubVersion },
#ifdef __PIMac__
#if (defined(__i386__))
CodeMacIntel32 { "PluginMain" },
/* If your plugin uses Objective-C, Cocoa, for UI it should not be
unloaded, this flag is valid for 32 bit plug-ins only and
should not be used in any windows section */
// off for now as this plug-in has no Objective-C Cocoa {},
#endif
#if (defined(__x86_64__))
CodeMacIntel64 { "PluginMain" },
#endif
#else
#if defined(_WIN64)
CodeWin64X86 { "PluginMain" },
#else
CodeWin32X86 { "PluginMain" },
#endif
#endif
SupportedModes
{
noBitmap, doesSupportGrayScale,
noIndexedColor, doesSupportRGBColor,
noCMYKColor, noHSLColor,
noHSBColor, noMultichannel,
noDuotone, noLABColor
},
HasTerminology
{
plugInClassID,
plugInEventID,
16000,
plugInUniqueID
},
EnableInfo { "in (PSHOP_ImageMode, RGBMode, GrayScaleMode) ||"
"PSHOP_ImageDepth == 16 ||"
"PSHOP_ImageDepth == 32" },
PlugInMaxSize { 2000000, 2000000 },
FilterLayerSupport {doesSupportFilterLayers},
FilterCaseInfo
{
{
/* Flat data, no selection */
inWhiteMat, outWhiteMat,
doNotWriteOutsideSelection,
filtersLayerMasks, worksWithBlankData,
copySourceToDestination,
/* Flat data with selection */
inWhiteMat, outWhiteMat,
writeOutsideSelection,
filtersLayerMasks, worksWithBlankData,
copySourceToDestination,
/* Floating selection */
inWhiteMat, outWhiteMat,
writeOutsideSelection,
filtersLayerMasks, worksWithBlankData,
copySourceToDestination,
/* Editable transparency, no selection */
inWhiteMat, outWhiteMat,
doNotWriteOutsideSelection,
filtersLayerMasks, worksWithBlankData,
copySourceToDestination,
/* Editable transparency, with selection */
inWhiteMat, outWhiteMat,
writeOutsideSelection,
filtersLayerMasks, worksWithBlankData,
copySourceToDestination,
/* Preserved transparency, no selection */
inWhiteMat, outWhiteMat,
doNotWriteOutsideSelection,
filtersLayerMasks, worksWithBlankData,
copySourceToDestination,
/* Preserved transparency, with selection */
inWhiteMat, outWhiteMat,
writeOutsideSelection,
filtersLayerMasks, worksWithBlankData,
copySourceToDestination
}
}
}
};
resource 'aete' (16000, "Dissolve dictionary", purgeable)
{
1, 0, english, roman, /* aete version and language specifiers */
{
vendorName, /* vendor suite name */
"Adobe example plug-ins", /* optional description */
plugInSuiteID, /* suite ID */
1, /* suite code, must be 1 */
1, /* suite level, must be 1 */
{ /* structure for filters */
plugInName, /* unique filter name */
plugInAETEComment, /* optional description */
plugInClassID, /* class ID, must be unique or Suite ID */
plugInEventID, /* event ID, must be unique to class ID */
NO_REPLY, /* never a reply */
IMAGE_DIRECT_PARAMETER, /* direct parameter, used by Photoshop */
{ /* parameters here, if any */
"type", // parameter name
keyType, // parameter key ID
typeLight, // parameter type ID
"type of light", // optional description
flagsEnumeratedParameter, // parameter flags
"xPos", // parameter name
keyXPos, // parameter key ID
typeFloat, // parameter type ID
"x position of light, 1 is right border", // optional description
flagsSingleParameter, // parameter flags
"yPos", // parameter name
keyYPos, // parameter key ID
typeFloat, // parameter type ID
"y position of light, 1 is bottom border", // optional description
flagsSingleParameter, // parameter flags
"angle", // parameter name
keyAngle, // parameter key ID
typeFloat, // parameter type ID
"angle of light in degree", // optional description
flagsSingleParameter, // parameter flags
"attenuation", // parameter name
keyAttenuation, // parameter key ID
typeAttenuation, // parameter type ID
"type of attenuation to apply", // optional description
flagsEnumeratedParameter, // parameter flags
"algorithm", // parameter name
keyAlgorithm, // parameter key ID
typeAlgorithm, // parameter type ID
"algorithm", // optional description
flagsEnumeratedParameter, // parameter flags
"LightScale", // parameter name
keyPositiveScale, // parameter key ID
typeFloat, // parameter type ID
"scale to apply to positive data", // optional description
flagsSingleParameter, // parameter flags
"ShadowScale", // parameter name
keyNegativeScale, // parameter key ID
typeFloat, // parameter type ID
"scale to apply to negative data", // optional description
flagsSingleParameter, // parameter flags
"normalizePositive", // parameter name
keyPositiveNormalize, // parameter key ID
typeBoolean, // parameter type ID
"if true the value between zero and white "
"are scale to be between black and white", // optional description
flagsSingleParameter, // parameter flags
"normalizeNegative", // parameter name
keyNegativeNormalize, // parameter key ID
typeBoolean, // parameter type ID
"if true the value between black and zero are scale "
"to be between black and negative white", // optional description
flagsSingleParameter, // parameter flags
"addSource", // parameter name
keyAddSource, // parameter key ID
typeBoolean, // parameter type ID
"If true the source will be added to luce"
"result", // optional description
flagsSingleParameter, // parameter flags
"sourceZero", // parameter name
keySourceZero, // parameter key ID
typeBoolean, // parameter type ID
"If true, when add the source the zero color (and negatives)"
"is converted to black", // optional description
flagsSingleParameter, // parameter flags
"sourcePositiveNormalize", // parameter name
keySourcePositiveNormalize, // parameter key ID
typeBoolean, // parameter type ID
"If true, when add the source the color between zero color and "
"white is scaled to be black to white", // optional description
flagsSingleParameter, // parameter flags
"sourceNegativeNormalize", // parameter name
keySourceNegativeNormalize, // parameter key ID
typeBoolean, // parameter type ID
"If true, when add the source the color between black and zero "
"color is scaled to be black to white negative",
// optional description
flagsSingleParameter, // parameter flags
"zero0", // parameter name
keyZero0, // parameter key ID
typeFloat, // parameter type ID
"First zero value", // optional description
flagsSingleParameter, // parameter flags
"zero1", // parameter name
keyZero1, // parameter key ID
typeFloat, // parameter type ID
"Second zero value", // optional description
flagsSingleParameter, // parameter flags
"zero2", // parameter name
keyZero2, // parameter key ID
typeFloat, // parameter type ID
"Third zero value", // optional description
flagsSingleParameter, // parameter flags
"zero3", // parameter name
keyZero3, // parameter key ID
typeFloat, // parameter type ID
"Fourth zero value", // optional description
flagsSingleParameter, // parameter flags
"zero4", // parameter name
keyZero4, // parameter key ID
typeFloat, // parameter type ID
"Fifth zero value", // optional description
flagsSingleParameter // parameter flags
}
},
{ /* non-filter plug-in class here */
},
{ /* comparison ops (not supported) */
},
{ /* any enumerations */
typeLight,
{
"point", /* first value */
typePoint,
"point light source", /* optional description */
"directional", /* second value */
typeDirectional,
"directional light", /* optional description */
},
typeAttenuation,
{
"linear", /* first value */
typeLinear,
"linear", /* optional description */
"quadratic", /* second value */
typeQuadratic,
"quadratic", /* optional description */
},
typeAlgorithm,
{
"zero", /* first value */
typeZero,
"zero algorithm", /* optional description */
"lightForm", /* second value */
typeLightForm,
"light form algorithm", /* optional description */
}
}
}
};