HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PI_EditScriptedParms.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: PI_EditScriptedParms.h ( OP Library, C++)
7  *
8  * COMMENTS: Provides a data structure for holding all the information
9  * required to edit the parameters of a PI_ScriptOperator.
10  */
11 
12 #ifndef __PI_EditScriptedParms__
13 #define __PI_EditScriptedParms__
14 
15 #include "PI_API.h"
16 #include <UT/UT_Color.h>
17 #include <UT/UT_String.h>
18 #include <UT/UT_StringArray.h>
19 #include <UT/UT_ValArray.h>
20 #include <CH/CH_ExprLanguage.h>
21 #include <PRM/PRM_Type.h>
22 #include <OP/OP_Node.h>
23 #include <iosfwd>
24 
25 class PRM_Template;
26 class PRM_SpareData;
27 class PRM_Parm;
28 class PRM_Range;
29 class PRM_ChoiceList;
30 class PRM_ScriptImports;
31 class OP_Operator;
33 class pi_GroupData;
34 
35 #define PI_MAX_SCRIPT_PARM_SIZE 16
36 #define PI_FOLDER_DEFAULTNAME "folder0"
37 
38 typedef enum {
44 
45 typedef enum {
50 
51 typedef enum {
63 
65 
67 {
68 public:
71 
72  bool isValidChoice() const
73  {
74  return myToken.isstring() || myLabel.isstring();
75  }
78 };
79 
81 {
82 public:
84  PI_EditScriptedParm(const PRM_Template &tplate, OP_Node *node,
85  bool init_auto_links=true);
89 
90  /// Assignment operator.
91  const PI_EditScriptedParm & operator=(const PI_EditScriptedParm &src);
92 
93  void setType(const char *type)
94  {
95  myType.harden(type);
96  myCachedTypeIndex = -2;
97  }
98  const UT_String &getType() const { return myType; }
99 
100  void changeTypeToRampColor();
101  void changeTypeToRampFloat();
102 
103  // Copy default parm values from the current values on the given parameter
104  // starting at the specified subindex on that parameter (mapping it to 0
105  // on this parameter).
106  void copyDefaultValuesFromParm(PRM_Parm *parm, int subidx);
107 
108  // Resets the autolink values from one or more channels of this parm
109  // to the set of currently existing links. Setting subidx to -1 causes
110  // all channels to reset their autolinks.
111  void setAutolinksToCurrentLinks(OP_Node *node, int subidx);
112 
113  // Take the incoming list of parm or channel names and add those parms
114  // or channels to our autolink values in an intelligent way. The
115  // links array will be filled with the name of the parameter each of the
116  // parms was linked to (or an emtpy string if no link was made for that
117  // parm).
118  void addParametersToAutolink(const UT_StringArray &parms,
119  const char *nodepath,
120  bool linkinvisibles,
121  PI_EditScriptedParms *owner,
122  UT_StringArray &errors);
123 
124  void setRange(const PRM_Range &range);
125 
126  int save(std::ostream &os, int indent, OP_Operator *op,
127  bool validate_join,
128  const PI_EditScriptedParm *nextparm,
129  bool in_import_block);
130  int saveSelectors(std::ostream &os, const char *tokeni,
131  OP_Operator *op);
132  void saveSpareData(std::ostream &os,
133  const char *tokeni,
134  bool skip_import_data,
135  bool first_group_page);
136  void saveSpareValue(std::ostream &os, const char *tokeni,
137  const char *spare_token);
138  void saveConditional(std::ostream &os, int indent,
139  const char *name,
140  UT_String &conditional);
141  // Debug dump of data
142  void dump(std::ostream &os);
143 
144  int getNMenu() const { return myMenu.entries(); }
145  void addMenu(const char *token = 0, const char *label = 0);
146  void moveMenu(int idx);
147  void destroyMenu(int idx);
148  int checkNullMenu();
149  void clearMenuItems();
150  void clearCachedChannels();
151 
152  void setMenu(const PRM_ChoiceList *menu, bool minimenu);
153 
154  // Get our parm type index from our string type for use when building
155  // channels, or applying autolinks. It will return -1 for import blocks
156  // and tab folder which do not allow any of this sort of activity.
157  // The return value can be used to interface to theParmTypes array ONLY!
158  int getParmTypeIdxForChannels() const;
159  // Set the parameter size in a safe way.
160  void setSize(int size);
161 
162  // Fill the array with all the channels for this parameter.
163  void buildChannelNames(UT_StringArray &ch) const;
164 
165  // An alternate accessor to get the list of channel names. This method
166  // updates the channel name cache, if necessary, and returns a constant
167  // reference directly to the cache in an attempt to avoid the overhead of
168  // building a UT_StringArray.
169  const UT_ValArray<const char *> &getChannelNames() const;
170 
171  // Copy all the spare data for the specified folder index from the given
172  // reference data. The index is the vector index of this folder in the
173  // corresponding switcher parameter.
174  void extractGroupSpareData(const PRM_SpareData *ref,
175  int index);
176 
177  // Merges the provided spare data into our spare data.
178  void mergeSpareData(const PRM_SpareData *srcsparedata);
179 
180  const char *getSpareValue(const char *token) const;
181  void setSpareValue(const char *token, const char *value);
182  void copySpareValue(const char *token,
183  const PRM_SpareData &ref);
184 
185  const char *getCallbackData() const;
186  void setCallbackData(const char *value);
187  CH_ScriptLanguage getCallbackLanguage() const;
188  void setCallbackLanguage(CH_ScriptLanguage language);
189 
190  const char *getOpFilter() const;
191  void setOpFilter(const char *value);
192  void setOpFilter(const PRM_SpareData *spareptr);
193  const char *getRManType() const;
194  void setRManType(const char *value);
195  int getMultiStartOffset() const;
196  void setMultiStartOffset(int value);
197  void setRampColorType(UT_ColorType color_type);
198  UT_ColorType getRampColorType() const;
199  const char *getRampBasisVar() const;
200  void setRampBasisVar(const char *value);
201  const char *getRampKeysVar() const;
202  void setRampKeysVar(const char *value);
203  const char *getRampValuesVar() const;
204  void setRampValuesVar(const char *value);
205  const char *getImportSource() const;
206  void setImportSource(const char *value);
207  const char *getImportToken() const;
208  void setImportToken(const char *value);
209  const char *getImportMask() const;
210  void setImportMask(const char *value);
211  bool getImportEnable() const;
212  void setImportEnable(bool value);
213  bool getExportDisable() const;
214  void setExportDisable(bool value);
215  bool getUnquotedFlag() const;
216  void setUnquotedFlag(bool value);
217  bool getIsGroupStart() const;
218  bool getIsGroupEnd() const;
219  bool getIsGroupParm() const;
220  bool getIsMultiParm() const;
221  bool getIsRampParm() const;
222  bool getIsRampParmColor() const;
223  bool getIsRampParmFloat() const;
224  bool getIsFileParm() const;
225  bool getIsBasicStringParm() const;
226  bool getIsButtonParm() const;
227 
228  bool getIsColorParm() const;
229  PRM_ColorType getColorType() const;
230  void setColorType(PRM_ColorType color_type);
231  bool getColorWheel() const;
232  void setColorWheel(bool value);
233  bool getColorDynamic() const;
234  void setColorDynamic(bool value);
235 
236  bool getIsKeyValueDictParm() const;
237  const char *getKeyValueDictKeyLabel() const;
238  void setKeyValueDictKeyLabel(const char *label);
239  const char *getKeyValueDictValueLabel() const;
240  void setKeyValueDictValueLabel(const char *label);
241  bool getKeyValueDictUseChooser() const;
242  void setKeyValueDictUseChooser(bool use_chooser);
243  const char *getKeyValueDictChooserLabel() const;
244  void setKeyValueDictChooserLabel(const char *label);
245  const char *getKeyValueDictChooserCallback() const;
246  void setKeyValueDictChooserCallback(const char *callback);
247 
248  const char *getRampBasisDefault() const;
249  void setRampBasisDefault(const char *value);
250  bool getRampShowControlsDefault() const;
251  void setRampShowControlsDefault(bool value);
252 
253  void clearRampDefaults();
254  bool hasRampDefaultValue() const;
255  void setRampDefaultFromParm(const PRM_Parm &ramp_parm);
256 
257  const char *getFileChooserMode() const;
258  void setFileChooserMode(const char *value);
259 
260  const char *getFileChooserPattern() const;
261  void setFileChooserPattern(const char *value);
262 
263  const char *getButtonIcon() const;
264  void setButtonIcon(const char *value);
265 
266  const char *getScriptAction() const;
267  void setScriptAction(const char *value);
268  const char *getScriptActionHelp() const;
269  void setScriptActionHelp(const char *value);
270  const char *getScriptActionIcon() const;
271  void setScriptActionIcon(const char *value);
272 
273  // This utility method returns string constants.
274  static const char *getScriptType(const PRM_Type &ptype,
275  PRM_TypeExtended etype,
276  PRM_MultiType mtype, int size);
277 
278  static bool parmTypeUsesOpFilter(const char *type);
279 
280  static const char *getExportDisableToken();
281  static bool isSwitcherLevelSpareToken(const char *token);
282 
283  static PI_EditScriptedParmFolderType getSwitcherFolderType(
284  const PRM_Template &tplate);
285  static PI_EditScriptedParmFolderType getSwitcherFolderType(
286  const PRM_Type &type,
287  const PRM_SpareData *spare);
288 
296  int myExport;
297  int mySize;
299  CH_StringMeaning myDefaultsStringMeaning[
302  float myRange[2];
303  bool myRangeLock[2];
310  int myDoAutolink[PI_MAX_SCRIPT_PARM_SIZE];
313  UT_String myConditional[NB_PRM_CONDTYPES];
314  UT_String myTabConditional[NB_PRM_CONDTYPES];
321 
323  public:
324  const char *myLabel;
325  const char *myDSToken;
326  const PRM_Type &myType;
327  const char *myIcon;
328  int myExport;
329  int mySize;
330  int myMenu;
331  int myString;
332  int myRange;
333  float myMin, myMax;
334  const char *myDefault;
335  const char *mySuffix[PI_MAX_SCRIPT_PARM_SIZE];
337  };
338  static PI_ParmType theParmTypes[];
339 
340 private:
341  void defaultInit();
342  void initMenu(const PRM_ChoiceList *menu, bool minimenu);
343 
344  void updateChannelNameCache(int parmtypeidx) const;
345  void rebuildChannelNameCache(int parmtypeidx) const;
346 
347  UT_String myType;
348  mutable int myCachedTypeIndex;
349 
350  // A mutable cache for the channel names last built for this parameter,
351  // along with the settings last used to build it.
352  mutable UT_ValArray<const char *> myCachedChannelNames;
353  mutable UT_String myChannelCacheToken;
354  mutable int myChannelCacheTypeIndex;
355 
356 };
357 
359 
361 {
362 public:
364  // Use this constructor to edit spare parameters.
365  // If skip_parm_vops is true, then the parameters
366  // coming from Parameter VOPs (ramp, etc) will
367  // not be included in the list, otherwise they will be.
368  // If allow_switch_rename is true then the
369  // switcher (folder) names will be changed to a uniuqe
370  // name, so that they are not marked as reserved,
371  // otherwise, if false, such names will remain
372  // unchanged (usually renaming is desirable, because
373  // having reserved switchers confuses things and
374  // makes them uneditable, but other times all
375  // parameters should keep their original names).
377  bool add_reserved_parms,
378  bool init_auto_links,
379  bool skip_parm_vops = false,
380  bool allow_switch_rename = true);
381  // Use this constructor to edit DA parameters.
382  // You can optionally include spare parameters
383  // anyway but with this constructor, DA parameters
384  // are not treated as reserved parameters.
386  OP_Node *node,
387  bool add_reserved_parms,
388  bool spareparms=false,
389  bool skip_parm_vops=false);
390  // Use this constructor to edit optype override
391  // parameters. Base and DA parameters are treated as
392  // reserved parameters.
394  bool add_reserved_parms,
395  bool skip_parm_vops=false);
396  // Get parameters from a dialog script.
397  // The node is just a reference used to determine
398  // what parameters should be reserved.
400  UT_IStream &is,
401  bool spareparms,
402  bool skip_reserved,
403  bool init_auto_links,
404  bool fix_invalid_joins);
405  // Get parameters from a array of parm templates.
406  // The node is just a reference used to determine
407  // what parameters should be reserved.
409  const PRM_Template *tplate,
410  bool spareparms,
411  bool skip_reserved,
412  bool init_auto_links);
413  // Copy constructor.
416 
417  // Merge the contents of another PI_EditScriptedParms into this one.
418  // The only change to the parms being merged is to resolve conflicts
419  // with existing parm names, and ensure no reserved parm names are used.
420  // The new parms are always added to the end of the current parms. The
421  // reserved flag from the source parms is preserved, so be careful when
422  // merging parameters from different sources.
423  void mergeParms(const PI_EditScriptedParms &src);
424 
425  // Remove all our parameters.
426  void clearParms();
427 
428  // Save the parms in dialog script format.
429  int save(std::ostream &os, UT_String &warnings,
430  bool validate_joins);
431 
432  // Dump the parameters, in a meaningless format, but useful for debugging.
433  void dump(std::ostream &os);
434 
435  // Compile these parameters, which means eliminating all information
436  // about the parameters that is not absolutely required for proper
437  // functioning.
438  void compile();
439 
440  // Get our individual parms.
441  PI_EditScriptedParmArray &getParms() { return myParms; }
442  int getNParms() const;
443  PI_EditScriptedParm *getParm(int i);
444  int getParmIndexWithName(const char *name);
445  PI_EditScriptedParm *getParmWithName(const char *name);
446  int getParmIndex(PI_EditScriptedParm *p);
447  int getFolderIndexWithLabel(const char *label);
448  PI_EditScriptedParm *getFolderWithLabel(const char *label);
449 
450  // Remove all folder group parameters that do not contain any
451  // regular parameters (not folder groups and not separators).
452  void removeEmptyFolders();
453 
454  // Given a list of folder names, return the index of the start of the
455  // innermost folder, or -1 if there is no such folder.
456  int getNestedFolderIndex(
457  const UT_StringArray &folder_labels);
458 
459  // Given the index of a parameter, return the parms corresponding to the
460  // containing folders.
461  void getContainingFolders(
462  int parm_index,
464 
465  // Find a parm that already has a particular autolink.
466  PI_EditScriptedParm *getParmWithAutolink(const char *channelpath,
467  const char *nodepath,
468  int *linkedsubidx = 0);
469 
470  // For a group start parm or group end parm, find the opposite end of
471  // that group. Otherwise return -1.
472  int getMatchingGroupParm(int parm) const;
473 
474  // Returns true if the group parameter specified is the first page
475  // in a series of folders.
476  bool getIsFirstPage(int parm) const;
477 
478  // Returns the position of the group parameter that contains the specified
479  // parameter. If there is no parent group parameter, -1 is returned.
480  int getParentGroupParm(int parm);
481 
482  // Get information about the menu associated with a particular parameter.
483  int getNMenu(int parm);
484  PI_EditScriptedParmMenu *getMenu(int parm, int i);
485  const char *getMenuScript(int parm);
486 
487  // Test if a parameter can be moved from srcidx to dstidx. For example,
488  // a folder start token is not allowed to be moved beyond a corresponding
489  // end token. Returns true if parm move is allowed, false otherwise.
490  bool isParmMoveAllowed(int first, int last, int offset);
491 
492  // Add, remove, and reorder parameters.
493  bool updateNode();
494  void addParm(PI_EditScriptedParm *parm);
495  bool moveParms(int first, int last, int offset,
496  bool remove_invalid_groups=true);
497  void moveParms(const UT_IntArray &movingparms, int destpos,
498  bool remove_invalid_groups=true);
499 
500  // Adds parms for the multiparm templates attached to the specified
501  // parm. This function works recursively if the multiparm templates
502  // contain other multiparms.
503  void insertMultiParmTemplates(const PRM_Template *tplate,
504  const char *parentparmname,
505  const OP_Node *linktonode,
506  const char *nameprefix,
507  const char *labelprefix,
508  int insertat);
509 
510  // Apply a permutation to a block of parameters. This method only does
511  // sanity checking on the permutation itself, and not on the parameters
512  // themselves, so use it with caution. For example, don't screw up the
513  // order of group begin and end entries.
514  //
515  // The permutation array must consist of a permutation of the indicies
516  // [first..(first + permutation.entries() - 1)].
517  //
518  // The operation applied is basically:
519  // new_parms(first+i) = old_parms(permutation(i))
520  void permuteParms(int first,
521  const UT_IntArray &permutation);
522 
523  // If we are told to remove a group start or end parm, we automatically
524  // remove the opposite end of that group. Returns the number of parms
525  // removed.
526  int removeParms(int first, int last, bool remove_invalid_joins=true);
527 
528  // joins cannot occur over folder boundaries, or at the end of the parm
529  // list.
530  void removeInvalidJoins();
531 
532  // Copy default parm values from the current values on the specified node.
533  void copyDefaultsFromNode(OP_Node *node);
534 
535  int checkReservedName(const char *name) const;
536  bool containsReservedParm() const;
537  void initializeReserveNames(OP_Parameters *node);
538  void initializeReserveFlags();
539  void clearReserveNamesAndFlags();
540  void makeSafeParmName(PI_EditScriptedParm *parm,
541  UT_String &parmname,
542  const UT_StringSet *extrareserved,
543  bool checkexistingparms);
544 
545  // Set all autolink values for all parameters to the current set of
546  // links.
547  void setAutolinksToCurrentLinks();
548 
549  // Take the list of parm or channel names and add those parms or channels
550  // to the autolink fields of the appropriate PI_EditScriptedParm. The
551  // links array will be filled with the name of the parameter each of the
552  // parms was linked to (or an emtpy string if no link was made for that
553  // parm).
554  void addParametersToAutolinks(PI_EditScriptedParm &destparm,
555  const UT_StringArray &parms,
556  const char *nodepath,
557  bool linkinvisibles,
558  PI_EditScriptedParmArray &changedparms,
559  UT_StringArray &errors);
560 
561  // Makes sure that none of our parm names contain too many hashes for
562  // the multiparm instance level they are at. This is called right before
563  // saving. Extra hashes are converted to underscores.
564  void fixParmNamesForInstanceLevel();
565 
566  // Turn the auto link values from all our parms into channel references
567  // on the appropriate nodes. The function is not const because it actually
568  // changes the auto link values.
569  void applyAutoLinks(UT_StringArray &errors,
570  OP_NodeList &changednodes,
571  UT_IntArray &changedparms);
572 
573  // The applyAutoLinks call happens before the node's templates are
574  // updated. So after updating the templates, we need to force any
575  // changed nodes to rebuild their dependencies and recook.
576  void updateNodesFromApplyAutoLinks(
577  OP_NodeList &changednodes,
578  UT_IntArray &changedparms);
579 
580  // This function is called whenever a node's name is changed. It goes
581  // through all our parm's auto links and changes any references from the
582  // old node name to the new node name.
583  bool updateAutoLinksForNameChange(
584  const UT_String &refnodepath,
585  const UT_String &oldpath,
586  const UT_String &newpath);
587 
588  // Gets the node that is associated with these parms. This value is
589  // used for finding and setting parameter links, and detecting parm
590  // name conflicts.
591  OP_Node *getNode() const;
592 
593  // These functions are used to control the table of multiparm link
594  // information used by piGetCurrentLinks.
595  static void buildMultiparmInfo(OP_Node *refnode);
596  static void clearMultiparmInfo();
597  static void lockMultiparmInfo();
598  static void releaseMultiparmInfo();
599  static const PI_BuiltMultiParmInfo &getBuiltMultiparmInfo();
600 
601  // Adds additional links so that dstparm has the additional links to the
602  // srcchannel. They must be both ramp parameters of the same type
603  // designated by is_color_ramp.
604  static void addRampAutoLinks(
605  OP_Node *dstnode,
606  PRM_Parm *dstparm,
607  const char *dstchannel,
608  const char *srcrelpath,
609  const char *srcchannel,
610  bool is_color_ramp,
611  UT_String &error);
612  /// Deletes ramp references added via addRampAutoLinks()
613  static void deleteRampAutoLinks(
614  OP_Node *dstnode,
615  PRM_Parm *dstparm,
616  const char *dstchannel,
617  bool is_color_ramp,
618  UT_String &error,
619  bool also_revert = false);
620 
621 private:
622  // Returns a pointer to the base parm templates, which is the myBase
623  // member if editing HDA parms, or the operator templates if editing
624  // spare parameters.
625  const PRM_Template *getBaseParmTemplates() const;
626  // Returns a pointer to the base parm template (if any) that matches
627  // the supplied parameter name.
628  const PRM_Template *getBaseParmTemplate(const char *parmname) const;
629 
630  // This utility function helps makeSafeParmName generate a list of all
631  // multiparm instance parms in this PI_EditScriptedParms.
632  void buildMParmInst(PI_EditScriptedParm *skipparm,
633  UT_StringArray &mparminst,
634  UT_IntArray &mparmlvl) const;
635 
636  // This utility function figures out the depth of multiparm nesting
637  // for the specified parm.
638  int getMultiParmInstanceLevel(
639  PI_EditScriptedParm *parm) const;
640 
641  // Utility function for makeSafeParmName which recursively checks a
642  // PRM_Template array (and any multiparm templates in that array) for
643  // conflicting parm names.
644  bool conflictsWithTemplate(const PRM_Template *tplate,
645  const UT_StringArray &mparmtplates,
646  const UT_StringArray &channels,
647  const UT_StringArray &mparminst,
648  const UT_IntArray &mparmlvl) const;
649 
650  void createImportGroups(int offset,
651  UT_Array<pi_GroupData> &gstack,
652  const PRM_ScriptImports *imports,
653  int &import_index);
654  void createImportGroupsBeforeGroupEnd(
655  int offset, int depth,
656  int switcher_index, int folder,
657  const PRM_ScriptImports *imports,
658  int &import_index);
659  void createParms(const PRM_Template *tplates,
660  const PRM_ScriptImports *imports,
661  bool skip_reserved,
662  bool init_auto_links = true,
663  bool skip_parm_vops = false,
664  bool allow_switch_rename = true);
665  void createParms(UT_ValArray<const PRM_Template *> &tplates,
666  const PRM_ScriptImports *imports,
667  bool skip_reserved,
668  bool init_auto_links = true,
669  bool skip_parm_vops = false,
670  bool allow_switch_rename = true);
671  void removeInvalidGroups(int startpos);
672 
673  void saveGroupHeader(std::ostream &os, int index,
674  bool first_page,
675  int &glevel,
676  int &import_depth,
677  bool &in_import_block);
678  void saveGroupFooter(std::ostream &os, int index,
679  int &glevel,
680  int &import_depth,
681  bool &in_import_block);
682  void saveImportHeader(std::ostream &os, int index,
683  int &glevel,
684  int &import_depth,
685  bool &in_import_block);
686  void saveImportFooter(std::ostream &os, int index,
687  int &glevel,
688  int &import_depth,
689  bool &in_import_block);
690  void saveMultiParmHeader(std::ostream &os, int index,
691  int &glevel,
692  int &import_depth,
693  bool &in_import_block);
694  void saveMultiParmFooter(std::ostream &os, int index,
695  int &glevel,
696  int &import_depth,
697  bool &in_import_block);
698 
699  PI_EditScriptedParmArray myParms;
700  UT_StringSet myReservedParmNames;
701  OP_Operator *myOp;
702  int myNodeId;
703  bool myIsEditingSpareParms;
704  bool myIsEditingOverrideParms;
705 };
706 
707 
708 // ============================================================================
709 // Abstracts edited parameters that may come from different nodes.
711 {
712 public:
715 
716  /// @{ Methods corresponding to the PI_EditScriptedParms class.
717  int getNParms() const;
718  PI_EditScriptedParm * getParm(int parm_idx);
719  OP_Node * getNode(int parm_idx);
720  int getMatchingGroupParm(int parm_idx) const;
721  int removeParms(int first_parm_idx, int last_parm_idx);
722  /// @}
723 
724  /// Gets list containing i-th parameter.
725  PRM_ParmList * getParmList(int parm_idx);
726 
727  /// Copies the member parameters to the given parms.
728  void copyToParms( PI_EditScriptedParms &parms ) const;
729 
730 protected:
731  /// @{ Node and parm management methods for subclasses.
732  void appendToAggregate(OP_Node *node, PI_EditScriptedParms* parms);
733  int getAggregateCount() const;
734  OP_Node * getAggregateNode(int src_idx ) const;
735  PI_EditScriptedParms* getAggregateParms(int src_idx ) const;
736  /// @}
737 
738 private:
739  int getParmIndex( int node_idx, int parm_sub_idx ) const;
740  void getNodeAndParmIndices( int &node_idx, int &parm_sub_idx,
741  int parm_idx ) const;
742 
743 private:
744  // Nodes the parameters come from.
745  UT_ValArray<OP_Node *> mySrcNodes;
746 
747  /// Each entry contains parms from a corresponding OP in mySrcNodes list.
749 };
750 
751 #endif
752 
GLint first
Definition: glcorearb.h:404
PI_EditScriptedParmMenuEnable
#define PI_MAX_SCRIPT_PARM_SIZE
GLenum GLint * range
Definition: glcorearb.h:1924
GLuint GLsizei const GLchar * label
Definition: glcorearb.h:2544
CH_StringMeaning
PI_EditScriptedParmFolderType
UT_ValArray< PI_EditScriptedParm * > PI_EditScriptedParmArray
#define PI_API
Definition: PI_API.h:10
png_uint_32 i
Definition: png.h:2877
PI_EditScriptedParmMenuType
GLsizeiptr size
Definition: glcorearb.h:663
void setType(const char *type)
PI_EditScriptedParmMenuType myMenuType
GLint GLint GLsizei GLsizei GLsizei depth
Definition: glcorearb.h:475
const UT_String & getType() const
GLint ref
Definition: glcorearb.h:123
PI_EditScriptedParmArray & getParms()
GLintptr offset
Definition: glcorearb.h:664
UT_ValArray< PI_EditScriptedParmMenu * > myMenu
GLuint const GLchar * name
Definition: glcorearb.h:785
PRM_SpareData * mySpareData
PI_EditScriptedParmFolderType myFolderType
UT_SymbolMap< UT_StringArray * > PI_BuiltMultiParmInfo
PRM_ColorType
Definition: PRM_Type.h:434
GLsizei const GLfloat * value
Definition: glcorearb.h:823
UT_ColorType
Definition: UT_Color.h:24
PRM_TypeExtended
Definition: PRM_Type.h:508
png_infop png_uint_32 png_uint_32 int int * color_type
Definition: png.h:2394
GLuint index
Definition: glcorearb.h:785
CH_ScriptLanguage myMenuScriptLanguage
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
PI_EditScriptedParmMenuEnable myMenuEnable
PRM_MultiType
This type enum defines the different types of multi (dynamic) parameters.
Definition: PRM_Type.h:417
CH_ScriptLanguage
GLenum src
Definition: glcorearb.h:1792