HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PRM_Type.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: PRM_Type.h (Parameter Library)
7  *
8  * COMMENTS:
9  * These are the flags which are used to determine the type
10  * of parameter.
11  */
12 
13 #ifndef __PRM_Type__
14 #define __PRM_Type__
15 
16 #include <SYS/SYS_Types.h>
17 #include <UT/UT_NTStreamUtil.h>
18 #include <UT/UT_Spline.h>
19 #include <iosfwd>
20 #include "PRM_API.h"
21 #include "PRM_Callback.h"
22 
23 class PRM_SpareData;
24 
26 {
27 public:
28  // These are the basic types of parameters supported.
29  // NB: These options are mutually exclusive!
31  PRM_BASIC_NONE = 0x00000000,
32  PRM_BASIC_ORDINAL = 0x00000001,
33  PRM_BASIC_FLOAT = 0x00000002,
34  PRM_BASIC_STRING = 0x00000004,
35  PRM_BASIC_DATA = 0x00000008,
36  PRM_BASIC_MASK = 0x0000000F
37  };
38 
39  // These are extra bits of information associated with float parms.
41  PRM_FLOAT_NONE = 0x00000000,
42  // This says that even though it is stored as a floating point number,
43  // it is really an integer (eg Number of divisions)
44  PRM_FLOAT_INTEGER = 0x00000001,
45 
46  PRM_FLOAT_POLAR = 0x00000004, // PJ with no radius
47  PRM_FLOAT_POLARJACK = 0x00000008, // PJ with radius
48  PRM_FLOAT_ANGLEJACK = 0x00000010, // PJ with radius
49  PRM_FLOAT_SPINNER = 0x00000020,
50  PRM_FLOAT_RANGE = 0x00000080,
51  PRM_FLOAT_HUECIRCLE = 0x00000100,
52  PRM_FLOAT_GREYRANGE = 0x00000200,
53 
54  PRM_FLOAT_SLIDERFRAC = 0x00000800, // Slider with control over
55  // thumb control width. Needs a
56  // v[0]=value, v[1]=fraction
57  // v[2,3]=range
58 
59  PRM_FLOAT_MINMAX_R = 0x00002000, // Red
60  PRM_FLOAT_MINMAX_G = 0x00004000, // Green
61  PRM_FLOAT_MINMAX_B = 0x00008000, // Blue
62  PRM_FLOAT_MINMAX_A = 0x00010000, // Alpha
63  PRM_FLOAT_MINMAX_RGBA = 0x00020000, // RGBA
64  PRM_FLOAT_MINMAX_MASK = 0x0003E000,
65 
66  PRM_FLOAT_PALETTE = 0x00040000,
67  // PRM_FLOAT_RAMPEDIT is here for legacy purposes, use
68  // PRM_MULTITYPE_FLOAT_RGB or PRM_MULTITYPE_FLT
69  PRM_FLOAT_RAMPEDIT = 0x00080000,
70  PRM_FLOAT_RGBA = 0x00100000, // Includes alpha slider
71  // (should be in NAMERGB, but
72  // would break existing code).
73  PRM_FLOAT_LOGARITHMIC = 0x00200000, // Logaritmic slider
74  };
75 
76  // These are extra bits of information associated with ordinal parms.
78  PRM_ORD_NONE = 0x00000000,
79  PRM_ORD_TOGGLE = 0x00000001,
80  PRM_ORD_CALLBACK = 0x00000002,
81  PRM_ORD_SWITCHERLIST = 0x00000004,
82  PRM_ORD_RGBAMASK = 0x00000008,
83  PRM_ORD_BUTTONSTRIP = 0x00000010,
84  PRM_ORD_ICONSTRIP = 0x00000020,
85  };
86 
87  // These are extra bits of information associated with string parms.
89  PRM_STR_NONE = 0x00000000,
90  PRM_STR_CMD = 0x00000001,
91  PRM_STR_PATH = 0x00000002,
92  PRM_STR_ALPHA = 0x00000004,
93 
94  // special flags on type of interest for strings which are ops
95  PRM_STR_OP_REF_LIST = 0x00000008,
96  PRM_STR_OP_REF_NAME = 0x00000010,
97  PRM_STR_OP_REF_DATA = 0x00000020,
98  PRM_STR_OP_REF_PARM = 0x00000040,
99  PRM_STR_OP_REF_CHILD = 0x00000080,
100  PRM_STR_OP_REF_MASK = 0x000000F8,
101 
102  // This is used by PROP string parameters that don't want to be quoted
103  // when they are fetched as default parameter values.
104  PRM_STR_UNQUOTED = 0x00000100,
105  // This is used to specify a label type.
106  PRM_STR_LABEL = 0x00000200,
107  // This is a separator type.
108  PRM_STR_SEPARATOR = 0x00000400,
109  };
110 
111  // These are extra bits of information associated with data parms.
113  PRM_DATA_NONE = 0x00000000,
114  PRM_DATA_GEOMETRY = 0x00000001,
115  PRM_DATA_KEY_VALUE_DICT = 0x00000002,
116  PRM_DATA_GEODELTA = 0x00000004,
117  };
118 
119  // These are filters for path types.
120  // NB: These options are currently treated as mutually exclusive although
121  // in theory, we should add support to allow at least some of them to
122  // co-exist. eg. PRM_PATH_CMD | PRM_PATH_TXT.
124  PRM_PATH_NONE = 0x00000000,
125  PRM_PATH_PIC = 0x00000001,
126  PRM_PATH_GEO = 0x00000002,
127  PRM_PATH_RAMP = 0x00000004, // LEGACY
128  PRM_PATH_CAPT = 0x00000008,
129  PRM_PATH_CLIP = 0x00000010,
130  /* was PRM_PATH_HMV at 0x00000020 */
131  PRM_PATH_PAINT = 0x00000040,
132  PRM_PATH_LUT = 0x00000080,
133  PRM_PATH_CMDF = 0x00000100,
134  PRM_PATH_MIDI = 0x00000200,
135  PRM_PATH_TXT = 0x00000400,
136  PRM_PATH_I3D = 0x00000800,
137  PRM_PATH_CHAN = 0x00001000,
138  PRM_PATH_SIM = 0x00002000,
139  PRM_PATH_SIMDATA = 0x00004000,
140  PRM_PATH_ICON = 0X00008000,
141  PRM_PATH_DIRECTORY = 0X00010000,
142 
143  PRM_PATH_MASK = 0x0001FFFF
144  };
145 
146  // These specify the use to which the values are put.
147  // This helps with creating the UI for the parameters, and more
148  // importantly, provides a means for naming the english-labels and
149  // channel-labels. If none of these are set, then they are named with
150  // numbers.
151  // NB: These options are mutually exclusive!
153  PRM_CHAN_NONE = 0x00000000,
154  PRM_CHAN_NAMEXYZW = 0x00000001,
155  PRM_CHAN_NAMEUVW = 0x00000002,
156  PRM_CHAN_NAMERGB = 0x00000004,
157  PRM_CHAN_NAMEBEGINEND = 0x00000008,
158  PRM_CHAN_NAMEMAXMIN = 0x00000010,
159  PRM_CHAN_NAMEMINMAX = 0x00000020,
160  PRM_CHAN_NAMESTARTEND = 0x00000040,
161  PRM_CHAN_NAMEXYWH = 0x00000080,
162  PRM_CHAN_MASK = 0x000000FF
163  };
164 
165  // These specify UI options that can be combined with any other type.
167  PRM_INTERFACE_NONE = 0x00000000,
168  // The following tells PSI to produce no user interface
169  PRM_INTERFACE_INVISIBLE = 0x00000001,
170  // This is a flag to indicate whether parameters in a group are
171  // exclusive. Used by a switcher, for example, to show radio buttons.
172  // instead of regular tabs.
173  PRM_INTERFACE_EXCLUSIVE = 0x00000002,
174  // Join to the next parameter, so that both are on the same line
175  PRM_INTERFACE_JOIN_NEXT = 0x00000004,
176  // Don't display a label on the parm.
177  PRM_INTERFACE_LABEL_NONE= 0x00000008,
178  // Display only the numerical text field without the slider.
179  PRM_INTERFACE_PLAIN = 0x00000010,
180  // The parameter is animatable.
181  PRM_INTERFACE_CHANNEL = 0x00000020,
182  // Overrides PRM_TypeExtended to PRM_TYPE_TOGGLE_JOIN
183  PRM_INTERFACE_JOIN_EXT = 0x00000040,
184  };
185 
186  // These specify behavioral options that can be combined with any other
187  // type.
189  PRM_BEHAVIOR_NONE = 0x00000000,
190  // This is a common flag for all parameters. It says that we don't
191  // want a change in the parameter to cause a UI refresh. This is the
192  // same as NOCOOK except that changing the value for this parameter
193  // will also NOT save undos.
194  PRM_BEHAVIOR_NOREFRESH = 0x00000001,
195  // This flag is similar to NOREFRESH, but is used specifically by
196  // DOPs. This flag is added to all guide geometry parameters and
197  // script operator parameters to prevent such parameters from
198  // flagging the simulation as dirty when they change. NOREFRESH
199  // is not appropriate here because that flag has other effects
200  // (like preventing parm change undos from working). NORECOOK is also
201  // not appropriate since those parameters still need the DOP to "cook"
202  // in order for the viewer to upate.
203  PRM_BEHAVIOR_NORESIM = 0x00000002,
204  // This flag is used to indicate that the node owning this parm is not
205  // dependent on this parm's value.
206  PRM_BEHAVIOR_NOCOOK = 0x00000004,
207  // This flag indicates that this parameter isn't meant to be used as
208  // a real parameter at all. It is just a place holder used by the
209  // parm layout code.
210  PRM_BEHAVIOR_BASEPARM = 0x00000008
211  };
212 
213 
214  PRM_Type();
215  PRM_Type(const PRM_Type &t);
216  PRM_Type(const PRM_BasicType &bt);
217  PRM_Type(const PRM_FloatType &at);
218  PRM_Type(const PRM_OrdinalType &ot);
219  PRM_Type(const PRM_StringType &st);
220  PRM_Type(const PRM_DataType &st);
221  PRM_Type(const PRM_PathType &pt);
222  PRM_Type(const PRM_ChannelType &ct);
223  PRM_Type(const PRM_InterfaceType &it);
224  PRM_Type(const PRM_BehaviorType &vt);
225  PRM_Type(const PRM_BasicType &bt,
226  const PRM_FloatType &at,
227  const PRM_OrdinalType &ot,
228  const PRM_StringType &st,
229  const PRM_DataType &dt,
230  const PRM_PathType &pt,
231  const PRM_ChannelType &ct,
232  const PRM_InterfaceType &it,
233  const PRM_BehaviorType &vt);
235  {
236  }
237 
238  void init();
239 
240  void saveBinary(std::ostream &os) const;
241  void saveASCII(std::ostream &os) const;
242  bool loadBinary(UT_IStream &is);
243 
244  void invert();
245  void stripUiType();
246 
247  const PRM_Type &operator=(const PRM_Type &t);
248  bool operator==(const PRM_Type &t) const;
249  bool operator!=(const PRM_Type &t) const;
250  void operator|=(const PRM_Type &t);
251  void operator&=(const PRM_Type &t);
252 
253  // this is often used in situations like: (getType() & has_this_type)
254  operator bool() const;
255 
256  // use these for more efficient checking of types
257  bool isBasicType(const PRM_BasicType &t) const;
258  bool isChannelType(const PRM_ChannelType &t) const;
259  bool hasFloatType(const PRM_FloatType &mask) const;
260  bool hasOrdinalType(const PRM_OrdinalType &mask) const;
261  bool hasStringType(const PRM_StringType &mask) const;
262  bool hasDataType(const PRM_DataType &mask) const;
263  bool hasPathType(const PRM_PathType &mask) const;
264  bool hasInterfaceType(const PRM_InterfaceType &mask) const;
265  bool hasBehaviorType(const PRM_BehaviorType &mask) const;
266 
267  // commonly accessed flags
268  bool isOrdinalType() const
269  { return isBasicType(PRM_BASIC_ORDINAL); }
270  bool isFloatType() const
271  { return isBasicType(PRM_BASIC_FLOAT); }
272  bool isStringType() const
273  { return isBasicType(PRM_BASIC_STRING); }
274  bool isDataType() const
275  { return isBasicType(PRM_BASIC_DATA); }
276  bool isVisible() const
277  { return !hasInterfaceType(PRM_INTERFACE_INVISIBLE); }
278  bool isAnimatible() const
279  { return hasInterfaceType(PRM_INTERFACE_CHANNEL); }
280  bool isSwitcher() const
281  {
282  return isOrdinalType()
283  && hasOrdinalType(PRM_OrdinalType(
284  PRM_ORD_SWITCHERLIST));
285  }
286  bool isCookable() const
287  {
288  return !hasBehaviorType(
290  PRM_BEHAVIOR_NOREFRESH
291  |PRM_BEHAVIOR_NOCOOK));
292 
293  }
294 
295  // accessors
296  const PRM_BasicType &getBasicType() const;
297  const PRM_FloatType &getFloatType() const;
298  const PRM_OrdinalType &getOrdinalType() const;
299  const PRM_StringType &getStringType() const;
300  const PRM_DataType &getDataType() const;
301  const PRM_PathType &getPathType() const;
302  const PRM_ChannelType &getChannelType() const;
303  const PRM_InterfaceType &getInterfaceType() const;
304  const PRM_BehaviorType &getBehaviorType() const;
305 
306 private:
307  friend const PRM_Type operator|(const PRM_Type &t1, const PRM_Type &t2);
308  friend const PRM_Type operator&(const PRM_Type &t1, const PRM_Type &t2);
309  friend const PRM_Type operator~(const PRM_Type &t1);
310  friend const PRM_Type PRM_STRIP_UI_TYPE(const PRM_Type &t1);
311 
312 private:
313  PRM_BasicType myBasicType;
314  PRM_FloatType myFloatType;
315  PRM_OrdinalType myOrdinalType;
316  PRM_StringType myStringType;
317  PRM_DataType myDataType;
318  PRM_PathType myPathType;
319  PRM_ChannelType myChannelType;
320  PRM_InterfaceType myInterfaceType;
321  PRM_BehaviorType myBehaviorType;
322 };
323 
324 // Binary Operations on PRM_Type
325 inline const PRM_Type operator|(const PRM_Type &t1, const PRM_Type &t2);
326 inline const PRM_Type operator&(const PRM_Type &t1, const PRM_Type &t2);
327 inline const PRM_Type operator~(const PRM_Type &t1);
328 inline const PRM_Type PRM_STRIP_UI_TYPE(const PRM_Type &t1);
329 
330 
331 // These values all correspond to a single bit from the various
332 // enumerated types above. These single-bit values can be combined
333 // to build more complex parm types.
334 PRM_API extern const PRM_Type PRM_TYPE_ZERO;
335 PRM_API extern const PRM_Type PRM_TYPE_ORDINAL;
336 PRM_API extern const PRM_Type PRM_TYPE_FLOAT;
337 PRM_API extern const PRM_Type PRM_TYPE_STRING;
338 PRM_API extern const PRM_Type PRM_TYPE_DATA;
339 PRM_API extern const PRM_Type PRM_TYPE_GEOMETRY;
341 PRM_API extern const PRM_Type PRM_TYPE_GEODELTA;
343 PRM_API extern const PRM_Type PRM_TYPE_PALETTE;
344 PRM_API extern const PRM_Type PRM_TYPE_INTEGER;
345 PRM_API extern const PRM_Type PRM_TYPE_CHANNEL;
346 PRM_API extern const PRM_Type PRM_TYPE_POLAR;
347 PRM_API extern const PRM_Type PRM_TYPE_POLARJACK;
348 PRM_API extern const PRM_Type PRM_TYPE_ANGLEJACK;
349 PRM_API extern const PRM_Type PRM_TYPE_SPINNER;
350 PRM_API extern const PRM_Type PRM_TYPE_RANGE;
351 PRM_API extern const PRM_Type PRM_TYPE_HUECIRCLE;
352 PRM_API extern const PRM_Type PRM_TYPE_GREYRANGE;
355 PRM_API extern const PRM_Type PRM_TYPE_MINMAX_R;
356 PRM_API extern const PRM_Type PRM_TYPE_MINMAX_G;
357 PRM_API extern const PRM_Type PRM_TYPE_MINMAX_B;
358 PRM_API extern const PRM_Type PRM_TYPE_MINMAX_A;
360 PRM_API extern const PRM_Type PRM_TYPE_RAMPEDIT; // LEGACY
361 PRM_API extern const PRM_Type PRM_TYPE_RGBA;
363 PRM_API extern const PRM_Type PRM_TYPE_TOGGLE;
364 PRM_API extern const PRM_Type PRM_TYPE_CALLBACK;
366 PRM_API extern const PRM_Type PRM_TYPE_RGBAMASK;
368 PRM_API extern const PRM_Type PRM_TYPE_ICONSTRIP;
369 PRM_API extern const PRM_Type PRM_TYPE_CMD;
370 PRM_API extern const PRM_Type PRM_TYPE_PATH;
371 PRM_API extern const PRM_Type PRM_TYPE_ALPHA;
378 PRM_API extern const PRM_Type PRM_TYPE_UNQUOTED;
379 PRM_API extern const PRM_Type PRM_TYPE_LABEL;
380 PRM_API extern const PRM_Type PRM_TYPE_SEPARATOR;
381 PRM_API extern const PRM_Type PRM_TYPE_PIC;
382 PRM_API extern const PRM_Type PRM_TYPE_GEO;
383 PRM_API extern const PRM_Type PRM_TYPE_RAMP; // LEGACY
384 PRM_API extern const PRM_Type PRM_TYPE_CAPT;
385 PRM_API extern const PRM_Type PRM_TYPE_CLIP;
386 PRM_API extern const PRM_Type PRM_TYPE_PAINT;
387 PRM_API extern const PRM_Type PRM_TYPE_LUT;
388 PRM_API extern const PRM_Type PRM_TYPE_CMDF;
389 PRM_API extern const PRM_Type PRM_TYPE_MIDI;
390 PRM_API extern const PRM_Type PRM_TYPE_TXT;
391 PRM_API extern const PRM_Type PRM_TYPE_I3D;
392 PRM_API extern const PRM_Type PRM_TYPE_CHAN;
393 PRM_API extern const PRM_Type PRM_TYPE_SIM;
394 PRM_API extern const PRM_Type PRM_TYPE_SIMDATA;
395 PRM_API extern const PRM_Type PRM_TYPE_DIRECTORY;
396 PRM_API extern const PRM_Type PRM_TYPE_FILTERS;
397 PRM_API extern const PRM_Type PRM_TYPE_NAMEXYZW;
398 PRM_API extern const PRM_Type PRM_TYPE_NAMEUVW;
399 PRM_API extern const PRM_Type PRM_TYPE_NAMERGB;
404 PRM_API extern const PRM_Type PRM_TYPE_NAMEXYWH;
405 PRM_API extern const PRM_Type PRM_TYPE_NAME;
406 PRM_API extern const PRM_Type PRM_TYPE_NOREFRESH;
407 PRM_API extern const PRM_Type PRM_TYPE_NORESIM;
408 PRM_API extern const PRM_Type PRM_TYPE_NOCOOK;
409 PRM_API extern const PRM_Type PRM_TYPE_INVISIBLE;
410 PRM_API extern const PRM_Type PRM_TYPE_EXCLUSIVE;
411 PRM_API extern const PRM_Type PRM_TYPE_JOIN_NEXT;
413 PRM_API extern const PRM_Type PRM_TYPE_PLAIN;
414 PRM_API extern const PRM_Type PRM_TYPE_BASEPARM;
415 
416 /// This type enum defines the different types of multi (dynamic) parameters.
418 {
419  PRM_MULTITYPE_LIST = 0x00000000, /// Normal list (WARNING: 0!)
420  PRM_MULTITYPE_SCROLL = 0x00000001, /// Put inside a scrollable area
421  PRM_MULTITYPE_SWITCHER = 0x00000002, /// Each instance is a tab
422  PRM_MULTITYPE_NONE = 0x00000004, /// Since "list" is already 0
423 
424  PRM_MULTITYPE_RAMP_FLT = 0x00000008, /// Float ramp type
425  PRM_MULTITYPE_RAMP_RGB = 0x00000010, /// RGB ramp type
426  PRM_MULTITYPE_RAMP_MASK = 0x00000018, /// Mask for testing ramp
427 
428  PRM_MULTITYPE_TYPEMASK = 0x0FFFFFFF, /// Mask for excluding modifiers
429 
430  // modifier flags
431  PRM_MULTITYPE_NO_CONTROL_UI = 0x10000000 /// Prohibit UI for add/remove
432 };
433 
439 };
440 
451 };
452 PRM_API UT_SPLINE_BASIS PRMgetRampBasis(int ramp_interp);
454 
457 
458 class PRM_ChoiceList;
460 
461 // Templates correspond to PRM_MULTITYPE_RAMP_*. It must be here due to
462 // static initialization issues.
463 class PRM_Template;
465  const char *parent_token,
466  PRM_MultiType multi_type,
467  const PRM_SpareData *parent_spare,
468  PRM_Callback callback,
469  PRM_Template *copy_templates);
471  PRM_Template *templates);
472 // NOTE: Always includes the space of the PRM_Template objects
474  PRM_Template *templates);
475 
476 // Parm indices for the template retrieved from PRMcreateRampTemplate()
477 // NOTE: The order of this enum must correspond to PRMcreateRampTemplate()!
479 {
483  PRM_RAMP_NUM_PARMS // sentinel
484 };
485 
486 // Get the token names corresponding to the given parent token
487 PRM_API void PRMgetRampChannelToken(const char *parent_token,
488  PRM_MultiType multi_type,
490  int sub_idx,
491  UT_String &token);
494 
495 // If the parent token for a ramp parm ends in a '#' or digit, then we add
496 // an underscore to ensure that we don't end up with ambiguous situations.
497 // Use the following function if you need to get the proper prefix with the
498 // underscore added.
499 // WARNING: The resulting prefix is NOT hardened if an underscore was not added
500 PRM_API void PRMgetRampParmPrefix(const char *parent_token, UT_String &prefix);
501 
502 //
503 // Try not to use bit's and bit masks in this new type. It's caused
504 // lot's of hassles with the old type. If you need to add options to
505 // a parm or a template then add more member data for storing the options
506 // or add more types to this new enum.
507 //
509 {
511  PRM_TYPE_TOGGLE_JOIN, // Enable toggle joined with next parameter.
512  PRM_TYPE_JOIN_PAIR, // Parm joined with next parm.
513  PRM_TYPE_VEC_SWITCHER, // Component/Vector switcher (POPs)
514  PRM_TYPE_NO_LABEL, // Usually for menus: leave the label off.
515  PRM_TYPE_MINI_MENU, // For ones like the resolution menu.
516  PRM_TYPE_JUMP_REFERENCE, // Network and node reference
517  PRM_TYPE_NET_REFERENCE, // Network only reference (e.g. material)
518  PRM_TYPE_WIDE_STRING, // For path fields (e.g. file OPs)
519  PRM_TYPE_COP_CHROMAKEY, // Special hook for color picker
520  PRM_TYPE_COP_VIDEOKEY, // Special hook for color picker
521  PRM_TYPE_COP_TEXMAP, // Special hook for corner mapper
522  PRM_TYPE_COP_CORNERPIN, // Special hook for corner mapper
523  PRM_TYPE_COP_CROP, // Special hook for corner mapper
524  PRM_TYPE_COP_SCALE, // Special hook for pixel values
525  PRM_TYPE_COP_SEQUENCE, // Special hook for sequence cop
526  PRM_TYPE_SHOP_PATH, // Special hook for SHOP paths
527  PRM_TYPE_DYNAMIC_PATH, // Special hook for dynamic path
528  PRM_TYPE_DYNAMIC_PATH_LIST, // Special hook for dynamic path lists
529  PRM_TYPE_UNUSED_1, // (was: log sliders, use PRM_FLT_LOG instead)
530  PRM_TYPE_FULL_JUMP_REFERENCE, // Full operator path reference
531  PRM_TYPE_MATRIX_ROW, // Ensure that the fields are all on one row
532  PRM_TYPE_IMAGE_FORMAT_1, // First part of an format/options pair
533  PRM_TYPE_IMAGE_FORMAT_2, // Second part of an format/options pair
534  PRM_TYPE_MENU_JOIN, // A menu joined with the next parameter
535  PRM_TYPE_IMAGE_OPTIONS, // Used w/PRM_TYPE_PIC: read format options
536  PRM_TYPE_IMAGE_RGBA_OPTIONS // Used w/PRM_TYPE_PIC: read options for RGBA
537 
538  // Instead of adding a new entry to this enum, please consider using
539  // PRM_SpareData instead (especially for non-ui options). There are a few
540  // advantages: several options can be used at the same time, the dialog
541  // scripts don't support this enum but they do support spare data,
542  // PI_EditScriptedParms inherits spare data when promoting the parameter,
543  // and an easier integration into OPUI_EditParms.
544 };
545 
546 //
547 // The PRM_TYPE_IMAGE_FORMAT template should look like this:
548 // PRM_Template(PRM_TYPE_PICFILE, ... 1, ..., callback1),
549 // PRM_Template(PRM_TYPE_STRING, PRM_TYPE_IMAGE_FORMAT_2, 1,
550 // PRM_ChoiceList(PRMbuildImageDeviceMenu), ... callback2),
551 // PRM_Template(PRM_TYPE_STRING, PRM_TYPE_IMAGE_FORMAT_3, 2, ...)
552 //
553 // Please see PRM_SharedFunc.h for more information.
554 //
555 
556 // Some common parm types:
557 
558 // The terminator for a parm list. Just a zero value.
560 // A switcher to create multiple parm pages. Uses tabs to switch pages.
561 PRM_API extern const PRM_Type PRM_SWITCHER;
562 // A switcher to create multiple parm pages. Uses radio buttons to switch pages.
564 // A switcher to create multiple parm pages. Recooks the node when changed.
566 // A non-animatable float value.
567 PRM_API extern const PRM_Type PRM_FLT_E;
568 // A float value which can be animated.
569 PRM_API extern const PRM_Type PRM_FLT;
570 PRM_API extern const PRM_Type PRM_FLT_J;
571 
572 // A float value which is represented logarithmically.
573 PRM_API extern const PRM_Type PRM_FLT_LOG_E;
574 // A float value which is represented logarithmically which can be animated
575 PRM_API extern const PRM_Type PRM_FLT_LOG;
576 // A non-animatable float triple with xyz channels.
577 PRM_API extern const PRM_Type PRM_XYZ_E;
578 // A float triple with xyz channel names which can be animated.
579 PRM_API extern const PRM_Type PRM_XYZ;
580 PRM_API extern const PRM_Type PRM_XYZ_J;
581 // A non-animatable float triple with uvw channels.
582 PRM_API extern const PRM_Type PRM_UVW_E;
583 // A float triple with uvw channel names which can be animated.
584 PRM_API extern const PRM_Type PRM_UVW;
585 PRM_API extern const PRM_Type PRM_UVW_J;
586 // A non-animatable float triple with rgb channels.
587 PRM_API extern const PRM_Type PRM_RGB_E;
588 // A float triple with rgb channel names which can be animated.
589 PRM_API extern const PRM_Type PRM_RGB;
590 PRM_API extern const PRM_Type PRM_RGB_J;
591 // A non-animatable float quad with rgba channels.
592 PRM_API extern const PRM_Type PRM_RGBA_E;
593 // A float quad with rgba channel names which can be animated.
594 PRM_API extern const PRM_Type PRM_RGBA;
595 PRM_API extern const PRM_Type PRM_RGBA_J;
596 // A non-animatable float quad with begin/end channels.
597 PRM_API extern const PRM_Type PRM_BEGINEND_E;
598 // A float quad with begin/end channel names which can be animated.
599 PRM_API extern const PRM_Type PRM_BEGINEND;
600 PRM_API extern const PRM_Type PRM_BEGINEND_J;
601 // A non-animatable float pair with start/end channel names.
602 PRM_API extern const PRM_Type PRM_STARTEND_E;
603 // A float pair with start/end channel names which can be animated.
604 PRM_API extern const PRM_Type PRM_STARTEND;
605 PRM_API extern const PRM_Type PRM_STARTEND_J;
606 // A non-animatable int value.
607 PRM_API extern const PRM_Type PRM_INT_E;
608 // An int value which can be animated.
609 PRM_API extern const PRM_Type PRM_INT;
610 
611 // A non-animatable int value which is represented logarithmically.
612 PRM_API extern const PRM_Type PRM_INT_LOG_E;
613 // An int value which is represented logarithmically and can be animated.
614 PRM_API extern const PRM_Type PRM_INT_LOG;
615 
616 
617 PRM_API extern const PRM_Type PRM_INT_J;
618 // A non-animatable int triple with xyz channel names.
619 PRM_API extern const PRM_Type PRM_INT_XYZ_E;
620 // An int triple with xyz channel names which can be animated.
621 PRM_API extern const PRM_Type PRM_INT_XYZ;
622 PRM_API extern const PRM_Type PRM_INT_XYZ_J;
623 // A non-animatable float pair with min/max channels.
624 PRM_API extern const PRM_Type PRM_FLT_MINMAX_E;
625 // A float pair with min/max channel names which can be animated.
626 PRM_API extern const PRM_Type PRM_FLT_MINMAX;
627 PRM_API extern const PRM_Type PRM_FLT_MINMAX_J;
628 // A non-animatable int pair with min/max channels.
629 PRM_API extern const PRM_Type PRM_INT_MINMAX_E;
630 // An int pair with min/max channel names which can be animated.
631 PRM_API extern const PRM_Type PRM_INT_MINMAX;
632 PRM_API extern const PRM_Type PRM_INT_MINMAX_J;
633 // A non-animatable int pair with start/end channels.
634 PRM_API extern const PRM_Type PRM_INT_STARTEND_E;
635 // An int pair with start/end channel names which can be animated.
636 PRM_API extern const PRM_Type PRM_INT_STARTEND;
637 PRM_API extern const PRM_Type PRM_INT_STARTEND_J;
638 // A ramp editor, which uses a non-animatable float parameter. (LEGACY)
639 PRM_API extern const PRM_Type PRM_FLT_RAMPEDIT;
640 // A check box.
641 PRM_API extern const PRM_Type PRM_TOGGLE_E;
642 // A check box which can be animated.
643 PRM_API extern const PRM_Type PRM_TOGGLE;
644 PRM_API extern const PRM_Type PRM_TOGGLE_J;
645 // A string that contains an hscript or unix command.
646 PRM_API extern const PRM_Type PRM_COMMAND;
647 // A string that points to any file.
648 PRM_API extern const PRM_Type PRM_FILE_E;
649 // A string that points to any file which can be animated.
650 PRM_API extern const PRM_Type PRM_FILE;
651 // A string that points to an image file.
652 PRM_API extern const PRM_Type PRM_PICFILE_E;
653 // A string that points to an image file which can be animated.
654 PRM_API extern const PRM_Type PRM_PICFILE;
655 // A string that points to a geometry file.
656 PRM_API extern const PRM_Type PRM_GEOFILE_E;
657 // A string that points to a geometry file which can be animated.
658 PRM_API extern const PRM_Type PRM_GEOFILE;
659 // A string that points to a capture override file.
660 PRM_API extern const PRM_Type PRM_CAPTFILE_E;
661 // A string that points to a capture override file which can be animated.
662 PRM_API extern const PRM_Type PRM_CAPTFILE;
663 // A string that points to a ramp file. (LEGACY)
664 PRM_API extern const PRM_Type PRM_RAMPFILE_E;
665 // A string that points to a ramp file which can be animated. (LEGACY)
666 PRM_API extern const PRM_Type PRM_RAMPFILE;
667 // A string that points to a clip (channel) file.
668 PRM_API extern const PRM_Type PRM_CLIPFILE_E;
669 // A string that points to a clip (channel) file which can be animated.
670 PRM_API extern const PRM_Type PRM_CLIPFILE;
671 // A string that points to an image or ramp file.
672 PRM_API extern const PRM_Type PRM_PAINTFILE_E;
673 // A string that points to an image or ramp file which can be animated.
674 PRM_API extern const PRM_Type PRM_PAINTFILE;
675 // A string that points to a LUT file.
676 PRM_API extern const PRM_Type PRM_LUTFILE_E;
677 // A string that points to a LUT file which can be animated.
678 PRM_API extern const PRM_Type PRM_LUTFILE;
679 // A string that points to a script file.
680 PRM_API extern const PRM_Type PRM_CMDFILE_E;
681 // A string that points to a script file which can be animated.
682 PRM_API extern const PRM_Type PRM_CMDFILE;
683 // A string that points to a MIDI file.
684 PRM_API extern const PRM_Type PRM_MIDIFILE_E;
685 // A string that points to a MIDI file which can be animated.
686 PRM_API extern const PRM_Type PRM_MIDIFILE;
687 // A string that points to a text file.
688 PRM_API extern const PRM_Type PRM_TXTFILE_E;
689 // A string that points to a text file which can be animated.
690 PRM_API extern const PRM_Type PRM_TXTFILE;
691 // A string that points to an i3d file.
692 PRM_API extern const PRM_Type PRM_I3DFILE_E;
693 // A string that points to an i3d file which can be animated.
694 PRM_API extern const PRM_Type PRM_I3DFILE;
695 // A string that points to a channel file file.
696 PRM_API extern const PRM_Type PRM_CHANFILE_E;
697 // A string that points to a channel file file which can be animated.
698 PRM_API extern const PRM_Type PRM_CHANFILE;
699 // A string that points to a simulation file.
700 PRM_API extern const PRM_Type PRM_SIMFILE_E;
701 // A string that points to a simulation file which can be animated.
702 PRM_API extern const PRM_Type PRM_SIMFILE;
703 // A string that points to an icon file.
704 PRM_API extern const PRM_Type PRM_ICONFILE_E;
705 // A string that points to an icon file which can be animated.
706 PRM_API extern const PRM_Type PRM_ICONFILE;
707 // A string that points to a siulation data file.
708 PRM_API extern const PRM_Type PRM_SIMDATAFILE_E;
709 // A string that points to a siulation data file which can be animated.
710 PRM_API extern const PRM_Type PRM_SIMDATAFILE;
711 // A string that points to a directory.
712 PRM_API extern const PRM_Type PRM_DIRECTORY_E;
713 // A string that points to a directory which can be animated.
714 PRM_API extern const PRM_Type PRM_DIRECTORY;
715 // A non-animatable string parameter.
716 PRM_API extern const PRM_Type PRM_STRING_E;
717 // An animatable string parameter.
718 PRM_API extern const PRM_Type PRM_STRING;
719 // An alphanumeric string (for node, variable, or group names)
720 PRM_API extern const PRM_Type PRM_ALPHASTRING;
721 // A string containing a list of operator paths.
722 PRM_API extern const PRM_Type PRM_STRING_OPLIST;
723 // A string containing the name of a single operator.
724 PRM_API extern const PRM_Type PRM_STRING_OPREF;
725 // A string containing the name of a single operator that is our child.
727 // A data parameter.
728 PRM_API extern const PRM_Type PRM_DATA;
729 // A non-animatable ordinal type.
730 PRM_API extern const PRM_Type PRM_ORD_E;
731 // An ordinal type which can be animated.
732 PRM_API extern const PRM_Type PRM_ORD;
733 PRM_API extern const PRM_Type PRM_ORD_J;
734 // An animatable float with a polar UI.
735 PRM_API extern const PRM_Type PRM_POLAR;
736 // A non-animatable float with an angle UI.
737 PRM_API extern const PRM_Type PRM_ANGLE_E;
738 // An animatable float with an angle UI.
739 PRM_API extern const PRM_Type PRM_ANGLE;
740 PRM_API extern const PRM_Type PRM_ANGLE_J;
741 // A non-animatable float triple with angle UI and xyz channel names.
742 PRM_API extern const PRM_Type PRM_ANGLEXYZ_E;
743 // An animatable float triple with angle UI and xyz channel names.
744 PRM_API extern const PRM_Type PRM_ANGLEXYZ;
745 PRM_API extern const PRM_Type PRM_ANGLEXYZ_J;
746 // A non-animatable float pair with angle UI and min/max channel names.
747 PRM_API extern const PRM_Type PRM_ANGLE_MINMAX_E;
748 // An animatable float pair with angle UI and min/max channel names.
749 PRM_API extern const PRM_Type PRM_ANGLE_MINMAX;
750 PRM_API extern const PRM_Type PRM_ANGLE_MINMAX_J;
751 // An animatable float with a polar jack UI.
752 PRM_API extern const PRM_Type PRM_POLARJACK;
753 // An animatable int with up/down arrow buttons instead of a slider
754 PRM_API extern const PRM_Type PRM_INT_SPINNER;
755 // An animatable float with up/down arrow buttons instead of a slider
756 PRM_API extern const PRM_Type PRM_SPINNER;
757 
758 // An animatable float with a range UI.
759 PRM_API extern const PRM_Type PRM_RANGE;
760 // An animatable float with a hue circle UI.
761 PRM_API extern const PRM_Type PRM_HUECIRCLE;
762 // An animatable float with a palette UI.
763 PRM_API extern const PRM_Type PRM_PALETTE;
764 // An animatable float with a grey range UI.
765 PRM_API extern const PRM_Type PRM_GREYRANGE;
766 // An animatable float with polar UI and xyz channel names.
767 PRM_API extern const PRM_Type PRM_DIRECTION;
768 // Like PRM_DIRECTION, but not animatable.
769 PRM_API extern const PRM_Type PRM_DIRECTION_E;
770 PRM_API extern const PRM_Type PRM_DIRECTION_NOJ;
771 // A button which triggers a callback.
772 PRM_API extern const PRM_Type PRM_CALLBACK;
773 // A button which triggers a callback but does not recook the node,
774 // create undos, nor cause the hip file to be modified.
776 // An ordinal parameter for masking R/G/B/A image channels.
777 PRM_API extern const PRM_Type PRM_RGBAMASK;
778 // A text buttonstrip for doing general masking up to 32 bits (using a menu)
779 PRM_API extern const PRM_Type PRM_BUTTONSTRIP;
780 // An icon buttonstrip for doing general masking up to 32 bits (using a menu)
781 PRM_API extern const PRM_Type PRM_ICONSTRIP;
782 // An animatable float pair with min/max channel names for the R component.
783 PRM_API extern const PRM_Type PRM_MINMAX_R;
784 // An animatable float pair with min/max channel names for the G component.
785 PRM_API extern const PRM_Type PRM_MINMAX_G;
786 // An animatable float pair with min/max channel names for the B component.
787 PRM_API extern const PRM_Type PRM_MINMAX_B;
788 // An animatable float pair with min/max channel names for the A component.
789 PRM_API extern const PRM_Type PRM_MINMAX_A;
790 // An animatable float pair with min/max channel names for all RGBA components.
791 PRM_API extern const PRM_Type PRM_MINMAX_RGBA;
792 // A label (for dialog appearance only).
793 PRM_API extern const PRM_Type PRM_LABEL;
794 // A separator (for dialog appearance only).
795 PRM_API extern const PRM_Type PRM_SEPARATOR;
796 // A geometry data object.
797 PRM_API extern const PRM_Type PRM_GEOMETRY;
798 // A key-value dictionary (keys are strings, values are strings).
799 PRM_API extern const PRM_Type PRM_KEY_VALUE_DICT;
800 // A Geometry Delta.
801 PRM_API extern const PRM_Type PRM_GEODELTA;
802 // A combination label and separator.
803 PRM_API extern const PRM_Type PRM_HEADING;
804 // A checkbox parameter joined to the next parameter.
805 PRM_API extern const PRM_Type PRM_JOINED_TOGGLE;
806 
807 // explaining PRM_SWITCHER:
808 // This is for switcher groups in PSI. The size and name of each group
809 // is in the defaults list. the parameters which follow will be used
810 // to make the switcher groups.
811 //
812 // eg:
813 // PRM_Default d[] =
814 // {
815 // PRM_Default(3, "label 1"),
816 // PRM_Default(1, "label 2")
817 // };
818 //
819 // PRM_Template t[] =
820 // {
821 // // 2 means there will be two groups
822 // PRM_Template(PRM_SWITCHER, 2, &somename, d),
823 // PRM_Template(PRM_XYZ, 1, &somename), // These three will
824 // PRM_Template(PRM_XYZ, 1, &somename), // be in the first
825 // PRM_Template(PRM_XYZ, 1, &somename), // group named "label 1"
826 //
827 // PRM_Template(PRM_XYZ, 1, &somename), // This will be
828 // // in the second group named "label 2"
829 //
830 // PRM_Template(PRM_XYZ, 1, &somename),
831 // // and this is outside the switcher
832 // };
833 
834 
835 
836 
837 // PRM_SWITCHER int, named 123, ( see example above )
838 // PRM_FLT_E float, named 123
839 // PRM_FLT float, named 123, jive-menu
840 // PRM_XYZ_E float, named xyz
841 // PRM_XYZ float, named xyz, jive-menu
842 // PRM_UVW_E float, named uvw
843 // PRM_UVW float, named uvw, jive-menu
844 // PRM_DIR float, namex xyz, jive-menu, polarjack
845 // PRM_BEGINEND_E float, named begin/end
846 // PRM_BEGINEND float, named begin/end, jive-menu
847 // PRM_ANGLE float, named begin/end, jive-menu, anglejacks
848 // PRM_INT_E int, named 123
849 // PRM_INT int, named 123, jive-menu
850 // PRM_INT_XYZ_E int, named xyz
851 // PRM_INT_XYZ int, named xyz, jive-menu
852 // PRM_FLT_MINMAX float, named min/max, jive-menu
853 // PRM_INT_MINMAX int, named min/max, jive-menu
854 // PRM_TOGGLE ord, toggle
855 // PRM_ORD ord
856 // PRM_CALLBACK ord, callback (either a button or a menu)
857 // PRM_STRING string
858 // PRM_FILE string, file-prompter
859 // Feel free to | these three:
860 // PRM_PICFILE string, file-prompter with a pic filter
861 // PRM_GEOFILE string, file-prompter with a geo filter
862 // PRM_RAMPFILE string, file-prompter with a ramp filter (LEGACY)
863 // PRM_DATA data
864 
865 //////////////////////////////////////////////////////////////////////////////
866 
867 inline void
869 {
870  myBasicType = PRM_BASIC_NONE;
871  myFloatType = PRM_FLOAT_NONE;
872  myOrdinalType = PRM_ORD_NONE;
873  myStringType = PRM_STR_NONE;
874  myDataType = PRM_DATA_NONE;
875  myPathType = PRM_PATH_NONE;
876  myChannelType = PRM_CHAN_NONE;
877  myInterfaceType = PRM_INTERFACE_NONE;
878  myBehaviorType = PRM_BEHAVIOR_NONE;
879 }
880 inline
882 {
883  init();
884 }
885 
886 inline
888 {
889  *this = t;
890 }
891 
892 inline
894 {
895  init();
896  myBasicType = bt;
897 }
898 
899 inline
901 {
902  init();
903  myFloatType = at;
904 }
905 
906 inline
908 {
909  init();
910  myOrdinalType = ot;
911 }
912 
913 inline
915 {
916  init();
917  myStringType = st;
918 }
919 
920 inline
922 {
923  init();
924  myDataType = dt;
925 }
926 
927 inline
929 {
930  init();
931  myPathType = pt;
932 }
933 
934 inline
936 {
937  init();
938  myChannelType = ct;
939 }
940 
941 inline
943 {
944  init();
945  myInterfaceType = it;
946 }
947 
948 inline
950 {
951  init();
952  myBehaviorType = vt;
953 }
954 
955 inline
957  const PRM_FloatType &at,
958  const PRM_OrdinalType &ot,
959  const PRM_StringType &st,
960  const PRM_DataType &dt,
961  const PRM_PathType &pt,
962  const PRM_ChannelType &ct,
963  const PRM_InterfaceType &it,
964  const PRM_BehaviorType &vt)
965  : myBasicType(bt),
966  myFloatType(at),
967  myOrdinalType(ot),
968  myStringType(st),
969  myDataType(dt),
970  myPathType(pt),
971  myChannelType(ct),
972  myInterfaceType(it),
973  myBehaviorType(vt)
974 {
975 }
976 
977 inline const PRM_Type &
979 {
980  myBasicType = t.myBasicType;
981  myFloatType = t.myFloatType;
982  myOrdinalType = t.myOrdinalType;
983  myStringType = t.myStringType;
984  myDataType = t.myDataType;
985  myPathType = t.myPathType;
986  myChannelType = t.myChannelType;
987  myInterfaceType = t.myInterfaceType;
988  myBehaviorType = t.myBehaviorType;
989 
990  return *this;
991 }
992 
993 inline bool
995 {
996  return (myBasicType == t.myBasicType &&
997  myFloatType == t.myFloatType &&
998  myOrdinalType == t.myOrdinalType &&
999  myStringType == t.myStringType &&
1000  myDataType == t.myDataType &&
1001  myPathType == t.myPathType &&
1002  myChannelType == t.myChannelType &&
1003  myInterfaceType == t.myInterfaceType &&
1004  myBehaviorType == t.myBehaviorType);
1005 }
1006 
1007 inline bool
1009 {
1010  return !(*this == t);
1011 }
1012 
1013 inline
1014 PRM_Type::operator bool() const
1015 {
1016  return (myBasicType != PRM_BASIC_NONE ||
1017  myFloatType != PRM_FLOAT_NONE ||
1018  myOrdinalType != PRM_ORD_NONE ||
1019  myStringType != PRM_STR_NONE ||
1020  myDataType != PRM_DATA_NONE ||
1021  myPathType != PRM_PATH_NONE ||
1022  myChannelType != PRM_CHAN_NONE ||
1023  myInterfaceType != PRM_INTERFACE_NONE ||
1024  myBehaviorType != PRM_BEHAVIOR_NONE);
1025 }
1026 
1027 inline void
1029 {
1030  myBasicType = PRM_BasicType(myBasicType | t.myBasicType);
1031  myFloatType = PRM_FloatType(myFloatType | t.myFloatType);
1032  myOrdinalType = PRM_OrdinalType(myOrdinalType | t.myOrdinalType);
1033  myStringType = PRM_StringType(myStringType | t.myStringType);
1034  myDataType = PRM_DataType(myDataType | t.myDataType);
1035  myPathType = PRM_PathType(myPathType | t.myPathType);
1036  myChannelType = PRM_ChannelType(myChannelType | t.myChannelType);
1037  myInterfaceType = PRM_InterfaceType(myInterfaceType | t.myInterfaceType);
1038  myBehaviorType = PRM_BehaviorType(myBehaviorType | t.myBehaviorType);
1039 }
1040 
1041 inline void
1043 {
1044  myBasicType = PRM_BasicType(myBasicType & t.myBasicType);
1045  myFloatType = PRM_FloatType(myFloatType & t.myFloatType);
1046  myOrdinalType = PRM_OrdinalType(myOrdinalType & t.myOrdinalType);
1047  myStringType = PRM_StringType(myStringType & t.myStringType);
1048  myDataType = PRM_DataType(myDataType & t.myDataType);
1049  myPathType = PRM_PathType(myPathType & t.myPathType);
1050  myChannelType = PRM_ChannelType(myChannelType & t.myChannelType);
1051  myInterfaceType = PRM_InterfaceType(myInterfaceType & t.myInterfaceType);
1052  myBehaviorType = PRM_BehaviorType(myBehaviorType & t.myBehaviorType);
1053 }
1054 
1055 inline void
1057 {
1058  myBasicType = PRM_BasicType(~myBasicType);
1059  myFloatType = PRM_FloatType(~myFloatType);
1060  myOrdinalType = PRM_OrdinalType(~myOrdinalType);
1061  myStringType = PRM_StringType(~myStringType);
1062  myDataType = PRM_DataType(~myDataType);
1063  myPathType = PRM_PathType(~myPathType);
1064  myChannelType = PRM_ChannelType(~myChannelType);
1065  myInterfaceType = PRM_InterfaceType(~myInterfaceType);
1066  myBehaviorType = PRM_BehaviorType(~myBehaviorType);
1067 }
1068 
1069 inline void
1071 {
1072  myInterfaceType = PRM_INTERFACE_NONE;
1073  myBehaviorType = PRM_BEHAVIOR_NONE;
1074 }
1075 
1076 inline bool
1078 {
1079  return (myBasicType == t);
1080 }
1081 
1082 inline bool
1084 {
1085  return (myChannelType == t);
1086 }
1087 
1088 inline bool
1090 {
1091  return ((myFloatType & mask) != 0);
1092 }
1093 
1094 inline bool
1096 {
1097  return ((myOrdinalType & mask) != 0);
1098 }
1099 
1100 inline bool
1102 {
1103  return ((myStringType & mask) != 0);
1104 }
1105 
1106 inline bool
1108 {
1109  return ((myDataType & mask) != 0);
1110 }
1111 
1112 inline bool
1114 {
1115  return ((myPathType & mask) != 0);
1116 }
1117 
1118 inline bool
1120 {
1121  return ((myInterfaceType & mask) != 0);
1122 }
1123 
1124 inline bool
1126 {
1127  return ((myBehaviorType & mask) != 0);
1128 }
1129 
1130 inline const PRM_Type::PRM_BasicType &
1132 {
1133  return myBasicType;
1134 }
1135 
1136 inline const PRM_Type::PRM_FloatType &
1138 {
1139  return myFloatType;
1140 }
1141 
1142 inline const PRM_Type::PRM_OrdinalType &
1144 {
1145  return myOrdinalType;
1146 }
1147 
1148 inline const PRM_Type::PRM_StringType &
1150 {
1151  return myStringType;
1152 }
1153 
1154 inline const PRM_Type::PRM_DataType &
1156 {
1157  return myDataType;
1158 }
1159 
1160 inline const PRM_Type::PRM_PathType &
1162 {
1163  return myPathType;
1164 }
1165 
1166 inline const PRM_Type::PRM_ChannelType &
1168 {
1169  return myChannelType;
1170 }
1171 
1172 inline const PRM_Type::PRM_InterfaceType &
1174 {
1175  return myInterfaceType;
1176 }
1177 
1178 inline const PRM_Type::PRM_BehaviorType &
1180 {
1181  return myBehaviorType;
1182 }
1183 
1184 inline const PRM_Type
1185 operator|(const PRM_Type &t1, const PRM_Type &t2)
1186 {
1187  return PRM_Type(
1188  PRM_Type::PRM_BasicType(t1.myBasicType | t2.myBasicType),
1189  PRM_Type::PRM_FloatType(t1.myFloatType | t2.myFloatType),
1190  PRM_Type::PRM_OrdinalType(t1.myOrdinalType | t2.myOrdinalType),
1191  PRM_Type::PRM_StringType(t1.myStringType | t2.myStringType),
1192  PRM_Type::PRM_DataType(t1.myDataType | t2.myDataType),
1193  PRM_Type::PRM_PathType(t1.myPathType | t2.myPathType),
1194  PRM_Type::PRM_ChannelType(t1.myChannelType | t2.myChannelType),
1195  PRM_Type::PRM_InterfaceType(t1.myInterfaceType | t2.myInterfaceType),
1196  PRM_Type::PRM_BehaviorType(t1.myBehaviorType | t2.myBehaviorType));
1197 }
1198 
1199 inline const PRM_Type
1200 operator&(const PRM_Type &t1, const PRM_Type &t2)
1201 {
1202  return PRM_Type(
1203  PRM_Type::PRM_BasicType(t1.myBasicType & t2.myBasicType),
1204  PRM_Type::PRM_FloatType(t1.myFloatType & t2.myFloatType),
1205  PRM_Type::PRM_OrdinalType(t1.myOrdinalType & t2.myOrdinalType),
1206  PRM_Type::PRM_StringType(t1.myStringType & t2.myStringType),
1207  PRM_Type::PRM_DataType(t1.myDataType & t2.myDataType),
1208  PRM_Type::PRM_PathType(t1.myPathType & t2.myPathType),
1209  PRM_Type::PRM_ChannelType(t1.myChannelType & t2.myChannelType),
1210  PRM_Type::PRM_InterfaceType(t1.myInterfaceType & t2.myInterfaceType),
1211  PRM_Type::PRM_BehaviorType(t1.myBehaviorType & t2.myBehaviorType));
1212 }
1213 
1214 inline const PRM_Type
1216 {
1217  return PRM_Type(
1218  PRM_Type::PRM_BasicType(~t1.myBasicType),
1219  PRM_Type::PRM_FloatType(~t1.myFloatType),
1220  PRM_Type::PRM_OrdinalType(~t1.myOrdinalType),
1221  PRM_Type::PRM_StringType(~t1.myStringType),
1222  PRM_Type::PRM_DataType(~t1.myDataType),
1223  PRM_Type::PRM_PathType(~t1.myPathType),
1224  PRM_Type::PRM_ChannelType(~t1.myChannelType),
1225  PRM_Type::PRM_InterfaceType(~t1.myInterfaceType),
1226  PRM_Type::PRM_BehaviorType(~t1.myBehaviorType));
1227 }
1228 
1229 inline const PRM_Type
1231 {
1232  return PRM_Type(t1.myBasicType,
1233  t1.myFloatType,
1234  t1.myOrdinalType,
1235  t1.myStringType,
1236  t1.myDataType,
1237  t1.myPathType,
1238  t1.myChannelType,
1241 }
1242 
1243 #endif
bool hasBehaviorType(const PRM_BehaviorType &mask) const
Definition: PRM_Type.h:1125
const PRM_StringType & getStringType() const
Definition: PRM_Type.h:1149
PRM_API const PRM_Type PRM_TYPE_POLAR
PRM_API PRM_RampInterpType PRMgetRampInterp(UT_SPLINE_BASIS basis)
PRM_API const PRM_Type PRM_ANGLE_MINMAX_J
PRM_API const PRM_Type PRM_TXTFILE
void stripUiType()
Definition: PRM_Type.h:1070
void invert()
Definition: PRM_Type.h:1056
PRM_API const PRM_Type PRM_TYPE_OP_REF_DATA
PRM_API const PRM_Type PRM_TYPE_NAMEXYWH
PRM_API const PRM_Type PRM_TYPE_MINMAX_A
PRM_API const PRM_Type PRM_INT_MINMAX_J
PRM_API const PRM_Type PRM_ANGLEXYZ_J
PRM_API const PRM_Type PRM_TYPE_NAMESTARTEND
PRM_API const PRM_Type PRM_PICFILE
PRM_API const PRM_Type PRM_SIMDATAFILE_E
PRM_API const PRM_Type PRM_LABEL
PRM_API const PRM_Type PRM_CALLBACK
PRM_API const PRM_Type PRM_TYPE_NOREFRESH
PRM_API const PRM_Type PRM_SPINNER
PRM_API const PRM_Type PRM_TYPE_LUT
PRM_API const PRM_Type PRM_TYPE_OP_REF_LIST
PRM_API const PRM_Type PRM_POLARJACK
PRM_API const PRM_Type PRM_FLT
PRM_API const PRM_Type PRM_TYPE_MINMAX_RGBA
PRM_API const PRM_Type PRM_INT_STARTEND_E
Put inside a scrollable area.
Definition: PRM_Type.h:421
PRM_API const PRM_Type PRM_HUECIRCLE
void operator|=(const PRM_Type &t)
Definition: PRM_Type.h:1028
PRM_API const PRM_Type PRM_ICONFILE_E
PRM_API const PRM_Type PRM_STARTEND_E
PRM_API const PRM_Type PRM_TYPE_RGBA
PRM_API const PRM_Type PRM_HEADING
PRM_API const PRM_Type PRM_ICONSTRIP
Since "list" is already 0.
Definition: PRM_Type.h:424
PRM_API const PRM_Type PRM_RAMPFILE
const PRM_Type operator~(const PRM_Type &t1)
Definition: PRM_Type.h:1215
PRM_API const PRM_Type PRM_STRING
PRM_API const PRM_Type PRM_TYPE_ANGLEJACK
PRM_API const PRM_Type PRM_FLT_LOG_E
PRM_API const PRM_Type PRM_MINMAX_RGBA
PRM_API const PRM_Type PRM_RGB
GLboolean invert
Definition: glcorearb.h:548
PRM_API PRM_Template * PRMcreateRampTemplate(const char *parent_token, PRM_MultiType multi_type, const PRM_SpareData *parent_spare, PRM_Callback callback, PRM_Template *copy_templates)
bool operator!=(const PRM_Type &t) const
Definition: PRM_Type.h:1008
PRM_API const PRM_Type PRM_STARTEND
PRM_API const PRM_Type PRM_ANGLE
PRM_API const PRM_Type PRM_MINMAX_R
PRM_API const PRM_Type PRM_TYPE_FILTERS
PRM_API const PRM_Type PRM_UVW
PRM_API const PRM_Type PRM_TYPE_PLAIN
const PRM_FloatType & getFloatType() const
Definition: PRM_Type.h:1137
PRM_API const PRM_Type PRM_SIMFILE_E
PRM_API const PRM_Type PRM_STRING_E
bool hasDataType(const PRM_DataType &mask) const
Definition: PRM_Type.h:1107
PRM_API int PRMgetRampChannelCount(PRM_MultiType multi_type, PRM_RampParmIndex i)
~PRM_Type()
Definition: PRM_Type.h:234
PRM_API const PRM_Type PRM_RAMPFILE_E
PRM_API const PRM_Type PRM_TYPE_CALLBACK
PRM_API const PRM_Type PRM_TYPE_TXT
PRM_API const PRM_Type PRM_ORD_J
PRM_API const PRM_Type PRM_GEOMETRY
PRM_RampParmIndex
Definition: PRM_Type.h:478
PRM_API const PRM_Type PRM_TYPE_UNQUOTED
PRM_API const PRM_Type PRM_ORD
PRM_API const PRM_Type PRM_RGBA_J
PRM_API const PRM_Type PRM_CAPTFILE_E
bool operator==(const PRM_Type &t) const
Definition: PRM_Type.h:994
GLint GLuint mask
Definition: glcorearb.h:123
PRM_API const PRM_Type PRM_TYPE_ICONSTRIP
PRM_API const PRM_Type PRM_INT_LOG_E
PRM_API const PRM_Type PRM_TYPE_EXCLUSIVE
PRM_API const PRM_Type PRM_TYPE_ALPHA
PRM_API const PRM_Type PRM_INT_MINMAX_E
PRM_API const PRM_Type PRM_TYPE_SPINNER
PRM_API const PRM_Type PRM_TYPE_NOCOOK
PRM_API const PRM_Type PRM_TYPE_GREYRANGE
PRM_API const PRM_Type PRM_INT_XYZ
PRM_API const PRM_Type PRM_XYZ_E
PRM_API const PRM_Type PRM_SIMFILE
PRM_API const PRM_Type PRM_FLT_MINMAX_E
PRM_API const PRM_Type PRM_CAPTFILE
PRM_API void PRMfreeRampTemplate(PRM_Template *templates)
PRM_API const PRM_Type PRM_TYPE_MINMAX_B
PRM_API const PRM_Type PRM_INT_MINMAX
PRM_API const PRM_Type PRM_DIRECTION_NOJ
PRM_API const PRM_Type PRM_TYPE_BASEPARM
PRM_API const PRM_Type PRM_SEPARATOR
PRM_API const PRM_Type PRM_I3DFILE
PRM_API const PRM_Type PRM_XYZ_J
UT_SPLINE_BASIS
Definition: UT_Spline.h:25
PRM_API const PRM_Type PRM_TYPE_MINMAX_R
PRM_API const PRM_Type PRM_GEOFILE_E
Each instance is a tab.
Definition: PRM_Type.h:422
void init()
Definition: PRM_Type.h:868
PRM_API const PRM_Type PRM_STRING_OPLIST
PRM_API const PRM_Type PRM_INT_J
bool hasStringType(const PRM_StringType &mask) const
Definition: PRM_Type.h:1101
PRM_API const char * PRMgetRampInterpToken(PRM_RampInterpType interp)
const PRM_BasicType & getBasicType() const
Definition: PRM_Type.h:1131
PRM_PathType
Definition: PRM_Type.h:123
png_uint_32 i
Definition: png.h:2877
PRM_API const PRM_Type PRM_TYPE_RAMPEDIT
PRM_API void PRMgetRampChannelToken(const char *parent_token, PRM_MultiType multi_type, PRM_RampParmIndex i, int sub_idx, UT_String &token)
PRM_API const PRM_Type PRM_SWITCHER_REFRESH
PRM_API const PRM_Type PRM_PALETTE
PRM_API const PRM_Type PRM_TYPE_POLARJACK
PRM_API const PRM_Type PRM_TYPE_TOGGLE
PRM_API const PRM_Type PRM_CLIPFILE_E
PRM_API const PRM_Type PRM_RGB_J
PRM_API const PRM_Type PRM_MINMAX_A
PRM_API const PRM_Type PRM_TYPE_SLIDERFRACTION
PRM_API const PRM_Type PRM_MIDIFILE
PRM_API const PRM_Type PRM_INT_LOG
PRM_API const PRM_Type PRM_TYPE_DATA
PRM_API const PRM_Type PRM_TYPE_NAMEMINMAX
PRM_API const PRM_Type PRM_TYPE_SEPARATOR
PRM_API const PRM_Type PRM_TYPE_NAMEMAXMIN
PRM_API const PRM_Type PRM_TYPE_NAMERGB
PRM_API const PRM_Type PRM_INT
PRM_API const PRM_Type PRM_FLT_RAMPEDIT
PRM_API const PRM_Type PRM_TYPE_NAME
PRM_API const PRM_Type PRM_TYPE_OP_REF_MASK
PRM_API const PRM_Type PRM_BEGINEND_E
RGB ramp type.
Definition: PRM_Type.h:426
PRM_API const PRM_Type PRM_PAINTFILE_E
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
PRM_API const PRM_Type PRM_TYPE_CHANNEL
long long int64
Definition: SYS_Types.h:100
PRM_API const PRM_Type PRM_CMDFILE
PRM_API const PRM_Type PRM_FLT_E
PRM_API const PRM_Type PRM_TYPE_STRING
PRM_API const PRM_Type PRM_LUTFILE_E
PRM_API const PRM_Type PRM_TYPE_FLOAT
PRM_API const PRM_Type PRM_TYPE_OP_REF_NAME
PRM_API const PRM_Type PRM_DIRECTION
bool isChannelType(const PRM_ChannelType &t) const
Definition: PRM_Type.h:1083
PRM_API UT_SPLINE_BASIS PRMgetRampBasis(int ramp_interp)
PRM_API PRM_ChoiceList * PRMgetRampInterpMenu()
PRM_API const PRM_Type PRM_TYPE_ZERO
bool isOrdinalType() const
Definition: PRM_Type.h:268
PRM_BehaviorType
Definition: PRM_Type.h:188
const PRM_Type operator&(const PRM_Type &t1, const PRM_Type &t2)
Definition: PRM_Type.h:1200
PRM_API const PRM_Type PRM_STRING_OPREF_CHILD
PRM_OrdinalType
Definition: PRM_Type.h:77
PRM_API const PRM_Type PRM_TYPE_CHAN
PRM_API const PRM_Type PRM_UVW_J
PRM_API const PRM_Type PRM_UVW_E
PRM_API const PRM_Type PRM_TOGGLE_E
PRM_API const PRM_Type PRM_RGBA
PRM_API PRM_RampInterpType PRMgetRampInterpType(const char *token)
bool hasFloatType(const PRM_FloatType &mask) const
Definition: PRM_Type.h:1089
PRM_API const PRM_Type PRM_ANGLE_J
PRM_API const PRM_Type PRM_TOGGLE_J
bool isStringType() const
Definition: PRM_Type.h:272
PRM_API const PRM_Type PRM_TYPE_MIDI
PRM_API const PRM_Type PRM_DATA
PRM_API const PRM_Type PRM_XYZ
PRM_API const PRM_Type PRM_ANGLEXYZ_E
PRM_API const PRM_Type PRM_FILE
PRM_API const PRM_Type PRM_TYPE_SIMDATA
const PRM_ChannelType & getChannelType() const
Definition: PRM_Type.h:1167
PRM_API const PRM_Type PRM_RGB_E
PRM_API const PRM_Type PRM_RGBA_E
PRM_API const PRM_Type PRM_DIRECTION_E
bool hasOrdinalType(const PRM_OrdinalType &mask) const
Definition: PRM_Type.h:1095
PRM_API const PRM_Type PRM_TYPE_RANGE
PRM_API const PRM_Type PRM_TYPE_INTEGER
PRM_API const PRM_Type PRM_TYPE_NORESIM
PRM_API const PRM_Type PRM_PAINTFILE
PRM_API const PRM_Type PRM_DIRECTORY_E
PRM_API const PRM_Type PRM_TYPE_PALETTE
bool hasInterfaceType(const PRM_InterfaceType &mask) const
Definition: PRM_Type.h:1119
PRM_API const PRM_Type PRM_TYPE_CLIP
PRM_API const PRM_Type PRM_STARTEND_J
PRM_API const PRM_Type PRM_TYPE_RAMP
PRM_API const PRM_Type PRM_SIMDATAFILE
PRM_API const PRM_Type PRM_INT_E
bool isBasicType(const PRM_BasicType &t) const
Definition: PRM_Type.h:1077
bool isDataType() const
Definition: PRM_Type.h:274
PRM_API const PRM_Type PRM_TYPE_CAPT
PRM_API const PRM_Type PRM_ICONFILE
const PRM_Type & operator=(const PRM_Type &t)
Definition: PRM_Type.h:978
PRM_API const PRM_Type PRM_RGBAMASK
const PRM_BehaviorType & getBehaviorType() const
Definition: PRM_Type.h:1179
PRM_API const PRM_Type PRM_TYPE_LABEL_NONE
void operator&=(const PRM_Type &t)
Definition: PRM_Type.h:1042
PRM_API const PRM_Type PRM_COMMAND
const PRM_InterfaceType & getInterfaceType() const
Definition: PRM_Type.h:1173
PRM_API const PRM_Type PRM_FLT_J
const PRM_Type PRM_STRIP_UI_TYPE(const PRM_Type &t1)
Definition: PRM_Type.h:1230
PRM_API const PRM_Type PRM_I3DFILE_E
PRM_API const PRM_Type PRM_ANGLE_MINMAX
PRM_API const PRM_Type PRM_SWITCHER
PRM_API const PRM_Type PRM_TYPE_NAMEUVW
PRM_API const PRM_Type PRM_FLT_MINMAX
PRM_API const PRM_Type PRM_TXTFILE_E
PRM_FloatType
Definition: PRM_Type.h:40
PRM_API const PRM_Type PRM_TYPE_SWITCHERLIST
PRM_API const PRM_Type PRM_ALPHASTRING
Normal list (WARNING: 0!)
Definition: PRM_Type.h:420
PRM_API const PRM_Type PRM_ANGLEXYZ
PRM_API const PRM_Type PRM_TYPE_I3D
PRM_API const PRM_Type PRM_TYPE_GEOMETRY
PRM_API const PRM_Type PRM_GEOFILE
Mask for excluding modifiers.
Definition: PRM_Type.h:431
PRM_API const PRM_Type PRM_GREYRANGE
PRM_API const PRM_Type PRM_LIST_TERMINATOR
PRM_StringType
Definition: PRM_Type.h:88
PRM_API const PRM_Type PRM_FLT_MINMAX_J
PRM_ColorType
Definition: PRM_Type.h:434
PRM_API const PRM_Type PRM_CMDFILE_E
PRM_API const PRM_Type PRM_GEODELTA
PRM_API const PRM_Type PRM_CALLBACK_NOREFRESH
const PRM_DataType & getDataType() const
Definition: PRM_Type.h:1155
PRM_API const PRM_Type PRM_TYPE_MINMAX_G
bool isAnimatible() const
Definition: PRM_Type.h:278
PRM_API const PRM_Type PRM_INT_SPINNER
PRM_API const PRM_Type PRM_BEGINEND
PRM_TypeExtended
Definition: PRM_Type.h:508
PRM_API const PRM_Type PRM_TYPE_NAMEXYZW
PRM_API const PRM_Type PRM_ANGLE_E
PRM_API const PRM_Type PRM_BEGINEND_J
PRM_API const PRM_Type PRM_DIRECTORY
PRM_API const PRM_Type PRM_CHANFILE
PRM_API const PRM_Type PRM_TYPE_CMD
PRM_API const PRM_Type PRM_ANGLE_MINMAX_E
PRM_API const PRM_Type PRM_TYPE_CMDF
PRM_InterfaceType
Definition: PRM_Type.h:166
PRM_API const PRM_Type PRM_TYPE_JOIN_NEXT
PRM_API const PRM_Type PRM_MIDIFILE_E
PRM_API const PRM_Type PRM_TYPE_ORDINAL
PRM_API const PRM_Type PRM_TYPE_LABEL
PRM_API const PRM_Type PRM_TYPE_PIC
PRM_API const PRM_Type PRM_TYPE_RGBAMASK
PRM_API const PRM_Type PRM_JOINED_TOGGLE
PRM_Type()
Definition: PRM_Type.h:881
PRM_API const PRM_Type PRM_INT_STARTEND
PRM_API const PRM_Type PRM_INT_XYZ_J
PRM_DataType
Definition: PRM_Type.h:112
PRM_API const PRM_Type PRM_TOGGLE
PRM_API const PRM_Type PRM_TYPE_OP_REF_PARM
PRM_API const PRM_Type PRM_CHANFILE_E
PRM_API const PRM_Type PRM_TYPE_MINMAX_RGBAX
const PRM_PathType & getPathType() const
Definition: PRM_Type.h:1161
bool isSwitcher() const
Definition: PRM_Type.h:280
PRM_API const PRM_Type PRM_MINMAX_B
PRM_API const PRM_Type PRM_TYPE_OP_REF_CHILD
PRM_RampInterpType
Definition: PRM_Type.h:441
PRM_API const PRM_Type PRM_LUTFILE
bool isCookable() const
Definition: PRM_Type.h:286
PRM_ChannelType
Definition: PRM_Type.h:152
PRM_API const PRM_Type PRM_TYPE_LOGARITHMIC
bool operator!=(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:165
PRM_API const PRM_Type PRM_TYPE_GEO
PRM_API const PRM_Type PRM_INT_STARTEND_J
bool isVisible() const
Definition: PRM_Type.h:276
PRM_API const PRM_Type PRM_TYPE_INVISIBLE
PRM_BasicType
Definition: PRM_Type.h:30
PRM_API const PRM_Type PRM_TYPE_DIRECTORY
PRM_API const PRM_Type PRM_BUTTONSTRIP
bool hasPathType(const PRM_PathType &mask) const
Definition: PRM_Type.h:1113
PRM_API const PRM_Type PRM_TYPE_BUTTONSTRIP
PRM_API const PRM_Type PRM_FLT_LOG
bool isFloatType() const
Definition: PRM_Type.h:270
#define PRM_API
Definition: PRM_API.h:10
PRM_API const PRM_Type PRM_MINMAX_G
PRM_API const PRM_Type PRM_TYPE_SIM
PRM_API const PRM_Type PRM_FILE_E
PRM_API const PRM_Type PRM_KEY_VALUE_DICT
PRM_API const PRM_Type PRM_TYPE_GEODELTA
PRM_API const PRM_Type PRM_INT_XYZ_E
PRM_API const PRM_Type PRM_TYPE_BASIC_TYPE
Mask for testing ramp.
Definition: PRM_Type.h:428
PRM_API const PRM_Type PRM_CLIPFILE
PRM_API const PRM_Type PRM_SWITCHER_EXCLUSIVE
const PRM_OrdinalType & getOrdinalType() const
Definition: PRM_Type.h:1143
PRM_API void PRMgetRampParmPrefix(const char *parent_token, UT_String &prefix)
PRM_API const PRM_Type PRM_TYPE_NAMEBEGINEND
const PRM_Type operator|(const PRM_Type &t1, const PRM_Type &t2)
Definition: PRM_Type.h:1185
PRM_API int64 PRMgetRampTemplateMemoryUsage(PRM_Template *templates)
PRM_MultiType
This type enum defines the different types of multi (dynamic) parameters.
Definition: PRM_Type.h:417
Float ramp type.
Definition: PRM_Type.h:425
PRM_API const PRM_Type PRM_TYPE_HUECIRCLE
PRM_API const PRM_Type PRM_RANGE
PRM_API const PRM_Type PRM_TYPE_PATH
PRM_API const PRM_Type PRM_STRING_OPREF
PRM_API const PRM_Type PRM_ORD_E
PRM_API const PRM_Type PRM_PICFILE_E
PRM_API const PRM_Type PRM_TYPE_PAINT
PRM_API const PRM_Type PRM_POLAR
PRM_API const PRM_Type PRM_TYPE_KEY_VALUE_DICT