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