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