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  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 
440 };
441 
452 };
453 
456 
457 class PRM_ChoiceList;
459 
460 // Templates correspond to PRM_MULTITYPE_RAMP_*. It must be here due to
461 // static initialization issues.
462 class PRM_Template;
464  const char *parent_token,
465  PRM_MultiType multi_type,
466  const PRM_SpareData *parent_spare,
467  PRM_Callback callback,
468  PRM_Template *copy_templates);
470  PRM_Template *templates);
471 // NOTE: Always includes the space of the PRM_Template objects
473  PRM_Template *templates);
474 
475 // Parm indices for the template retrieved from PRMcreateRampTemplate()
476 // NOTE: The order of this enum must correspond to PRMcreateRampTemplate()!
478 {
482  PRM_RAMP_NUM_PARMS // sentinel
483 };
484 
485 // Get the token names corresponding to the given parent token
486 PRM_API void PRMgetRampChannelToken(const char *parent_token,
487  PRM_MultiType multi_type,
489  int sub_idx,
490  UT_WorkBuffer &token);
493 
494 // If the parent token for a ramp parm ends in a '#' or digit, then we add
495 // an underscore to ensure that we don't end up with ambiguous situations.
496 // Use the following function if you need to get the proper prefix with the
497 // underscore added. Note that this function returns the decoded parm name,
498 // so after appending a channel suffix, the string must be re-encoded to
499 // get a valid channel name.
500 PRM_API void PRMgetRampDecodedParmPrefix(const char *parent_token,
501  UT_WorkBuffer &prefix);
502 
503 //
504 // Try not to use bit's and bit masks in this new type. It's caused
505 // lot's of hassles with the old type. If you need to add options to
506 // a parm or a template then add more member data for storing the options
507 // or add more types to this new enum.
508 //
510 {
512  PRM_TYPE_TOGGLE_JOIN, // Enable toggle joined with next parameter.
513  PRM_TYPE_JOIN_PAIR, // Parm joined with next parm.
514  PRM_TYPE_VEC_SWITCHER, // Component/Vector switcher (POPs)
515  PRM_TYPE_NO_LABEL, // Usually for menus: leave the label off.
516  PRM_TYPE_MINI_MENU, // For ones like the resolution menu.
517  PRM_TYPE_JUMP_REFERENCE, // Network and node reference
518  PRM_TYPE_NET_REFERENCE, // Network only reference (e.g. material)
519  PRM_TYPE_WIDE_STRING, // For path fields (e.g. file OPs)
520  PRM_TYPE_COP2_CHROMAKEY, // Special hook for color picker
521  PRM_TYPE_COP2_VIDEOKEY, // Special hook for color picker
522  PRM_TYPE_COP2_TEXMAP, // Special hook for corner mapper
523  PRM_TYPE_COP2_CORNERPIN, // Special hook for corner mapper
524  PRM_TYPE_COP2_CROP, // Special hook for corner mapper
525  PRM_TYPE_COP2_SCALE, // Special hook for pixel values
526  PRM_TYPE_COP2_SEQUENCE, // Special hook for sequence
527  PRM_TYPE_SHOP_PATH, // Special hook for SHOP paths
528  PRM_TYPE_DYNAMIC_PATH, // Special hook for dynamic path
529  PRM_TYPE_DYNAMIC_PATH_LIST, // Special hook for dynamic path lists
530  PRM_TYPE_UNUSED_1, // (was: log sliders, use PRM_FLT_LOG instead)
531  PRM_TYPE_FULL_JUMP_REFERENCE, // Full operator path reference
532  PRM_TYPE_MATRIX_ROW, // Ensure that the fields are all on one row
533  PRM_TYPE_IMAGE_FORMAT_1, // First part of an format/options pair
534  PRM_TYPE_IMAGE_FORMAT_2, // Second part of an format/options pair
535  PRM_TYPE_MENU_JOIN, // A menu joined with the next parameter
536  PRM_TYPE_IMAGE_OPTIONS, // Used w/PRM_TYPE_PIC: read format options
537  PRM_TYPE_IMAGE_RGBA_OPTIONS // Used w/PRM_TYPE_PIC: read options for RGBA
538 
539  // Instead of adding a new entry to this enum, please consider using
540  // PRM_SpareData instead (especially for non-ui options). There are a few
541  // advantages: several options can be used at the same time, the dialog
542  // scripts don't support this enum but they do support spare data,
543  // PI_EditScriptedParms inherits spare data when promoting the parameter,
544  // and an easier integration into OPUI_EditParms.
545 };
546 
547 //
548 // The PRM_TYPE_IMAGE_FORMAT template should look like this:
549 // PRM_Template(PRM_TYPE_PICFILE, ... 1, ..., callback1),
550 // PRM_Template(PRM_TYPE_STRING, PRM_TYPE_IMAGE_FORMAT_2, 1,
551 // PRM_ChoiceList(PRMbuildImageDeviceMenu), ... callback2),
552 // PRM_Template(PRM_TYPE_STRING, PRM_TYPE_IMAGE_FORMAT_3, 2, ...)
553 //
554 // Please see PRM_SharedFunc.h for more information.
555 //
556 
557 // Some common parm types:
558 
559 // The terminator for a parm list. Just a zero value.
561 // A switcher to create multiple parm pages. Uses tabs to switch pages.
562 PRM_API extern const PRM_Type PRM_SWITCHER;
563 // A switcher to create multiple parm pages. Uses radio buttons to switch pages.
565 // A switcher to create multiple parm pages. Recooks the node when changed.
567 // A non-animatable float value.
568 PRM_API extern const PRM_Type PRM_FLT_E;
569 // A float value which can be animated.
570 PRM_API extern const PRM_Type PRM_FLT;
571 PRM_API extern const PRM_Type PRM_FLT_J;
572 
573 // A float value which is represented logarithmically.
574 PRM_API extern const PRM_Type PRM_FLT_LOG_E;
575 // A float value which is represented logarithmically which can be animated
576 PRM_API extern const PRM_Type PRM_FLT_LOG;
577 // A non-animatable float triple with xyz channels.
578 PRM_API extern const PRM_Type PRM_XYZ_E;
579 // A float triple with xyz channel names which can be animated.
580 PRM_API extern const PRM_Type PRM_XYZ;
581 PRM_API extern const PRM_Type PRM_XYZ_J;
582 // A non-animatable float triple with uvw channels.
583 PRM_API extern const PRM_Type PRM_UVW_E;
584 // A float triple with uvw channel names which can be animated.
585 PRM_API extern const PRM_Type PRM_UVW;
586 PRM_API extern const PRM_Type PRM_UVW_J;
587 // A non-animatable float triple with rgb channels.
588 PRM_API extern const PRM_Type PRM_RGB_E;
589 // A float triple with rgb channel names which can be animated.
590 PRM_API extern const PRM_Type PRM_RGB;
591 PRM_API extern const PRM_Type PRM_RGB_J;
592 // A non-animatable float quad with rgba channels.
593 PRM_API extern const PRM_Type PRM_RGBA_E;
594 // A float quad with rgba channel names which can be animated.
595 PRM_API extern const PRM_Type PRM_RGBA;
596 PRM_API extern const PRM_Type PRM_RGBA_J;
597 // A non-animatable float quad with begin/end channels.
598 PRM_API extern const PRM_Type PRM_BEGINEND_E;
599 // A float quad with begin/end channel names which can be animated.
600 PRM_API extern const PRM_Type PRM_BEGINEND;
601 PRM_API extern const PRM_Type PRM_BEGINEND_J;
602 // A non-animatable float pair with start/end channel names.
603 PRM_API extern const PRM_Type PRM_STARTEND_E;
604 // A float pair with start/end channel names which can be animated.
605 PRM_API extern const PRM_Type PRM_STARTEND;
606 PRM_API extern const PRM_Type PRM_STARTEND_J;
607 // A non-animatable int value.
608 PRM_API extern const PRM_Type PRM_INT_E;
609 // An int value which can be animated.
610 PRM_API extern const PRM_Type PRM_INT;
611 
612 // A non-animatable int value which is represented logarithmically.
613 PRM_API extern const PRM_Type PRM_INT_LOG_E;
614 // An int value which is represented logarithmically and can be animated.
615 PRM_API extern const PRM_Type PRM_INT_LOG;
616 
617 
618 PRM_API extern const PRM_Type PRM_INT_J;
619 // A non-animatable int triple with xyz channel names.
620 PRM_API extern const PRM_Type PRM_INT_XYZ_E;
621 // An int triple with xyz channel names which can be animated.
622 PRM_API extern const PRM_Type PRM_INT_XYZ;
623 PRM_API extern const PRM_Type PRM_INT_XYZ_J;
624 // A non-animatable float pair with min/max channels.
625 PRM_API extern const PRM_Type PRM_FLT_MINMAX_E;
626 // A float pair with min/max channel names which can be animated.
627 PRM_API extern const PRM_Type PRM_FLT_MINMAX;
628 PRM_API extern const PRM_Type PRM_FLT_MINMAX_J;
629 // A non-animatable int pair with min/max channels.
630 PRM_API extern const PRM_Type PRM_INT_MINMAX_E;
631 // An int pair with min/max channel names which can be animated.
632 PRM_API extern const PRM_Type PRM_INT_MINMAX;
633 PRM_API extern const PRM_Type PRM_INT_MINMAX_J;
634 // A non-animatable int pair with start/end channels.
635 PRM_API extern const PRM_Type PRM_INT_STARTEND_E;
636 // An int pair with start/end channel names which can be animated.
637 PRM_API extern const PRM_Type PRM_INT_STARTEND;
638 PRM_API extern const PRM_Type PRM_INT_STARTEND_J;
639 // A ramp editor, which uses a non-animatable float parameter. (LEGACY)
640 PRM_API extern const PRM_Type PRM_FLT_RAMPEDIT;
641 // A check box.
642 PRM_API extern const PRM_Type PRM_TOGGLE_E;
643 // A check box which can be animated.
644 PRM_API extern const PRM_Type PRM_TOGGLE;
645 PRM_API extern const PRM_Type PRM_TOGGLE_J;
646 // A string that contains an hscript or unix command.
647 PRM_API extern const PRM_Type PRM_COMMAND;
648 // A string that points to any file.
649 PRM_API extern const PRM_Type PRM_FILE_E;
650 // A string that points to any file which can be animated.
651 PRM_API extern const PRM_Type PRM_FILE;
652 // A string that points to an image file.
653 PRM_API extern const PRM_Type PRM_PICFILE_E;
654 // A string that points to an image file which can be animated.
655 PRM_API extern const PRM_Type PRM_PICFILE;
656 // A string that points to a geometry file.
657 PRM_API extern const PRM_Type PRM_GEOFILE_E;
658 // A string that points to a geometry file which can be animated.
659 PRM_API extern const PRM_Type PRM_GEOFILE;
660 // A string that points to a capture override file.
661 PRM_API extern const PRM_Type PRM_CAPTFILE_E;
662 // A string that points to a capture override file which can be animated.
663 PRM_API extern const PRM_Type PRM_CAPTFILE;
664 // A string that points to a ramp file. (LEGACY)
665 PRM_API extern const PRM_Type PRM_RAMPFILE_E;
666 // A string that points to a ramp file which can be animated. (LEGACY)
667 PRM_API extern const PRM_Type PRM_RAMPFILE;
668 // A string that points to a clip (channel) file.
669 PRM_API extern const PRM_Type PRM_CLIPFILE_E;
670 // A string that points to a clip (channel) file which can be animated.
671 PRM_API extern const PRM_Type PRM_CLIPFILE;
672 // A string that points to an image or ramp file.
673 PRM_API extern const PRM_Type PRM_PAINTFILE_E;
674 // A string that points to an image or ramp file which can be animated.
675 PRM_API extern const PRM_Type PRM_PAINTFILE;
676 // A string that points to a LUT file.
677 PRM_API extern const PRM_Type PRM_LUTFILE_E;
678 // A string that points to a LUT file which can be animated.
679 PRM_API extern const PRM_Type PRM_LUTFILE;
680 // A string that points to a script file.
681 PRM_API extern const PRM_Type PRM_CMDFILE_E;
682 // A string that points to a script file which can be animated.
683 PRM_API extern const PRM_Type PRM_CMDFILE;
684 // A string that points to a MIDI file.
685 PRM_API extern const PRM_Type PRM_MIDIFILE_E;
686 // A string that points to a MIDI file which can be animated.
687 PRM_API extern const PRM_Type PRM_MIDIFILE;
688 // A string that points to a text file.
689 PRM_API extern const PRM_Type PRM_TXTFILE_E;
690 // A string that points to a text file which can be animated.
691 PRM_API extern const PRM_Type PRM_TXTFILE;
692 // A string that points to an i3d file.
693 PRM_API extern const PRM_Type PRM_I3DFILE_E;
694 // A string that points to an i3d file which can be animated.
695 PRM_API extern const PRM_Type PRM_I3DFILE;
696 // A string that points to a channel file file.
697 PRM_API extern const PRM_Type PRM_CHANFILE_E;
698 // A string that points to a channel file file which can be animated.
699 PRM_API extern const PRM_Type PRM_CHANFILE;
700 // A string that points to a simulation file.
701 PRM_API extern const PRM_Type PRM_SIMFILE_E;
702 // A string that points to a simulation file which can be animated.
703 PRM_API extern const PRM_Type PRM_SIMFILE;
704 // A string that points to an icon file.
705 PRM_API extern const PRM_Type PRM_ICONFILE_E;
706 // A string that points to an icon file which can be animated.
707 PRM_API extern const PRM_Type PRM_ICONFILE;
708 // A string that points to a siulation data file.
709 PRM_API extern const PRM_Type PRM_SIMDATAFILE_E;
710 // A string that points to a siulation data file which can be animated.
711 PRM_API extern const PRM_Type PRM_SIMDATAFILE;
712 // A string that points to a directory.
713 PRM_API extern const PRM_Type PRM_DIRECTORY_E;
714 // A string that points to a directory which can be animated.
715 PRM_API extern const PRM_Type PRM_DIRECTORY;
716 // A non-animatable string parameter.
717 PRM_API extern const PRM_Type PRM_STRING_E;
718 // An animatable string parameter.
719 PRM_API extern const PRM_Type PRM_STRING;
720 // An alphanumeric string (for node, variable, or group names)
721 PRM_API extern const PRM_Type PRM_ALPHASTRING;
722 // A string containing a list of operator paths.
723 PRM_API extern const PRM_Type PRM_STRING_OPLIST;
724 // A string containing the name of a single operator.
725 PRM_API extern const PRM_Type PRM_STRING_OPREF;
726 // A string containing the name of a single operator that is our child.
728 // A data parameter.
729 PRM_API extern const PRM_Type PRM_DATA;
730 // A non-animatable ordinal type.
731 PRM_API extern const PRM_Type PRM_ORD_E;
732 // An ordinal type which can be animated.
733 PRM_API extern const PRM_Type PRM_ORD;
734 PRM_API extern const PRM_Type PRM_ORD_J;
735 // An animatable float with a polar UI.
736 PRM_API extern const PRM_Type PRM_POLAR;
737 // A non-animatable float with an angle UI.
738 PRM_API extern const PRM_Type PRM_ANGLE_E;
739 // An animatable float with an angle UI.
740 PRM_API extern const PRM_Type PRM_ANGLE;
741 PRM_API extern const PRM_Type PRM_ANGLE_J;
742 // A non-animatable float triple with angle UI and xyz channel names.
743 PRM_API extern const PRM_Type PRM_ANGLEXYZ_E;
744 // An animatable float triple with angle UI and xyz channel names.
745 PRM_API extern const PRM_Type PRM_ANGLEXYZ;
746 PRM_API extern const PRM_Type PRM_ANGLEXYZ_J;
747 // A non-animatable float pair with angle UI and min/max channel names.
748 PRM_API extern const PRM_Type PRM_ANGLE_MINMAX_E;
749 // An animatable float pair with angle UI and min/max channel names.
750 PRM_API extern const PRM_Type PRM_ANGLE_MINMAX;
751 PRM_API extern const PRM_Type PRM_ANGLE_MINMAX_J;
752 // An animatable float with a polar jack UI.
753 PRM_API extern const PRM_Type PRM_POLARJACK;
754 // An animatable int with up/down arrow buttons instead of a slider
755 PRM_API extern const PRM_Type PRM_INT_SPINNER;
756 // An animatable float with up/down arrow buttons instead of a slider
757 PRM_API extern const PRM_Type PRM_SPINNER;
758 
759 // An animatable float with a range UI.
760 PRM_API extern const PRM_Type PRM_RANGE;
761 // An animatable float with a hue circle UI.
762 PRM_API extern const PRM_Type PRM_HUECIRCLE;
763 // An animatable float with a palette UI.
764 PRM_API extern const PRM_Type PRM_PALETTE;
765 // An animatable float with a grey range UI.
766 PRM_API extern const PRM_Type PRM_GREYRANGE;
767 // An animatable float with polar UI and xyz channel names.
768 PRM_API extern const PRM_Type PRM_DIRECTION;
769 // Like PRM_DIRECTION, but not animatable.
770 PRM_API extern const PRM_Type PRM_DIRECTION_E;
771 PRM_API extern const PRM_Type PRM_DIRECTION_NOJ;
772 // A button which triggers a callback.
773 PRM_API extern const PRM_Type PRM_CALLBACK;
774 // A button which triggers a callback but does not recook the node,
775 // create undos, nor cause the hip file to be modified.
777 // An ordinal parameter for masking R/G/B/A image channels.
778 PRM_API extern const PRM_Type PRM_RGBAMASK;
779 // A text buttonstrip for doing general masking up to 32 bits (using a menu)
780 PRM_API extern const PRM_Type PRM_BUTTONSTRIP;
781 // An icon buttonstrip for doing general masking up to 32 bits (using a menu)
782 PRM_API extern const PRM_Type PRM_ICONSTRIP;
783 // An animatable float pair with min/max channel names for the R component.
784 PRM_API extern const PRM_Type PRM_MINMAX_R;
785 // An animatable float pair with min/max channel names for the G component.
786 PRM_API extern const PRM_Type PRM_MINMAX_G;
787 // An animatable float pair with min/max channel names for the B component.
788 PRM_API extern const PRM_Type PRM_MINMAX_B;
789 // An animatable float pair with min/max channel names for the A component.
790 PRM_API extern const PRM_Type PRM_MINMAX_A;
791 // An animatable float pair with min/max channel names for all RGBA components.
792 PRM_API extern const PRM_Type PRM_MINMAX_RGBA;
793 // A label (for dialog appearance only).
794 PRM_API extern const PRM_Type PRM_LABEL;
795 // A separator (for dialog appearance only).
796 PRM_API extern const PRM_Type PRM_SEPARATOR;
797 // A geometry data object.
798 PRM_API extern const PRM_Type PRM_GEOMETRY;
799 // A key-value dictionary (keys are strings, values are strings).
800 PRM_API extern const PRM_Type PRM_KEY_VALUE_DICT;
801 // A Geometry Delta.
802 PRM_API extern const PRM_Type PRM_GEODELTA;
803 // A combination label and separator.
804 PRM_API extern const PRM_Type PRM_HEADING;
805 // A checkbox parameter joined to the next parameter.
806 PRM_API extern const PRM_Type PRM_JOINED_TOGGLE;
807 
808 // explaining PRM_SWITCHER:
809 // This is for switcher groups in PSI. The size and name of each group
810 // is in the defaults list. the parameters which follow will be used
811 // to make the switcher groups.
812 //
813 // eg:
814 // PRM_Default d[] =
815 // {
816 // PRM_Default(3, "label 1"),
817 // PRM_Default(1, "label 2")
818 // };
819 //
820 // PRM_Template t[] =
821 // {
822 // // 2 means there will be two groups
823 // PRM_Template(PRM_SWITCHER, 2, &somename, d),
824 // PRM_Template(PRM_XYZ, 1, &somename), // These three will
825 // PRM_Template(PRM_XYZ, 1, &somename), // be in the first
826 // PRM_Template(PRM_XYZ, 1, &somename), // group named "label 1"
827 //
828 // PRM_Template(PRM_XYZ, 1, &somename), // This will be
829 // // in the second group named "label 2"
830 //
831 // PRM_Template(PRM_XYZ, 1, &somename),
832 // // and this is outside the switcher
833 // };
834 
835 
836 
837 
838 // PRM_SWITCHER int, named 123, ( see example above )
839 // PRM_FLT_E float, named 123
840 // PRM_FLT float, named 123, jive-menu
841 // PRM_XYZ_E float, named xyz
842 // PRM_XYZ float, named xyz, jive-menu
843 // PRM_UVW_E float, named uvw
844 // PRM_UVW float, named uvw, jive-menu
845 // PRM_DIR float, namex xyz, jive-menu, polarjack
846 // PRM_BEGINEND_E float, named begin/end
847 // PRM_BEGINEND float, named begin/end, jive-menu
848 // PRM_ANGLE float, named begin/end, jive-menu, anglejacks
849 // PRM_INT_E int, named 123
850 // PRM_INT int, named 123, jive-menu
851 // PRM_INT_XYZ_E int, named xyz
852 // PRM_INT_XYZ int, named xyz, jive-menu
853 // PRM_FLT_MINMAX float, named min/max, jive-menu
854 // PRM_INT_MINMAX int, named min/max, jive-menu
855 // PRM_TOGGLE ord, toggle
856 // PRM_ORD ord
857 // PRM_CALLBACK ord, callback (either a button or a menu)
858 // PRM_STRING string
859 // PRM_FILE string, file-prompter
860 // Feel free to | these three:
861 // PRM_PICFILE string, file-prompter with a pic filter
862 // PRM_GEOFILE string, file-prompter with a geo filter
863 // PRM_RAMPFILE string, file-prompter with a ramp filter (LEGACY)
864 // PRM_DATA data
865 
866 //////////////////////////////////////////////////////////////////////////////
867 
868 inline void
870 {
871  myBasicType = PRM_BASIC_NONE;
872  myFloatType = PRM_FLOAT_NONE;
873  myOrdinalType = PRM_ORD_NONE;
874  myStringType = PRM_STR_NONE;
875  myDataType = PRM_DATA_NONE;
876  myPathType = PRM_PATH_NONE;
877  myChannelType = PRM_CHAN_NONE;
878  myInterfaceType = PRM_INTERFACE_NONE;
879  myBehaviorType = PRM_BEHAVIOR_NONE;
880 }
881 inline
883 {
884  init();
885 }
886 
887 inline
889 {
890  *this = t;
891 }
892 
893 inline
895 {
896  init();
897  myBasicType = bt;
898 }
899 
900 inline
902 {
903  init();
904  myFloatType = at;
905 }
906 
907 inline
909 {
910  init();
911  myOrdinalType = ot;
912 }
913 
914 inline
916 {
917  init();
918  myStringType = st;
919 }
920 
921 inline
923 {
924  init();
925  myDataType = dt;
926 }
927 
928 inline
930 {
931  init();
932  myPathType = pt;
933 }
934 
935 inline
937 {
938  init();
939  myChannelType = ct;
940 }
941 
942 inline
944 {
945  init();
946  myInterfaceType = it;
947 }
948 
949 inline
951 {
952  init();
953  myBehaviorType = vt;
954 }
955 
956 inline
958  const PRM_FloatType &at,
959  const PRM_OrdinalType &ot,
960  const PRM_StringType &st,
961  const PRM_DataType &dt,
962  const PRM_PathType &pt,
963  const PRM_ChannelType &ct,
964  const PRM_InterfaceType &it,
965  const PRM_BehaviorType &vt)
966  : myBasicType(bt),
967  myFloatType(at),
968  myOrdinalType(ot),
969  myStringType(st),
970  myDataType(dt),
971  myPathType(pt),
972  myChannelType(ct),
973  myInterfaceType(it),
974  myBehaviorType(vt)
975 {
976 }
977 
978 inline const PRM_Type &
980 {
981  myBasicType = t.myBasicType;
982  myFloatType = t.myFloatType;
983  myOrdinalType = t.myOrdinalType;
984  myStringType = t.myStringType;
985  myDataType = t.myDataType;
986  myPathType = t.myPathType;
987  myChannelType = t.myChannelType;
988  myInterfaceType = t.myInterfaceType;
989  myBehaviorType = t.myBehaviorType;
990 
991  return *this;
992 }
993 
994 inline bool
996 {
997  return (myBasicType == t.myBasicType &&
998  myFloatType == t.myFloatType &&
999  myOrdinalType == t.myOrdinalType &&
1000  myStringType == t.myStringType &&
1001  myDataType == t.myDataType &&
1002  myPathType == t.myPathType &&
1003  myChannelType == t.myChannelType &&
1004  myInterfaceType == t.myInterfaceType &&
1005  myBehaviorType == t.myBehaviorType);
1006 }
1007 
1008 inline bool
1010 {
1011  return !(*this == t);
1012 }
1013 
1014 inline
1015 PRM_Type::operator bool() const
1016 {
1017  return (myBasicType != PRM_BASIC_NONE ||
1018  myFloatType != PRM_FLOAT_NONE ||
1019  myOrdinalType != PRM_ORD_NONE ||
1020  myStringType != PRM_STR_NONE ||
1021  myDataType != PRM_DATA_NONE ||
1022  myPathType != PRM_PATH_NONE ||
1023  myChannelType != PRM_CHAN_NONE ||
1024  myInterfaceType != PRM_INTERFACE_NONE ||
1025  myBehaviorType != PRM_BEHAVIOR_NONE);
1026 }
1027 
1028 inline void
1030 {
1031  myBasicType = PRM_BasicType(myBasicType | t.myBasicType);
1032  myFloatType = PRM_FloatType(myFloatType | t.myFloatType);
1033  myOrdinalType = PRM_OrdinalType(myOrdinalType | t.myOrdinalType);
1034  myStringType = PRM_StringType(myStringType | t.myStringType);
1035  myDataType = PRM_DataType(myDataType | t.myDataType);
1036  myPathType = PRM_PathType(myPathType | t.myPathType);
1037  myChannelType = PRM_ChannelType(myChannelType | t.myChannelType);
1038  myInterfaceType = PRM_InterfaceType(myInterfaceType | t.myInterfaceType);
1039  myBehaviorType = PRM_BehaviorType(myBehaviorType | t.myBehaviorType);
1040 }
1041 
1042 inline void
1044 {
1045  myBasicType = PRM_BasicType(myBasicType & t.myBasicType);
1046  myFloatType = PRM_FloatType(myFloatType & t.myFloatType);
1047  myOrdinalType = PRM_OrdinalType(myOrdinalType & t.myOrdinalType);
1048  myStringType = PRM_StringType(myStringType & t.myStringType);
1049  myDataType = PRM_DataType(myDataType & t.myDataType);
1050  myPathType = PRM_PathType(myPathType & t.myPathType);
1051  myChannelType = PRM_ChannelType(myChannelType & t.myChannelType);
1052  myInterfaceType = PRM_InterfaceType(myInterfaceType & t.myInterfaceType);
1053  myBehaviorType = PRM_BehaviorType(myBehaviorType & t.myBehaviorType);
1054 }
1055 
1056 inline void
1058 {
1059  myBasicType = PRM_BasicType(~myBasicType);
1060  myFloatType = PRM_FloatType(~myFloatType);
1061  myOrdinalType = PRM_OrdinalType(~myOrdinalType);
1062  myStringType = PRM_StringType(~myStringType);
1063  myDataType = PRM_DataType(~myDataType);
1064  myPathType = PRM_PathType(~myPathType);
1065  myChannelType = PRM_ChannelType(~myChannelType);
1066  myInterfaceType = PRM_InterfaceType(~myInterfaceType);
1067  myBehaviorType = PRM_BehaviorType(~myBehaviorType);
1068 }
1069 
1070 inline void
1072 {
1073  myInterfaceType = PRM_INTERFACE_NONE;
1074  myBehaviorType = PRM_BEHAVIOR_NONE;
1075 }
1076 
1077 inline bool
1079 {
1080  return (myBasicType == t);
1081 }
1082 
1083 inline bool
1085 {
1086  return (myChannelType == t);
1087 }
1088 
1089 inline bool
1091 {
1092  return ((myFloatType & mask) != 0);
1093 }
1094 
1095 inline bool
1097 {
1098  return ((myOrdinalType & mask) != 0);
1099 }
1100 
1101 inline bool
1103 {
1104  return ((myStringType & mask) != 0);
1105 }
1106 
1107 inline bool
1109 {
1110  return ((myDataType & mask) != 0);
1111 }
1112 
1113 inline bool
1115 {
1116  return ((myPathType & mask) != 0);
1117 }
1118 
1119 inline bool
1121 {
1122  return ((myInterfaceType & mask) != 0);
1123 }
1124 
1125 inline bool
1127 {
1128  return ((myBehaviorType & mask) != 0);
1129 }
1130 
1131 inline const PRM_Type::PRM_BasicType &
1133 {
1134  return myBasicType;
1135 }
1136 
1137 inline const PRM_Type::PRM_FloatType &
1139 {
1140  return myFloatType;
1141 }
1142 
1143 inline const PRM_Type::PRM_OrdinalType &
1145 {
1146  return myOrdinalType;
1147 }
1148 
1149 inline const PRM_Type::PRM_StringType &
1151 {
1152  return myStringType;
1153 }
1154 
1155 inline const PRM_Type::PRM_DataType &
1157 {
1158  return myDataType;
1159 }
1160 
1161 inline const PRM_Type::PRM_PathType &
1163 {
1164  return myPathType;
1165 }
1166 
1167 inline const PRM_Type::PRM_ChannelType &
1169 {
1170  return myChannelType;
1171 }
1172 
1173 inline const PRM_Type::PRM_InterfaceType &
1175 {
1176  return myInterfaceType;
1177 }
1178 
1179 inline const PRM_Type::PRM_BehaviorType &
1181 {
1182  return myBehaviorType;
1183 }
1184 
1185 inline const PRM_Type
1186 operator|(const PRM_Type &t1, const PRM_Type &t2)
1187 {
1188  return PRM_Type(
1189  PRM_Type::PRM_BasicType(t1.myBasicType | t2.myBasicType),
1190  PRM_Type::PRM_FloatType(t1.myFloatType | t2.myFloatType),
1191  PRM_Type::PRM_OrdinalType(t1.myOrdinalType | t2.myOrdinalType),
1192  PRM_Type::PRM_StringType(t1.myStringType | t2.myStringType),
1193  PRM_Type::PRM_DataType(t1.myDataType | t2.myDataType),
1194  PRM_Type::PRM_PathType(t1.myPathType | t2.myPathType),
1195  PRM_Type::PRM_ChannelType(t1.myChannelType | t2.myChannelType),
1196  PRM_Type::PRM_InterfaceType(t1.myInterfaceType | t2.myInterfaceType),
1197  PRM_Type::PRM_BehaviorType(t1.myBehaviorType | t2.myBehaviorType));
1198 }
1199 
1200 inline const PRM_Type
1201 operator&(const PRM_Type &t1, const PRM_Type &t2)
1202 {
1203  return PRM_Type(
1204  PRM_Type::PRM_BasicType(t1.myBasicType & t2.myBasicType),
1205  PRM_Type::PRM_FloatType(t1.myFloatType & t2.myFloatType),
1206  PRM_Type::PRM_OrdinalType(t1.myOrdinalType & t2.myOrdinalType),
1207  PRM_Type::PRM_StringType(t1.myStringType & t2.myStringType),
1208  PRM_Type::PRM_DataType(t1.myDataType & t2.myDataType),
1209  PRM_Type::PRM_PathType(t1.myPathType & t2.myPathType),
1210  PRM_Type::PRM_ChannelType(t1.myChannelType & t2.myChannelType),
1211  PRM_Type::PRM_InterfaceType(t1.myInterfaceType & t2.myInterfaceType),
1212  PRM_Type::PRM_BehaviorType(t1.myBehaviorType & t2.myBehaviorType));
1213 }
1214 
1215 inline const PRM_Type
1217 {
1218  return PRM_Type(
1219  PRM_Type::PRM_BasicType(~t1.myBasicType),
1220  PRM_Type::PRM_FloatType(~t1.myFloatType),
1221  PRM_Type::PRM_OrdinalType(~t1.myOrdinalType),
1222  PRM_Type::PRM_StringType(~t1.myStringType),
1223  PRM_Type::PRM_DataType(~t1.myDataType),
1224  PRM_Type::PRM_PathType(~t1.myPathType),
1225  PRM_Type::PRM_ChannelType(~t1.myChannelType),
1226  PRM_Type::PRM_InterfaceType(~t1.myInterfaceType),
1227  PRM_Type::PRM_BehaviorType(~t1.myBehaviorType));
1228 }
1229 
1230 inline const PRM_Type
1232 {
1233  return PRM_Type(t1.myBasicType,
1234  t1.myFloatType,
1235  t1.myOrdinalType,
1236  t1.myStringType,
1237  t1.myDataType,
1238  t1.myPathType,
1239  t1.myChannelType,
1242 }
1243 
1244 // Overload for custom formatting of PRM_Type with UTformat.
1245 PRM_API size_t format(char *buffer, size_t buffer_size, const PRM_Type &v);
1246 
1247 #endif
bool hasBehaviorType(const PRM_BehaviorType &mask) const
Definition: PRM_Type.h:1126
const PRM_StringType & getStringType() const
Definition: PRM_Type.h:1150
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:1071
void invert()
Definition: PRM_Type.h:1057
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:421
PRM_API const PRM_Type PRM_HUECIRCLE
void operator|=(const PRM_Type &t)
Definition: PRM_Type.h:1029
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:1216
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: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:1009
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:1138
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:1108
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:477
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:995
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:422
void init()
Definition: PRM_Type.h:869
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:1102
PRM_API const char * PRMgetRampInterpToken(PRM_RampInterpType interp)
const PRM_BasicType & getBasicType() const
Definition: PRM_Type.h:1132
PRM_PathType
Definition: PRM_Type.h:123
PRM_API const PRM_Type PRM_TYPE_RAMPEDIT
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
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
Definition: core.h:760
bool isChannelType(const PRM_ChannelType &t) const
Definition: PRM_Type.h:1084
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:1201
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:1090
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
GLint GLuint mask
Definition: glcorearb.h:124
const PRM_ChannelType & getChannelType() const
Definition: PRM_Type.h:1168
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:1096
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:1120
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:1078
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:979
PRM_API const PRM_Type PRM_RGBAMASK
const PRM_BehaviorType & getBehaviorType() const
Definition: PRM_Type.h:1180
PRM_API const PRM_Type PRM_TYPE_LABEL_NONE
void operator&=(const PRM_Type &t)
Definition: PRM_Type.h:1043
PRM_API const PRM_Type PRM_COMMAND
const PRM_InterfaceType & getInterfaceType() const
Definition: PRM_Type.h:1174
PRM_API const PRM_Type PRM_FLT_J
const PRM_Type PRM_STRIP_UI_TYPE(const PRM_Type &t1)
Definition: PRM_Type.h:1231
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: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:1156
PRM_API const PRM_Type PRM_TYPE_MINMAX_G
GT_API const UT_StringHolder st
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:509
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:882
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:1162
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:442
PRM_API const PRM_Type PRM_LUTFILE
bool isCookable() const
Definition: PRM_Type.h:286
PRM_ChannelType
Definition: PRM_Type.h:152
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: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:1114
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
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:1144
PRM_API const PRM_Type PRM_TYPE_NAMEBEGINEND
const PRM_Type operator|(const PRM_Type &t1, const PRM_Type &t2)
Definition: PRM_Type.h:1186
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
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