HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PRM_SpareData.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_SpareData.h ( PRM Library, C++)
7  *
8  * COMMENTS: This class is used to add additional token/value pairs to a
9  * parameter.
10  */
11 
12 #ifndef __PRM_SpareData__
13 #define __PRM_SpareData__
14 
15 #include "PRM_API.h"
16 #include "PRM_Type.h"
17 
18 #include <CH/CH_ExprLanguage.h>
19 #include <SYS/SYS_Types.h>
20 #include <UT/UT_Color.h>
21 #include <UT/UT_Pair.h>
22 #include <UT/UT_StringMap.h>
23 #include <UT/UT_Variadic.h>
24 
25 // Namespace to use for built-in parameter tags.
26 // Note that we cannot add the namespace to old built-in tags
27 // for compatibility reasons.
28 #define PRM_SPARE_BUILTIN_NAMESPACE "sidefx::"
29 
30 //
31 // Declarations of built-in parm spare data tokens (tag names).
32 // The entries in this list must be included in `theBuiltInTokenMap`
33 // (see PRM_SpareData.C).
34 //
35 // NOTE: You *must* include the SideFX namespace in the token
36 // when adding a new spare data token.
37 //
38 #define PRM_SPARE_KEY_VALUE_DICT_KEY_LABEL_TOKEN \
39  PRM_SPARE_BUILTIN_NAMESPACE "key_value_dict_key_label"
40 #define PRM_SPARE_KEY_VALUE_DICT_VALUE_LABEL_TOKEN \
41  PRM_SPARE_BUILTIN_NAMESPACE "key_value_dict_value_label"
42 #define PRM_SPARE_KEY_VALUE_DICT_USE_CHOOSER_TOKEN \
43  PRM_SPARE_BUILTIN_NAMESPACE "key_value_dict_use_chooser"
44 #define PRM_SPARE_KEY_VALUE_DICT_CHOOSER_LABEL_TOKEN \
45  PRM_SPARE_BUILTIN_NAMESPACE "key_value_dict_chooser_label"
46 #define PRM_SPARE_KEY_VALUE_DICT_CHOOSER_CALLBACK_TOKEN \
47  PRM_SPARE_BUILTIN_NAMESPACE "key_value_dict_chooser_callback"
48 #define PRM_SPARE_ATTRIB_ACCESS_TOKEN \
49  PRM_SPARE_BUILTIN_NAMESPACE "attrib_access"
50 #define PRM_SPARE_CONNECTOR_KIND \
51  PRM_SPARE_BUILTIN_NAMESPACE "connector_kind"
52 #define PRM_SPARE_USDPATHTYPE_TOKEN \
53  PRM_SPARE_BUILTIN_NAMESPACE "usdpathtype"
54 
55 //
56 // Declarations of *old*, built-in parm spare data tokens (tag names).
57 // WARNING: Do not add new spare data tokens to this list!!!
58 // Add the tokens to the new list above and include the SideFX
59 // namespace in the tokens.
60 //
61 #define PRM_SPARE_AUTOSCOPE_TOKEN "autoscope"
62 #define PRM_SPARE_BUTTON_ICON_TOKEN "button_icon"
63 #define PRM_SPARE_CODE_GENERATION_TOKEN "code_generation"
64 #define PRM_SPARE_COLOR_DYN_TOKEN "colordyn"
65 #define PRM_SPARE_COLOR_TYPE_TOKEN "colortype"
66 #define PRM_SPARE_COLOR_WHEEL_TOKEN "colorwheel"
67 #define PRM_SPARE_COOK_DEPENDENT_TOKEN "cook_dependent"
68 #define PRM_SPARE_EDITOR_LANG_TOKEN "editorlang"
69 #define PRM_SPARE_EDITOR_LINES_TOKEN "editorlines"
70 #define PRM_SPARE_EDITOR_TOKEN "editor"
71 #define PRM_SPARE_FILE_CHOOSER_MODE_TOKEN "filechooser_mode"
72 #define PRM_SPARE_FILE_CHOOSER_PATTERN_TOKEN "filechooser_pattern"
73 #define PRM_SPARE_GROUP_TYPE_TOKEN "group_type"
74 #define PRM_SPARE_GROUP_DEFAULT_TOKEN "group_default"
75 #define PRM_SPARE_MULTI_START_OFFSET_TOKEN "multistartoffset"
76 #define PRM_SPARE_NETREF_TOKEN "netref"
77 #define PRM_SPARE_OPFILTER_TOKEN "opfilter"
78 #define PRM_SPARE_OPPATH_KEYWORDS_TOKEN "oppathkeywords"
79 #define PRM_SPARE_OPRELATIVE_TOKEN "oprelative"
80 #define PRM_SPARE_PARM_VOP_TOKEN "parmvop"
81 #define PRM_SPARE_RAMP_BASIS_DEFAULT_TOKEN "rampbasisdefault"
82 #define PRM_SPARE_RAMP_BASIS_TOKEN "rampbasis"
83 #define PRM_SPARE_RAMP_BASIS_VAR_TOKEN "rampbasis_var"
84 #define PRM_SPARE_RAMP_COLOR_DEFAULT_TOKEN "rampcolordefault"
85 #define PRM_SPARE_RAMP_COLOR_TYPE_TOKEN "rampcolortype"
86 #define PRM_SPARE_RAMP_FLOAT_DEFAULT_TOKEN "rampfloatdefault"
87 #define PRM_SPARE_RAMP_KEYS_TOKEN "rampkeys"
88 #define PRM_SPARE_RAMP_KEYS_VAR_TOKEN "rampkeys_var"
89 #define PRM_SPARE_RAMP_SHOW_CONTROLS_DEFAULT_TOKEN "rampshowcontrolsdefault"
90 #define PRM_SPARE_RAMP_VALUES_TOKEN "rampvalues"
91 #define PRM_SPARE_RAMP_VALUES_VAR_TOKEN "rampvalues_var"
92 #define PRM_SPARE_SCRIPT_ACTION_HELP_TOKEN "script_action_help"
93 #define PRM_SPARE_SCRIPT_ACTION_ICON_TOKEN "script_action_icon"
94 #define PRM_SPARE_SCRIPT_ACTION_TOKEN "script_action"
95 #define PRM_SPARE_SCRIPT_CALLBACK_TOKEN "script_callback"
96 #define PRM_SPARE_SCRIPT_RITYPE_TOKEN "script_ritype"
97 #define PRM_SPARE_SCRIPT_UNQUOTED_TOKEN "script_unquoted"
98 #define PRM_SPARE_SHADER_PARM_CONTEXTS_TOKEN "shaderparmcontexts"
99 #define PRM_SPARE_SHADER_PARM_TYPE_TOKEN "shaderparmtype"
100 #define PRM_SPARE_UNITS_TOKEN "units"
101 #define PRM_SPARE_XCF_MODE_TOKEN "xcfmode"
102 #define PRM_SPARE_VARYING_DEFAULT_TOKEN "varying_default"
103 
104 class UT_BitArray;
105 class UT_StringHolder;
106 class UT_StringRef;
107 class PRM_Parm;
108 class prm_SharedString;
109 
110 typedef int (*PRM_SpareCallback)(const char *token, const char *value);
111 typedef int (*PRM_SpareCallbackWithData)(const char *token,
112  const char *value, void *data);
113 
116 
118 {
119 public:
120  /// The constructor for the PRM_SpareData should takes a variadic number of
121  /// token/value pairs. For example:
122  /// static PRM_SpareData(PRM_SpareArgs()
123  /// << PRM_SpareToken("token1", "value1")
124  /// << PRM_SpareToken("token2", "value2")
125  /// ...);
126  explicit PRM_SpareData(const PRM_SpareArgs &args);
127 
128  /// A single token value pair
129  explicit PRM_SpareData(const PRM_SpareToken &pair);
130  PRM_SpareData();
131  ~PRM_SpareData();
132 
133  PRM_SpareData(const PRM_SpareData &copy);
134  PRM_SpareData &operator=(const PRM_SpareData &copy);
135 
136  uint entries() const;
137 
138  void clear();
139  void mergeFrom(const PRM_SpareData &ref);
140  void copyFrom(const PRM_SpareData &ref);
141 
142  bool containsAny(const PRM_SpareData &ref) const;
143  bool containsAll(const PRM_SpareData &ref) const;
144 
145  // The the value associated with a particular token.
146  const char *getValue(const UT_StringRef &token) const;
147 
148  // Because these are traverseConst functions, we can't remove any items
149  // from the table in the traversal functions.
150  void traverseConst(PRM_SpareCallback f) const;
151  void traverseConst(PRM_SpareCallbackWithData f, void *data) const;
152 
153 
154  // NOTE: When addTokenValue is called with a null pointer for the value,
155  // the token is deleted from the spare data.
156  void addTokenValue(const UT_StringHolder &token, const char *value);
157  void deleteTokenValue(const UT_StringRef &token);
158 
159  // For backward compatibility with the ScriptParmSpareData class, we have
160  // these functions.
161  void setCallbackData(const char *str)
162  { addTokenValue(PRM_SPARE_SCRIPT_CALLBACK_TOKEN, str); }
163  const char *getCallbackData() const
164  { return getValue(PRM_SPARE_SCRIPT_CALLBACK_TOKEN); }
165 
166  void setCallbackLanguage(CH_ScriptLanguage language);
167  CH_ScriptLanguage getCallbackLanguage() const;
168 
169  void setRenderManType(const char *str)
170  { addTokenValue(PRM_SPARE_SCRIPT_RITYPE_TOKEN, str); }
171  const char *getRenderManType() const
172  { return getValue(PRM_SPARE_SCRIPT_RITYPE_TOKEN); }
173 
174  void setOpFilter(const char *str)
175  { addTokenValue(PRM_SPARE_OPFILTER_TOKEN, str); }
176  const char *getOpFilter() const
177  { return getValue(PRM_SPARE_OPFILTER_TOKEN); }
178 
179  void setOpRelative(const char *str)
180  { addTokenValue(PRM_SPARE_OPRELATIVE_TOKEN, str); }
181  const char *getOpRelative() const
182  { return getValue(PRM_SPARE_OPRELATIVE_TOKEN); }
183 
184  static const char * getUnquotedStateToken()
187  { addTokenValue(getUnquotedStateToken(), "1"); }
188  bool getUnquotedState() const
189  { return getValue(getUnquotedStateToken()) != 0; }
190 
191  void setMultiStartOffset(int value);
192  int getMultiStartOffset() const;
193 
194  void setVisibleTabs(const UT_BitArray &values);
195  void getVisibleTabs(UT_BitArray &values) const;
196  bool getVisibleTab(int tabidx) const;
197 
198  // Ramp
199  static const char * getRampBasisDefaultToken()
201  void setRampBasisDefault(const char *value)
202  { addTokenValue(getRampBasisDefaultToken(),value); }
203  const char * getRampBasisDefault() const
204  { return getValue(getRampBasisDefaultToken()); }
205 
206  static const char * getRampShowControlsDefaultToken()
208  void setRampShowControlsDefault(bool value)
209  {
210  addTokenValue(getRampShowControlsDefaultToken(),
211  value ? "1" : "0");
212  }
214  {
215  const char *n, *v;
216  n = getRampShowControlsDefaultToken();
217  v = getValue(n);
218  if (!v)
219  return true;
220  else
221  return *v != '0';
222  }
223 
224  static const char * getRampColorTypeToken()
226  static const char * getRampColorTypeValueToken(UT_ColorType color_type);
227  void setRampColorType(UT_ColorType color_type);
228  UT_ColorType getRampColorType() const;
229 
230  static const char * getRampBasisVarToken()
232  static const char * getRampKeysVarToken()
234  static const char * getRampValuesVarToken()
236 
237  void setRampBasisVar(const char *value)
238  { addTokenValue(getRampBasisVarToken(), value); }
239  const char * getRampBasisVar() const
240  { return getValue(getRampBasisVarToken()); }
241  void setRampKeysVar(const char *value)
242  { addTokenValue(getRampKeysVarToken(), value); }
243  const char * getRampKeysVar() const
244  { return getValue(getRampKeysVarToken()); }
245  void setRampValuesVar(const char *value)
246  { addTokenValue(getRampValuesVarToken(), value); }
247  const char * getRampValuesVar() const
248  { return getValue(getRampValuesVarToken()); }
249 
250  static const char * getColorRampDefaultToken()
252  const char * getColorRampDefaultValue() const
253  { return getValue(getColorRampDefaultToken()); }
254  static const char * getFloatRampDefaultToken()
256  const char * getFloatRampDefaultValue() const
257  { return getValue(getFloatRampDefaultToken()); }
258  void setRampDefaultFromParm(const PRM_Parm &ramp_parm);
259  void getRampDefaultToParm(PRM_Parm &ramp_parm) const;
260 
261  // Color UI Mode, Wheel flag and Dynamic flag
262  static const char * getColorTypeToken()
263  { return PRM_SPARE_COLOR_TYPE_TOKEN; }
264  static const char * getColorTypeValueToken(PRM_ColorType color_type);
265  void setColorType(PRM_ColorType color_type);
266  PRM_ColorType getColorType() const;
267 
268  static const char * getColorWheelToken()
269  { return PRM_SPARE_COLOR_WHEEL_TOKEN; }
270  void setColorWheel(bool value);
271  bool getColorWheel() const;
272 
273  static const char * getColorDynamicToken()
274  { return PRM_SPARE_COLOR_DYN_TOKEN; }
275  void setColorDynamic(bool value);
276  bool getColorDynamic() const;
277 
278  static const char * getKeyValueDictKeyLabelToken()
280  void setKeyValueDictKeyLabel(const char *label);
281  const char *getKeyValueDictKeyLabel() const;
282  static const char * getKeyValueDictValueLabelToken()
284  void setKeyValueDictValueLabel(const char *label);
285  const char *getKeyValueDictValueLabel() const;
286  static const char * getKeyValueDictUseChooserToken()
288  void setKeyValueDictUseChooser(bool use_chooser);
289  bool getKeyValueDictUseChooser() const;
290  static const char * getKeyValueDictChooserLabelToken()
292  void setKeyValueDictChooserLabel(const char *label);
293  const char *getKeyValueDictChooserLabel() const;
296  void setKeyValueDictChooserCallback(const char *label);
297  const char *getKeyValueDictChooserCallback() const;
298 
299  void setXCFMode(const char *value)
300  { return addTokenValue(PRM_SPARE_XCF_MODE_TOKEN, value); }
301  const char *getXCFMode() const
302  { return getValue(PRM_SPARE_XCF_MODE_TOKEN); }
303 
304  const char *getScriptAction() const;
305  const char *getScriptActionHelp() const;
306  const char *getScriptActionIcon() const;
307  const char *getButtonIcon() const;
308 
309  bool getUseEditor() const;
310  const char *getEditorLanguage() const
311  { return getValue(PRM_SPARE_EDITOR_LANG_TOKEN); }
312  void getEditorLinesRange(int &lines_min, int &lines_max) const;
313  static inline int getEditorLinesRangeDefaultMin() { return 8; }
314  static inline int getEditorLinesRangeDefaultMax() { return 40; }
315 
316  static const char *getXCFModeFloatValToken() { return "float"; }
317 
318  // Token for whether the template will be used for cooking
319  static const char * getCookDependentToken()
321  // Get state of cook_dependent flag.
322  // This is only used for SPARE parameters, which if this tag doesn't exist,
323  // the spare parm defaults to false for cook dependent.
324  bool getCookDependent() const;
325  // Set state of cook_dependent flag.
326  // This is only used for SPARE parameters, which if this tag doesn't exist,
327  // the spare parm defaults to false for cook dependent.
328  void setCookDependent(bool flag);
329 
330  // Token for whether the parm on the VOP should regenerate code
331  static const char *getCodeGenDependentToken()
333  // Get the state of the code_generation flag
334  // This is only used for SPARE parameters, which if this tag doesn't exist,
335  // the spare parm defaults to true for code generation
336  bool getCodeGenDependent() const;
337  // Set state of code_generation flag.
338  // This is only used for SPARE parameters, which if this tag doesn't exist,
339  // the spare parm defaults to true for code generation
340  void setCodeGenDependent(bool flag);
341 
342  int64 getMemoryUsage(bool inclusive) const;
343 
344  static const char *getOpFilterKeyFromName(const char *name);
345  static const char *getOpFilterKeyFromLabel(const char *name);
346  static const char *getOpFilterNameFromKey(const char *key);
347  static const char *getOpFilterLabelFromKey(const char *key);
348  // End of backward compatibility
349 
350  // Convenience spare data you might want to use
351  static PRM_SpareData objNetRef; // /obj
352  static PRM_SpareData chNetRef; // /ch
353  static PRM_SpareData ropNetRef; // /out
354 
355  static PRM_SpareData objPath; // !!OBJ!!
356  static PRM_SpareData objGeometryPath; // !!OBJ/GEOMETRY!!
357  static PRM_SpareData objLightPath; // !!OBJ/LIGHT!!
358  static PRM_SpareData objBonePath; // !!OBJ/BONE!!
359  static PRM_SpareData objMusclePath; // !!OBJ/MUSCLE!!
360  static PRM_SpareData objCameraPath; // !!OBJ/CAMERA!!
361  static PRM_SpareData dopPath; // !!DOP!!
362  static PRM_SpareData sopPath; // !!SOP!!
363  static PRM_SpareData popPath; // !!POP!!
364  static PRM_SpareData ropPath; // !!ROP!!
365  static PRM_SpareData cop2Path; // !!COP2!!
366  static PRM_SpareData chopPath; // !!CHOP!!
367  static PRM_SpareData constraintsPath; // !!CHOP!!
368  static PRM_SpareData shopPath; // !!SHOP!!
369  static PRM_SpareData shopProperties; // !!SHOP/PROPERTIES!!
370  static PRM_SpareData shopMaterial; // !!SHOP/MATERIAL!!
371  static PRM_SpareData shopSurface; // !!SHOP/SURFACE!!
372  static PRM_SpareData shopDisplacement; // !!SHOP/DISPLACEMENT!!
373  static PRM_SpareData shopSurfaceShadow; // !!SHOP/SURFACE_SHADOW!!
374  static PRM_SpareData shopBackground; // !!SHOP/BACKGROUND!!
375  static PRM_SpareData shopGeometry; // !!SHOP/GEOMETRY!!
376  static PRM_SpareData shopAtmosphere; // !!SHOP/ATMOSPHERE!!
377  static PRM_SpareData shopPhoton; // !!SHOP/PHOTON!!
378  static PRM_SpareData shopPhotonVolume; // !!SHOP/PHOTONVOLUME!!
379  static PRM_SpareData shopContour; // !!SHOP/CONTOUR!!
380  static PRM_SpareData shopLight; // !!SHOP/LIGHT!!
381  static PRM_SpareData shopEmitter; // !!SHOP/EMITTER!!
382  static PRM_SpareData shopLightShadow; // !!SHOP/LIGHT_SHADOW!!
383  static PRM_SpareData shopLens; // !!SHOP/LENS!!
384  static PRM_SpareData shopOutput; // !!SHOP/OUTPUT!!
385  static PRM_SpareData shopContourStore; // !!SHOP/CONTOUR_STORE!!
386  static PRM_SpareData shopContourContrast; // !!SHOP/CONTOUR_CONTRAST!!
387  static PRM_SpareData shopImage3d; // !!SHOP/IMAGE3D!!
388  static PRM_SpareData shopCVEX; // !!SHOP/CVEX!!
389  static PRM_SpareData shopCoShader; // !!SHOP/COSHADER!!
390  static PRM_SpareData vopPath; // !!VOP!!
391  static PRM_SpareData lopPath; // !!LOP!!
392  static PRM_SpareData topPath; // !!TOP!!
393  static PRM_SpareData filterMaterial; // !!CUSTOM/MATERIAL!!
394 
395  static PRM_SpareData autoScope; // autoscope
396 
397  static PRM_SpareData multiStartOffsetZero; // multistart offset of zero
398  static PRM_SpareData multiStartOffsetOne; // multistart offset of one
399 
403  static PRM_SpareData unitsMass; // kg1
404  static PRM_SpareData unitsPerMass; // kg-1
405  static PRM_SpareData unitsTime; // s1
408  static PRM_SpareData unitsVelocity; // m1s-1
412  static PRM_SpareData unitsForce; // kg1m1s-2
413  static PRM_SpareData unitsForceDensity; // kg1m-2s-2
414  static PRM_SpareData unitsImpulse; // kg1m1s-1
415  static PRM_SpareData unitsTorque; // kg1m2s-2
416  static PRM_SpareData unitsDrag; // kg1s-1
417  static PRM_SpareData unitsAngDrag; // kg1m2s-1
418  static PRM_SpareData unitsPressure; // kg1m-1s-2
423  static PRM_SpareData unitsAreaDensity; // kg1m-2
426  static PRM_SpareData unitsDensity; // kg1m-3
427  static PRM_SpareData unitsDensityPerTime; // kg1m-3s-1
429  static PRM_SpareData unitsNone; // ""
430 
431  static PRM_SpareData rampBasisDefault; // rampbasis "ramp_basis"
432  static PRM_SpareData rampKeysDefault; // rampkeys "ramp_keys"
433  static PRM_SpareData rampValuesDefault; // rampvalues "ramp_values"
434 
435  static PRM_SpareData attribAccessR; // "sidefx::attrib_access" "read"
436  static PRM_SpareData attribAccessW; // "sidefx::attrib_access" "write"
437  static PRM_SpareData attribAccessRW; // "sidefx::attrib_access" "readwrite"
438 
439  static PRM_SpareData connectorKindNone; // "sidefx::connector_kind" "none"
440  static PRM_SpareData connectorKindIn; // "sidefx::connector_kind" "in"
441  static PRM_SpareData connectorKindOut; // "sidefx::connector_kind" "out"
442  static PRM_SpareData connectorKindInOut;// "sidefx::connector_kind" "inout"
443 
444  /// Used to set a space- or comma-separated list of globs to use as
445  /// file filter for parameters of type @c PRM_FILE (e.g. "*.txt *.log").
446  static const char *getFileChooserPatternToken()
448 
449  static const char *getFileChooserModeToken()
451  static const char *getFileChooserModeValRead()
452  { return "read"; }
453  static const char *getFileChooserModeValWrite()
454  { return "write"; }
455  static const char *getFileChooserModeValReadAndWrite()
456  { return "read_and_write"; }
457 
458  static PRM_SpareData fileChooserModeRead; // filechooser_mode "read"
459  static PRM_SpareData fileChooserModeWrite; // filechooser_mode "write"
460  static PRM_SpareData fileChooserModeReadAndWrite; // ... "read_and_write"
461 
462  static PRM_SpareData stringFloatXCF; // float XCF in string field
463 
464  static const char *getScriptActionToken()
466  static const char *getScriptActionHelpToken()
468  static const char *getScriptActionIconToken()
470  static const char *getButtonIconToken()
471  { return PRM_SPARE_BUTTON_ICON_TOKEN; }
472 
473  static const char *getEditorToken()
474  { return PRM_SPARE_EDITOR_TOKEN; }
475  static PRM_SpareData stringEditor; // Use a text editor for strings
476 
477  static const char *getEditorLanguageToken()
478  { return PRM_SPARE_EDITOR_LANG_TOKEN; }
483 
484  /// Number of lines to show by default. This value can be set as either
485  /// a single number or a range, e.g. '10-50'. The minimum number is what
486  /// the editor will originally show up as, but will attempt to expand up to
487  /// the maximum.
488  static const char *getEditorLinesRangeToken()
489  { return PRM_SPARE_EDITOR_LINES_TOKEN; }
490 
491  // token indicating the parameter comes from a Parameter VOP (ie it is a
492  // shader parameter)
493  static const char * getParmVopVarToken()
494  { return PRM_SPARE_PARM_VOP_TOKEN; }
495 
496  // space-separated list of shading contexts, which a material parameter
497  // belongs to, ie, shaders for each of these contexts actually have
498  // this parameter as an argument, since material may contain other shaders
499  // for other contexts to which a parameter does not apply
500  static const char * getShaderParmContextsToken()
502 
503  // token specifying special keywords that are legal in an oppath parameter
504  // (in addition to the node path itself)
505  static const char * getOpPathKeywordsToken()
507 
508  // token for unit specification
509  static const char * getUnitsToken()
510  { return PRM_SPARE_UNITS_TOKEN; }
511 
512  // token for group specialization (simple/collapsible/toggle groups).
513  static const char *getGroupTypeToken()
514  { return PRM_SPARE_GROUP_TYPE_TOKEN; }
517  static const char *getGroupDefaultToken()
519 
520  // Marks parameter has having varying default values
521  // Defaults to "0"
522  static const char *getVaryingDefaultToken()
525  bool getHasVaryingDefault() const;
526  void setHasVaryingDefault(bool f);
527 
528  // Gets information about whether this parm accepts one or more USD
529  // primitive paths, and/or USD collections.
530  static const char *getUsdPathTypeToken()
531  { return PRM_SPARE_USDPATHTYPE_TOKEN; }
534  const char *getUsdPathType() const;
535 
536  /// Return true if the given token is a built-in (internally used) spare
537  /// data token.
538  static bool isBuiltInToken(const char *token);
539 
540  /// Return a range of the built-in tags names.
541  static void builtInTokens(UT_StringArray &tokens);
542 private:
544 };
545 
546 #endif
static PRM_SpareData objLightPath
static PRM_SpareData objMusclePath
static PRM_SpareData shopOutput
static const char * getVaryingDefaultToken()
static PRM_SpareData shopEmitter
static PRM_SpareData stringEditorLangPython
static const char * getColorWheelToken()
static PRM_SpareData rampValuesDefault
#define PRM_SPARE_OPRELATIVE_TOKEN
Definition: PRM_SpareData.h:79
static PRM_SpareData unitsTime
const char * getXCFMode() const
#define PRM_SPARE_SCRIPT_ACTION_HELP_TOKEN
Definition: PRM_SpareData.h:92
static PRM_SpareData shopCVEX
#define PRM_SPARE_COLOR_TYPE_TOKEN
Definition: PRM_SpareData.h:65
#define PRM_SPARE_CODE_GENERATION_TOKEN
Definition: PRM_SpareData.h:63
static PRM_SpareData unitsLinearDensity
static const char * getEditorLanguageToken()
static const char * getRampColorTypeToken()
static const char * getXCFModeFloatValToken()
static PRM_SpareData vopPath
static PRM_SpareData ropPath
GLuint GLsizei const GLchar * label
Definition: glcorearb.h:2544
static PRM_SpareData connectorKindIn
const char * getEditorLanguage() const
const char * getOpFilter() const
void setCallbackData(const char *str)
static PRM_SpareData shopPath
static PRM_SpareData dopPath
static PRM_SpareData unitsImpulse
static PRM_SpareData shopDisplacement
static PRM_SpareData connectorKindNone
static PRM_SpareData fileChooserModeReadAndWrite
static const char * getCookDependentToken()
#define PRM_SPARE_XCF_MODE_TOKEN
const GLdouble * v
Definition: glcorearb.h:836
void setXCFMode(const char *value)
#define PRM_SPARE_RAMP_BASIS_DEFAULT_TOKEN
Definition: PRM_SpareData.h:81
static const char * getRampKeysVarToken()
#define PRM_SPARE_RAMP_BASIS_VAR_TOKEN
Definition: PRM_SpareData.h:83
static const char * getParmVopVarToken()
#define PRM_SPARE_SCRIPT_ACTION_ICON_TOKEN
Definition: PRM_SpareData.h:93
static PRM_SpareData stringFloatXCF
static PRM_SpareData unitsPerMass
static PRM_SpareData stringEditorLangExpr
static const char * getButtonIconToken()
static PRM_SpareData shopSurface
static PRM_SpareData objGeometryPath
bool getUnquotedState() const
static const char * getRampBasisDefaultToken()
static PRM_SpareData unitsPressure
#define PRM_SPARE_SCRIPT_RITYPE_TOKEN
Definition: PRM_SpareData.h:96
#define PRM_SPARE_RAMP_FLOAT_DEFAULT_TOKEN
Definition: PRM_SpareData.h:86
const char * getRampBasisDefault() const
static const char * getKeyValueDictChooserLabelToken()
static PRM_SpareToken usdPathTypePrim
static const char * getGroupTypeToken()
#define PRM_SPARE_KEY_VALUE_DICT_CHOOSER_CALLBACK_TOKEN
Definition: PRM_SpareData.h:46
static PRM_SpareData stringEditor
static PRM_SpareData shopPhoton
static PRM_SpareData unitsPerSquareTime
void setUnquotedState()
UT_VariadicT< PRM_SpareToken > PRM_SpareArgs
static const char * getFileChooserPatternToken()
static PRM_SpareData unitsPerLength
static PRM_SpareData attribAccessW
#define PRM_SPARE_RAMP_VALUES_VAR_TOKEN
Definition: PRM_SpareData.h:91
static PRM_SpareData shopContourContrast
static PRM_SpareData attribAccessRW
static PRM_SpareData topPath
#define PRM_SPARE_UNITS_TOKEN
#define PRM_SPARE_OPPATH_KEYWORDS_TOKEN
Definition: PRM_SpareData.h:78
static PRM_SpareData multiStartOffsetOne
static PRM_SpareData unitsAngVelocity
static PRM_SpareData cop2Path
#define PRM_SPARE_KEY_VALUE_DICT_USE_CHOOSER_TOKEN
Definition: PRM_SpareData.h:42
static const char * getKeyValueDictUseChooserToken()
static PRM_SpareData groupTypeCollapsible
long long int64
Definition: SYS_Types.h:107
#define PRM_SPARE_GROUP_DEFAULT_TOKEN
Definition: PRM_SpareData.h:74
#define PRM_SPARE_SCRIPT_CALLBACK_TOKEN
Definition: PRM_SpareData.h:95
static PRM_SpareData shopAtmosphere
#define PRM_SPARE_KEY_VALUE_DICT_VALUE_LABEL_TOKEN
Definition: PRM_SpareData.h:40
static PRM_SpareData unitsAreaDensity
static PRM_SpareData unitsLinearDensityPerSquareTime
GLdouble n
Definition: glcorearb.h:2007
GLfloat f
Definition: glcorearb.h:1925
static const char * getUnitsToken()
#define PRM_SPARE_FILE_CHOOSER_MODE_TOKEN
Definition: PRM_SpareData.h:71
static PRM_SpareData chNetRef
const char * getCallbackData() const
static int getEditorLinesRangeDefaultMin()
static PRM_SpareData unitsMass
static PRM_SpareData rampBasisDefault
static PRM_SpareData unitsDrag
static PRM_SpareData objNetRef
static const char * getKeyValueDictKeyLabelToken()
GLint ref
Definition: glcorearb.h:123
#define PRM_SPARE_EDITOR_LINES_TOKEN
Definition: PRM_SpareData.h:69
static PRM_SpareData sopPath
static const char * getScriptActionIconToken()
static PRM_SpareData connectorKindInOut
static PRM_SpareData filterMaterial
static PRM_SpareData varyingDefault
static PRM_SpareData unitsLength
const char * getFloatRampDefaultValue() const
static const char * getOpPathKeywordsToken()
static PRM_SpareData unitsAngDrag
#define PRM_SPARE_COLOR_WHEEL_TOKEN
Definition: PRM_SpareData.h:66
#define PRM_SPARE_VARYING_DEFAULT_TOKEN
static PRM_SpareData shopContour
const char * getOpRelative() const
static const char * getKeyValueDictChooserCallbackToken()
static PRM_SpareData unitsTorque
static const char * getEditorLinesRangeToken()
#define PRM_SPARE_RAMP_COLOR_DEFAULT_TOKEN
Definition: PRM_SpareData.h:84
static const char * getCodeGenDependentToken()
static PRM_SpareData unitsLinearDensityPerTime
static PRM_SpareData rampKeysDefault
GLenum GLsizei GLsizei GLint * values
Definition: glcorearb.h:1601
bool getRampShowControlsDefault() const
static PRM_SpareData shopBackground
static const char * getKeyValueDictValueLabelToken()
static PRM_SpareData shopContourStore
static const char * getColorDynamicToken()
static PRM_SpareData unitsForce
GLboolean * data
Definition: glcorearb.h:130
static const char * getColorRampDefaultToken()
GLuint const GLchar * name
Definition: glcorearb.h:785
UT_Pair< const char *, const char * > PRM_SpareToken
static PRM_SpareData multiStartOffsetZero
static PRM_SpareData shopProperties
static const char * getUsdPathTypeToken()
const char * getRampBasisVar() const
static PRM_SpareData constraintsPath
unsigned int uint
Definition: SYS_Types.h:40
static const char * getRampValuesVarToken()
static const char * getGroupDefaultToken()
#define PRM_SPARE_COOK_DEPENDENT_TOKEN
Definition: PRM_SpareData.h:67
static PRM_SpareData unitsNone
static const char * getRampShowControlsDefaultToken()
void setOpFilter(const char *str)
#define PRM_SPARE_KEY_VALUE_DICT_CHOOSER_LABEL_TOKEN
Definition: PRM_SpareData.h:44
static const char * getShaderParmContextsToken()
#define PRM_SPARE_RAMP_COLOR_TYPE_TOKEN
Definition: PRM_SpareData.h:85
static PRM_SpareData ropNetRef
#define PRM_SPARE_KEY_VALUE_DICT_KEY_LABEL_TOKEN
Definition: PRM_SpareData.h:38
static PRM_SpareData unitsAcceleration
static PRM_SpareData shopGeometry
static const char * getFileChooserModeToken()
PRM_ColorType
Definition: PRM_Type.h:434
GLsizei const GLfloat * value
Definition: glcorearb.h:823
static PRM_SpareData unitsAreaDensityPerSquareTime
png_infop png_sPLT_tpp entries
Definition: png.h:2481
static PRM_SpareData shopMaterial
static PRM_SpareData chopPath
UT_ColorType
Definition: UT_Color.h:24
const char * getColorRampDefaultValue() const
void setRampBasisDefault(const char *value)
#define PRM_SPARE_PARM_VOP_TOKEN
Definition: PRM_SpareData.h:80
typedef int
Definition: png.h:1175
#define PRM_SPARE_SCRIPT_ACTION_TOKEN
Definition: PRM_SpareData.h:94
#define PRM_SPARE_SCRIPT_UNQUOTED_TOKEN
Definition: PRM_SpareData.h:97
void setRampKeysVar(const char *value)
static PRM_SpareData objCameraPath
static PRM_SpareData groupTypeSimple
void setRenderManType(const char *str)
#define PRM_SPARE_OPFILTER_TOKEN
Definition: PRM_SpareData.h:77
static PRM_SpareData shopLightShadow
static PRM_SpareData fileChooserModeWrite
#define PRM_SPARE_RAMP_SHOW_CONTROLS_DEFAULT_TOKEN
Definition: PRM_SpareData.h:89
const char * getRampValuesVar() const
png_infop png_uint_32 png_uint_32 int int * color_type
Definition: png.h:2394
const char * getRampKeysVar() const
static PRM_SpareData stringEditorLangHScript
static const char * getFloatRampDefaultToken()
static PRM_SpareData unitsDensityPerSquareTime
#define PRM_SPARE_EDITOR_LANG_TOKEN
Definition: PRM_SpareData.h:68
static PRM_SpareData unitsAngAcceleration
static PRM_SpareData shopImage3d
static PRM_SpareData stringEditorLangVex
static PRM_SpareData connectorKindOut
static int getEditorLinesRangeDefaultMax()
const char * getRenderManType() const
#define PRM_SPARE_BUTTON_ICON_TOKEN
Definition: PRM_SpareData.h:62
static const char * getColorTypeToken()
#define PRM_SPARE_RAMP_KEYS_VAR_TOKEN
Definition: PRM_SpareData.h:88
static const char * getFileChooserModeValRead()
static PRM_SpareData objBonePath
void setRampShowControlsDefault(bool value)
static PRM_SpareData shopPhotonVolume
static PRM_SpareData unitsDensity
static const char * getScriptActionHelpToken()
static PRM_SpareData autoScope
static PRM_SpareData shopLens
static const char * getUnquotedStateToken()
static PRM_SpareData shopLight
static PRM_SpareData unitsPerArea
static const char * getEditorToken()
static PRM_SpareData unitsSpringConstant
void setOpRelative(const char *str)
static PRM_SpareData lopPath
static PRM_SpareData unitsDensityPerTime
static PRM_SpareData unitsForceDensity
#define PRM_SPARE_SHADER_PARM_CONTEXTS_TOKEN
Definition: PRM_SpareData.h:98
static const char * getScriptActionToken()
png_infop png_uint_32 flag
Definition: png.h:2242
static const char * getRampBasisVarToken()
static PRM_SpareData shopSurfaceShadow
static const char * getFileChooserModeValWrite()
void setRampBasisVar(const char *value)
#define PRM_API
Definition: PRM_API.h:10
static PRM_SpareData unitsAreaDensityPerTime
#define PRM_SPARE_COLOR_DYN_TOKEN
Definition: PRM_SpareData.h:64
static PRM_SpareData shopCoShader
int(* PRM_SpareCallbackWithData)(const char *token, const char *value, void *data)
void setRampValuesVar(const char *value)
#define PRM_SPARE_USDPATHTYPE_TOKEN
Definition: PRM_SpareData.h:52
static PRM_SpareData popPath
static PRM_SpareData unitsPerTime
static PRM_SpareData objPath
CH_ScriptLanguage
#define PRM_SPARE_GROUP_TYPE_TOKEN
Definition: PRM_SpareData.h:73
static PRM_SpareData unitsVelocity
static PRM_SpareData attribAccessR
int(* PRM_SpareCallback)(const char *token, const char *value)
static PRM_SpareToken usdPathTypePrimList
#define PRM_SPARE_FILE_CHOOSER_PATTERN_TOKEN
Definition: PRM_SpareData.h:72
static PRM_SpareData fileChooserModeRead
static const char * getFileChooserModeValReadAndWrite()
#define PRM_SPARE_EDITOR_TOKEN
Definition: PRM_SpareData.h:70