HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OP_Network.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: OP Library (C++)
7  *
8  * COMMENTS:
9  *
10  */
11 
12 #ifndef __OP_Network_h__
13 #define __OP_Network_h__
14 
15 #include "OP_API.h"
16 #include "OP_DotList.h"
17 #include "OP_GroupList.h"
18 #include "OP_NetworkBox.h"
19 #include "OP_NetworkBoxList.h"
20 #include "OP_Node.h"
21 #include "OP_PostIt.h"
22 #include "OP_PostItNoteList.h"
23 #include <UT/UT_Array.h>
24 #include <UT/UT_ValArray.h>
25 #include <UT/UT_Set.h>
26 #include <UT/UT_String.h>
27 #include <UT/UT_SymbolTable.h>
28 #include <SYS/SYS_Types.h>
29 #include <iosfwd>
30 #include <set>
31 
32 class UT_CPIO;
33 class UT_WorkBuffer;
34 class UT_StringArray;
35 class OP_Director;
36 class OP_Dot;
37 class OP_Group;
38 class OP_Operator;
39 class OP_OperatorTable;
40 class OP_ProxyRefNode;
42 class OP_UndoLoad;
43 class op_PathSet;
44 class MOT_Director;
45 
47 
49 
50 // The tile type is used to distinguish between the various types of
51 // nodes that the networks are starting to contain.
53 {
54  OP_TILE_ALL = 0xFF,
55  OP_TILE_NODE = 0x01, // The regular op nodes
56  OP_TILE_PARENT = 0x02, // The parent inputs for subnets
57  OP_TILE_GROUP = 0x04, // The op groups
58 
59  // These are for convenience
63 };
64 
65 // If you are looking for the OBJ_TABLE_NAME, SOP_SCRIPT_NAME, and
66 // POP_OPTYPE_NAME style #defines that used to be here, they have been moved up
67 // to OP_Node.h.
68 
70 {
71  OP_RENAME_NO_PROPAGATE = 0x00, // does no propagation
72  OP_RENAME_NORMAL = 0x01, // does all propagation
73  OP_RENAME_NO_EVENTS = 0x02, // does not send op events AND
74  // does not re-export chops
75  OP_RENAME_NO_DEPENDENCIES = 0x04, // does not notify dependencies
76 
78 };
79 
81 {
83  {
84  replacePrefix = 0;
85  replaceSuffix = 0;
87  }
88 
96 
97 private:
98  // copy constructors are not implemented yet
100  OP_FixNameParms &operator =( const OP_FixNameParms &copy );
101 };
102 
103 // This class is used to filter OP_Operators from being instantiated
104 // and shelf tools from appearing in the Tab menu.
106 {
107  public:
109  virtual ~OP_OperatorFilter() { }
110 
111  /// Returns true if an operator type can be created as a child, and
112  /// false otherwise.
113  virtual bool allowOperatorAsChild(OP_Operator *) { return true; }
114 
115  /// Returns true if a shelf tool by the given name can appear
116  /// in the Tab menu for that (parent) network.
117  virtual bool allowTool(const char *tool_name) { return true; }
118 };
119 
120 typedef void *(OP_Network::*OP_FindItemFunc) (const char *);
121 
122 class OP_API OP_Network : public OP_Node
123 {
124 public:
125  static const char *getScriptFromTable(const char *table);
126  static const char *getOpTypeFromTable(const char *table);
127 
128  // Primary node access methods. Only take OP_Node's into consideration
129  virtual int getNchildren() const;
130  virtual OP_Node *getChild(const char *name=0, int *hint=0) const;
131  virtual OP_Node *getChild(int index) const;
132  virtual int getChildIndex(const OP_Node *) const;
133 
134  // isNetwork returns if the node can have children. This is true
135  // if the node has an operator table or has any children.
136  // This does NOT tell you if it is derived from OP_Network.
137  virtual int isNetwork() const;
138 
139  virtual int getDandROpsEqual();
140  virtual int updateDandROpsEqual(int check_inputs = 1);
141 
142  // This method a node within the network's UT_ValArray of children
143  // dstindex can be any number between 0 and childcount + 1.
144  // dstindex refers to the index of the child before which the
145  // src node should be moved. Right now, it is only used by OPUI_OpList.
146  // As soon as it is used elsewhere, we'll have to add OP_Events for it.
147  virtual void moveChildIndex(int srcindex, int dstindex);
148 
149  // These work the same as getOpType* but return what sort of ops
150  // this network usually has as children. Of course, there's
151  // always the chance of heterogenous ops skulking around in there
152  // so treat it as a guideline rather than an assertion.
153  virtual const char *getChildType() const;
154  virtual OP_OpTypeId getChildTypeID() const = 0;
155 
156  int getTemplateOps(UT_ValArray<OP_Node *> &list);
157 
158  // obtains the children that match a given operator name.
159  // INPUTS:
160  // op_name - the name of a operator to look for (e.g., "object_merge")
161  // OUTPUTS:
162  // list - the list of children that are instances of an operator
163  // that is identified by op_name
164  // RETURNS:
165  // number of children in the output list
166  int getOpsByName(const char *op_name,
167  UT_ValArray<OP_Node *> &list);
168 
169  OP_Node *peekCurrentNodePtr();
170  OP_Node *getCurrentNodePtr();
171 
172  void stashCurrentNodePtr(const OP_Node *child);
173  OP_Node * getStashedCurrentNodePtr() const;
174 
175  virtual OP_Node *getDisplayNodePtr();
176  virtual OP_Node *getRenderNodePtr();
177  virtual CHOP_Node *getAudioNodePtr();
178  virtual const UT_ValArray<OP_Node *> &getOutputNodePtrs() const;
179 
180  virtual void childDeleted(OP_Node *);
181  virtual void childFlagChange(OP_Node *);
182 
183  fpreal getChildrenScale() const { return myChildScale; }
184  void setChildrenScale(fpreal scale);
185 
186  // Returns the OP_OperatorFilter object for this network. Used to
187  // filter out some OP_Operator types. See OP_OperatorFilter above.
188  virtual OP_OperatorFilter *getOperatorFilter();
189 
190  /// Obtains the namespace scope names for this network and for its parents,
191  /// all aranged in a stack array, with this network's name first in the
192  /// array, and the node hierarchy root (director) appearing last.
193  /// By convention, the scope name is the same as the network operator name
194  /// (with the table name).
195  void getNetworkScopeStack(UT_StringArray &scope_stack);
196 
197  /// Returns true if the given op can be created as a child of this network.
198  bool isOperatorAllowedAsChild(OP_Operator *op);
199 
200  /// Returns true if the given tool can appear in the Tab menu for this net.
201  bool isToolAllowed(const char *tool_name);
202 
203  /// Adds a new OP_Node of the specified type as a child of this node.
204  /// If 'name' is not given, then it will use 'type' suffixed with a unique
205  /// numeric suffix. In either case, if the 'name' collides with a
206  /// pre-existing node, then the actual node will be created with a unique
207  /// name created by numeric suffixing.
208  /// @param exact_type If true, the operator name parameter 'type',
209  /// is used verbatim to lookup the operator. Otherwise,
210  /// a preferred operator name that matches 'type'
211  /// specification is found first and then is used to lookup
212  /// the operator. The preferred type may be different than
213  /// 'type' for version namespace (eg "hda"
214  /// may match the preferred "hda::2.0" operator), for
215  /// scope namespace (eg "hda" may match
216  /// "Object/outer::hda" inside "outer" subnet), or for
217  /// operator namespace (eg, "userX::hda" may be preferred
218  /// to "hda", if the namespace hierarchy is so configured
219  /// that "userX" namespace trumps the top level (global)
220  /// namespace).
221  OP_Node *createNode(const char *type, const char *name = 0,
222  int notify = 1, int explicitly = 1,
223  int loadcontents = 1,
224  int *aliasedScriptedOp = 0,
225  char *matIconFilename = 0,
226  bool exact_type = false);
227 
228  /// Convenience method for requesting en exact type
230  const char *name = 0)
231  {
232  return createNode(type, name, 1, 1, 1, 0, 0, true);
233  }
234 
235  // Create dummy reference proxy nodes for dangling references
236  // This should only be called from OP_Node!
237  virtual OP_Network *createProxyRefNode( const char *path );
238 
239 
240  // Returns the list of nodes eligible to be considered for child
241  // errors.
242  virtual void getPotentialChildErrorNodes(OP_NodeList &nodes) const;
243 
244  // Makes a copy of a single node inside this network. The source node does
245  // not need to be inside this network.
246  OP_Node *copyNode(const OP_Node *srcnode,
247  const char *toname = NULL,
248  bool reference_parameters = false);
249 
250  // Makes a copy of any number of network items inside this network. The
251  // source items must all be contained in a single network, but it does
252  // not need to be this network.
253  bool copyItems(const OP_NetworkBoxItemList &srcitems,
254  OP_NetworkBoxItemList &destitems,
255  bool reference_parameters,
256  bool relative_references,
257  bool connect_outputs_to_multi_inputs);
258 
259  // Makes a copy of all picked network items into this network. The source
260  // network does not need to be this network.
261  void copyPickedItems(
262  const OP_Network *srcnet,
263  OP_ItemTypeMask item_type_mask,
264  OP_Group *newnodes = nullptr,
265  const OP_FixNameParms *fix_name_parms=nullptr);
266 
267  // Copy 'srcnetbox' and its contents to this network. 'toname' specifies
268  // the name you'd like the copy to have. If this name has already been
269  // taken in this network, we'll use a slightly altered unique version of
270  // it. 'nodes' may only be non-null when 'save_type' is
271  // OP_NETWORKBOX_SAVE_SPECIFIED_CONTENTS, in which case it must be a valid
272  // ptr array of nodes in 'netbox'.
273  OP_NetworkBox *copyNetworkBox(OP_NetworkBox *srcnetbox,
274  OP_NetworkBoxSaveType save_type,
275  OP_NodeList *nodes = NULL,
276  const char *toname = NULL,
277  bool reference_parameters = false);
278 
279  // Copy a single post-it note into this network. The source post-it does
280  // not need to be in this network.
281  OP_PostIt *copyPostItNote(OP_PostIt *src_note,
282  const char *toname = 0);
283 
284  // Makes a copy of all picked nodes into this network. The source network
285  // does not need to be this network.
286  void copyPickedNodes(const OP_Network *srcnet,
287  OP_Group *newnodes=0,
288  const OP_FixNameParms *fix_name_parms=0);
289 
290  // Moves the picked nodes from srcnet into this network.
291  // If src_nodes_ptr and dest_nodes_ptr are not null, they will be set
292  // to the original node pointers and the new node pointers. (The nodes
293  // in src_nodes_ptr will have been deleted.)
294  virtual bool movePickedNodes(OP_Network *src_net,
295  OP_NodeList *src_nodes_ptr=NULL,
296  OP_NodeList *dest_nodes_ptr=NULL);
297 
298  /// Returns true if it is safe at this time to destroy this node.
299  static bool canDestroyNode(OP_Node *node);
300 
301  int destroyNode(OP_Node *node);
302  int destroyNodes(const OP_NodeList &nodes);
303 
304  virtual int renameNode(OP_Node *node, const char *name,
306 
307  /// Obtains the CHOP network to store motion effects. If create is true,
308  /// then it will be created if it doesn't exist yet.
309  OP_Network *findOrCreateMotionEffectsNetwork(bool create=true);
310 
311  // Delete implicit ancestors. If included is true delete the initial given
312  // node as well. If a state name is passed in, check that the nodes were
313  // created by that state. The node is not deleted if any of its outputs do
314  // not match the given state. This function will have no effect on nodes
315  // not belonging to this network, or on subnetworks. The deletion will
316  // stop at the first invalid node (if keep_node points to anything, that
317  // node is invalid for deletion).
318  OP_Node *deleteImplicitAncestors(OP_Node &node,
319  const char *state = 0, OP_Node *keep_node = 0,
320  bool included = true);
321  // non-destructive version of deleteImplicitAncestors() that just returns
322  // the information.
323  OP_Node *getImplicitAncestors(
324  OP_NodeList &implicit_nodes,
325  OP_NodeList &border_nodes,
326  OP_Node &node,
327  const char *state = 0, OP_Node *keep_node = 0,
328  bool included = true);
329 
330  // Fetch all channel collections from this node down.
331  int getAllCollections(UT_ValArray<CH_Collection *> &list,
332  int hide=0);
333 
334  /// Build a unique node name or a unique operator name from
335  /// the one given. We'll pretend we also have children with the names in
336  /// 'fakeChildren' when we do our name-collision checking if 'fakeChildren'
337  /// is non-NULL.
338  void uniqueNodeName(UT_String &name,
339  UT_StringSet *fakeChildren = 0);
340 
341  // This function is used to make some extra names invalid. Returns 0
342  // by default. Used by the VOPNET manager to prevent a new VOPNET
343  // with a name that matches an existing operator type.
344  virtual int isInvalidName(const char *name);
345 
346  static void fixName( const char *name,
347  const OP_FixNameParms &fix_name_parms,
348  UT_String &fixed_name );
349 
350  // I/O methods - there are also the save & load inherited from the
351  // OP_Node class.
352 
353  ///Save all picked items of the types specified by 'item_type'. Note that
354  ///saving any nodes or netboxes implicitly always saves indirect inputs if
355  ///they're picked (legacy behaviour). If 'item_type' includes netboxes, you
356  ///can specify the save policy for netboxes regarding how much of their
357  ///contents they should be saved along with themselves. This is the only way
358  ///for a node to remember which netbox it was in.
359  OP_ERROR savePickedItems(std::ostream &os,
360  const OP_SaveFlags &flags,
361  OP_ItemTypeMask item_type,
362  OP_NetworkBoxSaveType save_type =
364 
365  ///Save all items of the types specified by 'item_type'. Note that
366  ///saving any nodes or netboxes implicitly always saves indirect inputs if
367  ///they're picked or part of a picked netbox (legacy behaviour).
368  OP_ERROR saveAllItems(std::ostream &os,
369  const OP_SaveFlags &flags,
370  OP_ItemTypeMask item_type);
371 
372  // Saves a single node with the same save options on the child nodes
373  // as on the top level node, with the exception of network box membership
374  // for children (which should always be saved)
375  OP_ERROR saveSingle(std::ostream &os, OP_Node *op,
376  const OP_SaveFlags &flags,
377  const UT_String &name_override = UT_String());
378  // Saves a single node with different save options for the child nodes
379  // compared to the top level node.
380  OP_ERROR saveSingle(std::ostream &os, OP_Node *op,
381  const OP_SaveFlags &flags,
382  const OP_SaveFlags &childflags,
383  std::set<int>* renaming_exclude_ids = NULL,
384  const UT_String &name_override = UT_String());
385 
386  ///Saves a single netbox. 'save_type' lets you specify the save policy
387  ///with regards to how much of its contents the network box saves with it.
388  ///'nodes' may only be non-null when 'save_type' is
389  ///OP_NETWORKBOX_SAVE_SPECIFIED_CONTENTS, in which case it must be a valid
390  ///ptr array of nodes in 'netbox'.
391  OP_ERROR saveSingleNetworkBox(std::ostream &os,
392  OP_NetworkBox &netbox,
393  const OP_SaveFlags &flags,
394  OP_NetworkBoxSaveType save_type,
395  OP_NodeList *nodes = NULL);
396 
397  /// Save a single post it note.
398  OP_ERROR saveSinglePostIt(std::ostream &os, OP_PostIt &pnote,
399  const OP_SaveFlags &flags);
400 
401  /// Save a single dot.
402  OP_ERROR saveSingleDot(std::ostream &os, OP_Dot &dot,
403  const OP_SaveFlags &flags);
404 
405  ///In order to avoid duplicately saving nodes in 'op_list' that have already
406  ///been saved by their netboxes, make sure to mark those netboxes and then
407  ///pass in 'skip_nodes_in_marked_netboxes' as true.
408  OP_ERROR saveOpList(std::ostream &os,
409  const UT_ValArray<OP_Node *> &op_list,
410  const OP_SaveFlags &save_flags,
411  int *nsaved = NULL);
412 
413  //Use when saving a mixture of different types of items into 1 file
414  OP_ERROR saveItemList(std::ostream &os,
415  const OP_NetworkBoxItemList &items,
416  const OP_SaveFlags &save_flags);
417 
418  const char *getClipboardFile(const char *file_prefix = 0);
419 
420  //Note that although we now have an OP_ItemTypeMask parameter available to
421  //us, we still need to keep the OP_TileType parameters to indicate saving
422  //of groups *boo*
423  int saveToClipboard(int all, OP_TileType type=OP_TILE_NODE,
424  int grouplist=0,
425  OP_ItemTypeMask item_type = OP_ITEMTYPE_NODE,
426  const char *file_prefix = 0);
427  int loadFromClipboard(fpreal x = 0, fpreal y = 0,
428  bool turn_off_display = false,
429  const char *file_prefix = 0);
430 
431  // loadNetwork will load nodes into the current net. For example,
432  // if there file is "foo.sops", you would call obj->loadNetwork().
433  // if the file were "foo.obj", you would call obj->getParent()->loadNetwork
434  bool loadNetwork(UT_IStream &is,
435  int merge = 0,
436  const char *pattern = NULL,
437  int overwrite = 0,
438  const OP_FixNameParms *fix_name_parms = NULL,
439  UT_StringArray *src_names = NULL,
440  UT_StringArray *dest_names = NULL);
441 
442  bool pasteNetworkForMove(UT_IStream &is,
443  UT_StringArray &src_names,
444  UT_StringArray &dest_names);
445 
446  virtual bool opShouldHandleChange(OP_EventType reason);
447 
448  static bool isOpWritten(UT_IStream &is);
449 
450  virtual void clearUnreferencedInputs();
451 
452  /// Check a stream for collisions for loading... This will add the
453  /// problem nodes to 'node_list' and the problem network boxes to
454  /// 'netbox_list', and also return the total number of collisions found...
455  /// It rewinds the stream to the starting point, thus, it can't be used with
456  /// stdin! Remember that a node can collide with a network box, since they
457  /// share the same namespace!
458  int getLoadCollisions(UT_IStream &is, OP_NodeList &node_list,
459  UT_ValArray<OP_NetworkBox *> &netbox_list,
460  UT_ValArray<OP_PostIt *> &pnote_list,
461  const char *pattern = "*");
462 
463  /// Simulates adding items with the names in 'names' to this network, and
464  /// stores the resulting names after name-collisions have been addressed
465  /// back into 'names'. This works for anything sharing the node namespace,
466  /// which currently includes nodes and network boxes.
467  void simulateNameCollisions(UT_StringArray &names);
468 
469  // The getSortedList() returns an array of all the child nodes sorted
470  // alphabetically.
471  const UT_ValArray<OP_Node *> *getSortedList();
472 
473  // getAnyOutputOf will return the first OP found which is has the
474  // given OP as an input. Returns null if no such op exists.
475  OP_Node *getAnyOutputOf(OP_Node *op) const;
476 
477  // getAnyOP will return any OP in the collection.
478  // Null if there are none.
479  OP_Node *getAnyOP() const;
480 
481  // Group manipulation methods:
482  char *findUniqueGroupName(const char *basename=0);
483  OP_Group * findGroup(const char *name) const;
484  OP_Group * createGroup(const char *name=0);
485  int destroyGroup(const char *name);
486  int destroyGroup(OP_Group *group);
487 
488  int getNgroups() const;
489  OP_Group *getGroup(int index) const;
490  int getGroups(UT_ValArray<OP_Group *> &list, int internal=0);
491  int getMemberships(const OP_Node *node,
493  int internal=0);
494 
495  char *findUniqueNetworkBoxName(const char *base = NULL);
496  char *findUniquePostItNoteName(const char *base = NULL);
497  char *findUniqueDotName(const char *base = NULL);
498 
499  /// Pass in NULL as the name if you'd like a default name. Passing in
500  /// 'items' will automatically create a network box containing those items
501  /// with the netbox positioned properly around them
502  OP_NetworkBox *createNetworkBox(const char *name,
503  OP_NetworkBoxItemList *items = NULL);
504  int getNnetworkBoxes() const;
505  // Given a path, return the network box. The path may be relative.
506  virtual OP_NetworkBox *findNetworkBox(const char *const_path);
507  // Unlike 'findNetworkBox()', these 2 methods only return netboxes
508  // contained directly in this network itself.
509  OP_NetworkBox *getNetworkBox(int index) const;
510  OP_NetworkBox *getNetworkBox(const char *name) const;
511 
512  /// Pass in NULL as the name if you'd like a default name.
513  OP_PostIt *createPostItNote(const char *name);
514  int getNpostItNotes() const;
515  // Given a path, return the post it note. The path may be relative.
516  virtual OP_PostIt *findPostItNote(const char *const_path);
517  // Unlike 'findPostItNote()', these 2 methods only return postits
518  // contained directly in this network itself.
519  OP_PostIt *getPostItNote(int index) const;
520  OP_PostIt *getPostItNote(const char *name) const;
521 
522  // Dots are not meant to be referenced by name.
524  { return myDotList; }
525  int getNdots() const;
526  // Given a path, return the post it note. The path may be relative.
527  virtual OP_Dot *findDot(const char *const_path);
528  OP_Dot *getDot(int index) const;
529  OP_Dot *getDot(const char *name) const;
530 
531  /// Return the number of items picked. 'item_type_mask' is a bit field used
532  /// to specify which item types you'd liked to include in the count. Use the
533  /// values in OP_ItemType to set the bits in 'item_type_mask'.
534  unsigned int nPicked(OP_ItemTypeMask item_type_mask,
535  bool include_hidden_nodes) const;
536 
537  /// Return all picked items of types specified by 'item_type_mask'.
538  /// Note that if only picked nodes are of interest, there is also
539  /// OP_Node::getPickedChildren().
540  void getPickedItems(OP_ItemTypeMask item_type_mask,
541  OP_NetworkBoxItemList &picked,
542  bool include_hidden = false,
543  bool recurse_picked_netboxes = false) const;
544 
545  /// Return all items that match the type mask.
546  void getAllItems(OP_ItemTypeMask item_type_mask,
547  OP_NetworkBoxItemList &items) const;
548 
549  /// Returns true if the item was successfully deleted
550  bool destroyItem(OP_NetworkBoxItem *item);
551  /// Returns the number of successfully deleted items
552  int destroyItems(const OP_NetworkBoxItemList &items);
553 
554  /// Same as findNode or findNetworkBox, but more generalized so you can
555  /// search through multiple items with just one method. 'item_type_mask' is
556  /// used to specify what type of items you want to consider in your search.
557  /// Does not support indirect parent input searches.
558  virtual OP_NetworkBoxItem *findItem(const char *const_path,
559  OP_ItemTypeMask item_type =
561 
562  /// Look up a direct child item by name, with an option to screen based
563  /// on the item type. Like findItem above, but doesn't look into child
564  /// networks.
565  OP_NetworkBoxItem *getItem(const char *name,
566  OP_ItemTypeMask item_type = OP_ITEMTYPE_ALL);
567 
568  /// Returns true if the given node is a child descendent of the same
569  /// type with no intervening levels of different type.
570  bool isSubNode(const OP_Node *node) const;
571 
572  /// Try to avoid using this method, it only clears the selection for tiles,
573  /// not network boxes (network boxes are considered items but not tiles).
574  /// Can use setAllPickFlags() instead. In fact, since there are no group
575  /// tiles in the worksheet any more, this method has become somewhat useless
576  void clearSelection(OP_TileType t, int grouplist);
577 
578  ///Set the pick flags to 'value' for all items of types specified by
579  ///'item_type'
580  void setAllPickFlags(OP_ItemTypeMask item_type, int value);
581  void pickRequest(OP_NetworkBoxItem *item, int shift);
582  void pickRequest(int shift)
583  { OP_Node::pickRequest(shift); }
584 
585  void addPicked(const OP_Group *group); // Pick these nodes
586  void subPicked(const OP_Group *group); // Removed from picked
587 
588  // There are two versions of getOperatorTable. One that takes an
589  // operator type and returns the table for that type. The second
590  // returns the operator table associated with this network. This
591  // latter assumes that "setOperatorTable" has been called. All
592  // OP_Network sub-class constructors should do this:
593  //
594  // setOperatorTable(getOperatorTable(operatorType));
595  //
596  // If the script_path is NOT null, this method will create the
597  // operator table if it doesn't exist. Otherwise, it will return
598  // null for non-existant table names.
599  static OP_OperatorTable *getOperatorTable(
600  const UT_StringRef &op_type,
601  const char *script_path=0);
603  { return myOperatorTable; }
604  virtual const char *getScriptDirectory();
605 
606  // this is overridden so that we can clear the group flags
607  virtual void clearUndoFlags();
608 
609  // Sub-networks use parent inputs to connect open inputs in
610  // the net to inputs in the parent. A list of the parent connections
611  // is the bookeeping required to manage and resolve these connections.
612  bool wantsParentInputs() const;
613 
614  // Get all picked Parent Inputs
615  int getNparentInputs() const
616  { return myParentInputs.entries(); }
617  virtual OP_SubnetIndirectInput *findParentInput(const char *const_path);
618  OP_SubnetIndirectInput *getParentInput(int index) const;
619  OP_SubnetIndirectInput *getParentInput(const char *name) const;
620 
621  // getIndirectString returns a string that can be used to save
622  // parent inputs that refer to our parent input table.
623  // These are simply saved as a string index into our table.
624  // These can be resolved back using resolveIndirectString.
625  int getIndirectString(OP_IndirectInput *, UT_String &);
626  OP_IndirectInput *resolveIndirectString(const char *);
627 
628  virtual void inputConnectChanged(int which);
629 
630  void getAllConnectedChildren(
631  int input_index, UT_Array<OP_Node*> &nodes,
632  bool expandSubnets = true) const;
633  void getAllConnectedChildrenNamed(
634  const OP_ConnectorId& input_name,
635  UT_Array<OP_Node*> &nodes,
636  bool expandSubnets = true) const;
637 
638  // The ViewSetting functions are used by ICE to store the name
639  // of the COP currently being viewed. Put here because COP_SubNets
640  // and ICENET_Nodes both need to store this information.
641  virtual void setViewSetting(const char *) {};
642  virtual const char *getViewSetting() const { return ""; }
643 
644  virtual void dumpDependencies(std::ostream &os);
645 
646  virtual void changeParmTemplate(PRM_Template *new_template);
647 
648  int getNumChildManagers(OP_OpTypeId type) const;
649  void addChildManager(OP_OpTypeId type);
650  void removeChildManager(OP_OpTypeId type);
651  virtual bool getSaveWithVopnets();
652  virtual void runDelScript();
653  void clearDelScripts(int pickedOnly);
654 
655  /// This method will unscope all the channels belonging to this op.
656  /// If the recurse flag is set it will recurse through the children
657  /// (at this level the recurse flag is ignored).
658  virtual void unscopeChannels(bool recurse);
659 
660  /// This method will undisplay all the channels belonging to this op.
661  /// If the recurse flag is set it will recurse through the children
662  /// (at this level the recurse flag is ignored).
663  virtual void undisplayChannels(bool recurse);
664 
665  /// This method will undisplay all the channels belonging to this op.
666  /// If the recurse flag is set it will recurse through the children
667  /// (at this level the recurse flag is ignored).
668  virtual void unpinChannels(bool recurse);
669 
670  // Do global expansion on a pattern - get lists of network boxes
671  // If expand is given, concatenated with full list of names
672  // If list is given, appended with list of nodes.
673  virtual void globNetworkBoxes(const char *pat, UT_String *expand,
675  OP_GlobContext *context = 0,
676  const char *prefix = " ");
677 
678  virtual void globPostIts(const char *pat, UT_String *expand,
679  UT_ValArray<OP_PostIt *> *list=0,
680  OP_GlobContext *context = 0,
681  const char *prefix = " ");
682 
683  ///Save out all the netboxes in this network to 'os' in separate packets
684  OP_ERROR saveNetworkBoxes(std::ostream &os, const OP_SaveFlags &flags,
685  const char *path_prefix);
686  OP_ERROR savePostIts(std::ostream &os, const OP_SaveFlags &flags,
687  const char *path_prefix);
688  OP_ERROR saveDots(std::ostream &os, const OP_SaveFlags &flags,
689  const char *path_prefix);
690 
691  ///Load a network box from 'is'. Can load from both .hip files and the
692  ///clipboard. 'path' is used as the new netbox's name. If 'overwrite' is
693  ///specified, the new netbox will overwrite any other netboxes in this
694  ///network with the same name, rather than modify its name to be unique.
695  ///'created' is used to return a ptr to the new network box.
696  bool loadNetworkBox(UT_IStream &is, const char *path = "",
697  bool path_contains_network = true,
698  bool path_contains_packet_ext = true,
699  int overwrite = 0, OP_NetworkBox **created = NULL);
700 
701  /// Load a post-it note from 'is'. Can load from both .hip files and the
702  /// clipboard. 'path' is used as the new post-it's name. If 'overwrite' is
703  /// specified, the new post-it will overwrite any other post-its in this
704  /// network with the same name, rather than modify its name to be unique.
705  /// 'created' is used to return a ptr to the new post-it.
706  bool loadPostIt(UT_IStream &is, const char *path = "",
707  bool path_contains_network = true,
708  bool path_contains_packet_ext = true,
709  int overwrite = 0, OP_PostIt **created = NULL);
710 
711  /// Load a network dot from 'is'. Can load from both .hip files and the
712  /// clipboard. 'path' is used as the new dot's name. If 'overwrite' is
713  /// specified, the new dot will overwrite any other dots in this
714  /// network with the same name, rather than modify its name to be unique.
715  /// 'created' is used to return a ptr to the new post-it.
716  bool loadDot(UT_IStream &is, const char *path = "",
717  bool path_contains_network = true,
718  bool path_contains_packet_ext = true,
719  int overwrite = 0, OP_Dot **created = NULL);
720 
721  /// Returns the unique id of the representative operator that this network
722  /// may have. The changed_child parameter and the current_rep_id are used
723  /// in order to minimize the number of findSubNode() calls that are made.
724  int getRepresentativeNodeId(OP_Node *changed_child,
725  int current_rep_id);
726 
727  // Changes a child node's type from its current type to 'newtype'
728  // the keep... parameters will maintain the same name, pararmeter values
729  // and network contents if set to true.
730  bool changeChildNodeType(OP_Node *child,
731  const char *newtype,
732  bool keepname,
733  bool keepparms,
734  bool keepcontents,
735  bool quiet,
736  int *newChildId=NULL);
737 
738  // Returns true if the supplied node is specially marked as editable
739  // in this locked HDA node.
740  bool getIsSubNodeEditable(const OP_Node *subnode) const;
741  bool hasAnyEditableSubNodes() const;
742 
743  /// Builds the list of subnodes that are marked as message nodes.
744  /// Returns false if there are none (list.entries() == 0 then)
745  bool getMessageSubNodes(OP_NodeList &list) const;
746 
747  // Add any OTL-defined operators used by this network to the specified
748  // table.
749  virtual void getActiveOperatorsDefinedByOTL(
750  UT_Set<OP_Operator *> &active_operators) const;
751 
752  // Save a packet containing the fallback library paths for the specified
753  // operators.
754  static void saveOTLBackupInformation(std::ostream &os,
755  const OP_OperatorList &fallbackops,
756  const OP_OperatorList &dummyops);
757 
758  OP_SubnetIndirectInput *getNamedParentInput(
759  const OP_ConnectorId& name) const;
761  { return myIsClearingContentsOfEditableSubnodes; }
762 
763  virtual int64 getMemoryUsage(bool inclusive) const;
764 
765  static bool warnDeprecatedOpsOnLoad()
766  { return theWarnDeprecatedOpsOnLoad; }
768  { theWarnDeprecatedOpsOnLoad = enable; }
769 
770  static const char *theChildTableName;
771 
772  void setCachedMimeFile(const char *filename);
773  const char *getCachedMimeFile() const;
774  void clearCachedMimeFile();
775  bool hasCachedMimeFile() const;
776 
777  virtual OP_ERROR getErrorSeverity();
778  virtual void getRawErrors(UT_Array<UT_Error> &errors, bool update);
779 
780 protected:
781  // Protected constructor since networks are only created by Operators.
782  OP_Network(OP_Network *parent, const char *name, OP_Operator *op);
783  virtual ~OP_Network();
784 
785  virtual void clearAndDestroy(void);
786  void clearAndDestroyNodes(void);
787 
788  virtual int propagateModification(OP_Node *by_whom,
789  OP_EventType reason,
790  int parm_index,
791  OP_PropagateData &prop_data);
792 
793  // new method for dependencies: use the PRM_TYPE_OP_REF_*
794  // in your parm template to add your dependency.
795  // override this to do special cases, make sure you call the base class
796  virtual void buildOpDependencies();
797  virtual void notifyRenameDependents( const UT_String &full_from,
798  OP_NodeList &cook_nodes );
799  virtual void notifyRenameReferences( const UT_String &full_from,
800  OP_NodeList &cook_nodes );
801  virtual void rebuildOpDependents( bool proxy_only );
802 
803  // clone dependencies from the proxy. proxy is no longer valid
804  // after the clone!
805  virtual void cloneFromProxyRefNode( OP_Network *proxy );
806  // clone a new proxy node. this node is no longer valid after this!
807  virtual OP_Network * cloneToProxyRefNode();
808  virtual int hasProxyRefNodes() const
809  { return myProxyRefNodes.entries() > 0; }
810  void removeProxyRefNode( OP_Network *proxy );
811  virtual void moveProxyRefNodes( OP_Network *dest );
812 
813  virtual void moveDependencies( OP_Node *from_node );
814 
815  // Override of OP_Node::load to handle some network-specific packets.
816  virtual bool load(UT_IStream &is, const char *ext = "",
817  const char *path = 0);
818 
819  /// Called upon entering and exiting loadNetwork() method
820  virtual void beginLoadingInNetwork();
821  virtual void endLoadingInNetwork();
822 
823  // Called at the end of loadChildOrder()
824  virtual void finishedLoadingChildOrder();
825 
826  // Called when loadNetwork finishes loading this whole network.
827  // Do not set `is_child_call`. That argument is set internally to
828  // true when finishedLoadingNetwork() is called on the node's children.
829  virtual void finishedLoadingNetwork(bool is_child_call=false);
830 
831  // This overrides the OP_Node function.
832  // syncContents loads the given stream into this operator.
833  // The stream should be in .hip file format, with "this" pointing to
834  // the root node in the .hip file. It handles collisions gracefully
835  // by updating the existing operators instead of deleting and
836  // recreating them. It deletes any existing nodes not in the
837  // stream, and creates nodes if necessary.
838  virtual bool syncContents(UT_IStream &is);
839 
840  // The following should only be called by the director, who doesn't have
841  // a real choice, does he?
842  virtual void addNode(OP_Node *node, int notify=1, int explicitly=1);
843 
844  OP_Node *findConnectedNode(OP_Node *op) const;
845 
846  // These functions ensure we have valid render and display nodes.
847  OP_Node *getPreferredDisplayNodePtr(OP_Node *skipthisnode)const;
848  void resetDisplayNodePtr(OP_Node *skipthisnode=0);
849  OP_Node *getPreferredRenderNodePtr(OP_Node *skipthisnode) const;
850  void resetRenderNodePtr(OP_Node *skipthisnode=0);
851  OP_Node *getPreferredAudioNodePtr(OP_Node *skipthisnode) const;
852  void resetAudioNodePtr(OP_Node *skipthisnode=0);
853  virtual CHOP_Node **getAudioNodeRef();
854 
855  // This function calls all of the above, for when we are deleting nodes.
856  void validateStatusNodePtrs(const OP_NodeList &skipnodes);
857 
858  virtual void updateExtraFlagPtrs();
859 
860  virtual void nodeUnlocked();
861 
862  virtual bool canDestroyNode();
863  virtual void destroySingleNode(OP_Node *node);
864 
865  // This function goes recursively through every node below this one and
866  // renames it to some unique but meaningless value. This is used for
867  // compiling networks.
868  void modifyAllChildNodeNames(bool renamepickableobjects,
869  const char *prefix, int &id,
870  std::set<int>* renaming_exclude_ids = NULL);
871 
872  /// This is a helper method to the setChannelScope method. It traverses
873  /// the node's parameters and sets the scope on them according to the
874  /// given pattern.
875  /// This method is also defined in OP_Parameters, it is overridden here
876  /// to provide parsing support for network paths.
877  virtual void traverseScope(const char *pattern,
878  OP_ScopeOp scope_op,
879  const OP_ScopeOptions &scope_opts);
880 
881 
885 
886  // Implemented in VOPs. Only the new nodes are to be inserted into the out
887  // list, not any of the existing ones.
888  virtual void getAdditionalUndoNodes(const OP_NodeList& orig_list,
889  OP_NodeList& nodes_for_input_undo) { }
890 
891  /// Returns true if the child at node can should be saved, false otherwise.
892  virtual bool getAllowSavingChild(OP_Node *node,
893  const OP_SaveFlags &flags)
894  { return true; }
895 
896 private:
897  // Some helper functions for loading and saving.
898  OP_ERROR saveNetwork(std::ostream &os, const OP_SaveFlags &flags,
899  const OP_SaveFlags &childflags,
900  const char *pathPrefix, bool vopnets);
901  OP_ERROR saveChildNodes(std::ostream &os, const OP_SaveFlags &flags,
902  const char *pathPrefix, bool vopnets,
903  bool forceNoInit = false);
904  OP_ERROR saveOp(std::ostream &os, OP_Node *node,
905  const OP_SaveFlags &flags,
906  const OP_SaveFlags &childflags, const char *pathPrefix,
907  bool vopnets, bool forceNoInit = false,
908  const UT_String &name_override = UT_String());
909  OP_ERROR savePostIt(std::ostream &os, OP_PostIt *pnote,
910  const OP_SaveFlags &flags,
911  const char *pathPrefix);
912  bool loadNodeType(UT_IStream &is, OP_Network *net,
913  UT_String &nodeType, int &matches);
914  bool loadOp(UT_IStream &is, int overwrite, const char *path,
915  op_PathSet &noneditable_missing_table);
916 
917  // Some special handling for items loaded into a network due to copy/paste
918  // or undo/redo. We need to register these items with an OP_UndoLoad, and
919  // we may want to pick them.
920  void beginPickLoaded(bool pick_loaded);
921  void beginLoadUndo(OP_Node *save_ops[4]);
922  void itemLoaded(OP_NetworkBoxItem *item);
923  void endLoadUndo(OP_Node *save_ops[4]);
924  void endPickLoaded();
925 
926  // Some helper functions for syncContents.
927  bool syncContentsInit(UT_IStream &is,
928  OP_Network *net, OP_Node *node,
929  UT_String &nodeName, OP_Node *&newnode,
930  bool &match_definition_failure,
931  const char *packet_node_path);
932  // Helper method to clear the netboxes/post-its from any subnodes of the
933  // given network whose netboxes may be saved to *this network's contents
934  // section without a preceding .init packet for that subnode.
935  void syncContentsClearNetboxesFromNonInitSubNodes(OP_Network *net);
936  // Helper method to clear the contents of any editable subnodes which will
937  // be loaded from the hip file or a parent asset's contents.
938  void clearContentsOfEditableSubNodes();
939  // Helper method to determine if an ancestor is an instance of a particular
940  // operator currently loading its contents section.
941  bool isLoadingContentsSection(OP_Operator *op) const;
942 
943  void setDoMergeFlag( bool flag ) { myDoMerge = flag; }
944 
945  // These functions perform operations that are required after loading
946  // a number of new operators. Used by loadNetwork and syncContents.
947  void resolveNetworkBoxOwnership();
948  void initSpecialNodes(OP_NodeList &loaded_ops);
949  void initNodeConnectors(OP_NodeList &loaded_ops);
950  void sendBulkNotifications(const OP_NodeList &loaded_ops,
951  const OP_NodeList &op_roots,
952  bool builddependencies,
953  bool notify_name_dependents);
954  void fixPendingOverride();
955 
956  int savePartialVerify(std::ostream &os);
957  void createParentInputs();
958 
959  // Build a list of item roots from the stream. In English, this means that
960  // 'item_roots' will be populated with the paths of all items at the top
961  // level of this load. Initial stream position is unchanged.
962  bool buildItemRoots(UT_IStream &is, const char *mergePattern,
963  UT_StringArray &item_roots);
964 
965  // Destroys all child nodes except those that appear in the supplied
966  // list (and their parents). Traverses into writable child nodes too.
967  // Returns the number of descendents found in nodes.
968  void destroyAllNodesExcept(const UT_Set<OP_Node *> &nodes);
969 
970  // Then after the list is made, we go through and rename the original
971  // items so there won't be any collisions on loading
972  void prepareCollisionNames(const OP_NetworkBoxItemList &items,
973  UT_WorkBuffer &prefix);
974  // Then, after the load, we go through and rename the items to their
975  // original status (renaming the collisions along the way)
976  void fixLoadInputs(); // Resolves references of nodes
977  void fixLoadNames(const OP_NetworkBoxItemList &items,
978  UT_WorkBuffer &prefix,
979  const OP_FixNameParms *fix_name_parms,
980  UT_StringArray *dest_names);
981 
982  int groupCount() const; // Doesn't count internal groups.
983  OP_ERROR saveGroupList(std::ostream &os, int binary = 0);
984  bool loadGroupList(UT_IStream &is, const char *path="");
985  OP_ERROR saveParentInputs(std::ostream &os, int picked= 0);
986  bool loadParentInputs(UT_IStream &is, const char *path = "");
987  OP_ERROR saveNetworkData(std::ostream &os, int binary = 0,
988  int picked= 0);
989  bool loadNetworkData(UT_IStream &is, const char *path = "");
990  OP_ERROR saveChildOrder(std::ostream &os, const OP_SaveFlags &flags);
991  bool loadChildOrder(UT_IStream &is);
992  OP_ERROR saveCompiledSection(std::ostream &os, int binary = 0,
993  int picked= 0);
994  bool loadCompiledSection(UT_IStream &is, const char *path = "");
995 
996  // these should surround saving of ops within a network.
997  void prepareOpSave(std::ostream &os, const OP_SaveFlags &flags,
998  int &nsaved, int &writeTrailer);
999  void cleanupOpSave(std::ostream &os, const OP_SaveFlags &flags,
1000  int &nsaved, int &writeTrailer);
1001 
1002  // A helper function for findUniqueGroupName and findUniqueNetworkBoxName
1003  // and findUniqueDotName which takes the "does this item exist" function as
1004  // a parameter
1005  char *findUniqueName(const char *base, OP_FindItemFunc find);
1006 
1007  void changeNodeIdFromLoad(OP_Node &node, int new_id);
1008  void invokeFinishLoadingNetwork(OP_NodeList& op_roots);
1009 
1010  bool verifyParents();
1011  static bool verifyAllParents();
1012 
1013  void setOperatorTable(OP_OperatorTable *table);
1014 
1015  UT_SymbolMap<OP_Node *> mySymbols;
1016  UT_ValArray<OP_Node *> myNodes;
1017  UT_ValArray<OP_Network *> myProxyRefNodes;
1018  UT_ValArray<OP_Node *> mySortedList;
1019  UT_ValArray<OP_SubnetIndirectInput*> myParentInputs;
1020  OP_GroupList myGroups;
1021  OP_NetworkBoxList myNetworkBoxes;
1022  OP_PostItNoteList myPostItNotes;
1023  OP_DotList myDotList;
1024  OP_OperatorTable *myOperatorTable;
1025  OP_Node *myLastLoadedOpPtr;
1026  OP_NetworkBox *myLastLoadedNetworkBox;
1027  OP_PostIt *myLastLoadedPostIt;
1028  OP_Dot *myLastLoadedDot;
1029  OP_Node *myCreatedNode;
1030  UT_SortedSet<int> myEditableSubNodes;
1031  OP_UndoLoad *myUndoLoad;
1032  bool myPickLoaded;
1033 
1034  fpreal myChildScale;
1035  int myDandRCounter;
1036  short myDandROpsEqual;
1037  char myNameSortDirty;
1038  char myOpLoadedFlag;
1039  bool myDoMerge;
1040  UT_StringHolder mySkipBadNodePath;
1041 
1042  int myLastInputChanged;
1043  int myChildManagerCount[NUM_MANAGERS];
1044  int myStashedCurrentNodeId;
1045  bool myIsClearingContentsOfEditableSubnodes;
1046  UT_StringHolder myCachedMimeFile;
1047 
1048  static bool theWarnDeprecatedOpsOnLoad;
1049 
1050  friend class OP_Director;
1051  friend class MOT_Director;
1052 };
1053 
1055 
1056 #endif
1057 
UT_ValArray< OP_Node * > myOutputNodes
Definition: OP_Network.h:884
virtual bool load(UT_IStream &is, const char *ext="", const char *path=0)
OP_TileType
Definition: OP_Network.h:52
UT_String suffixReplaceStr
Definition: OP_Network.h:93
Definition: UT_Set.h:58
virtual void moveProxyRefNodes(OP_Network *)
Definition: OP_Node.h:3289
GT_API const UT_StringHolder filename
virtual void traverseScope(const char *pattern, OP_ScopeOp scope_op, const OP_ScopeOptions &scope_options)
GLuint const GLchar * name
Definition: glew.h:1814
int getNparentInputs() const
Definition: OP_Network.h:615
virtual void cloneFromProxyRefNode(OP_Network *proxy)
GLuint index
Definition: glew.h:1814
virtual bool canDestroyNode()
Return true if it is safe at this time to destroy this node.
OP_OperatorTable * getOperatorTable() const
Definition: OP_Network.h:602
GLenum GLenum GLenum GLenum GLenum scale
Definition: glew.h:13880
GLenum GLsizei GLenum GLenum const void * table
Definition: glew.h:4940
GLenum GLsizei GLsizei GLsizei GLsizei GLbitfield flags
Definition: glew.h:2864
UT_ErrorSeverity
Definition: UT_Error.h:25
virtual const char * getViewSetting() const
Definition: OP_Network.h:642
OP_Node * createNodeOfExactType(const char *type, const char *name=0)
Convenience method for requesting en exact type.
Definition: OP_Network.h:229
virtual int hasProxyRefNodes() const
Definition: OP_Network.h:808
virtual OP_Network * cloneToProxyRefNode()
virtual void nodeUnlocked()
Definition: OP_Node.h:3415
virtual void runDelScript()
fpreal getChildrenScale() const
Definition: OP_Network.h:183
OP_NetworkBoxSaveType
Definition: OP_NetworkBox.h:40
virtual OP_Node * getChild(const char *name, int *hint=0) const
OP_Node * myDisplayNodePtr
Definition: OP_Network.h:883
virtual bool getAllowSavingChild(OP_Node *node, const OP_SaveFlags &flags)
Returns true if the child at node can should be saved, false otherwise.
Definition: OP_Network.h:892
virtual int propagateModification(OP_Node *by_whom, OP_EventType reason, int parm_index, OP_PropagateData &prop_data)
virtual void globNetworkBoxes(const char *pat, UT_String *expand, UT_ValArray< OP_NetworkBox * > *list=0, OP_GlobContext *glob_context=0, const char *prefix=" ")
void notifyRenameDependents(const UT_String &full_from)
virtual OP_PostIt * findPostItNote(const char *const_path)
Definition: OP_Node.h:842
long long int64
Definition: SYS_Types.h:111
virtual ~OP_OperatorFilter()
Definition: OP_Network.h:109
virtual bool allowTool(const char *tool_name)
Definition: OP_Network.h:117
static bool warnDeprecatedOpsOnLoad()
Definition: OP_Network.h:765
virtual int isNetwork() const
virtual int getNchildren() const
GLint GLint GLint GLint GLint x
Definition: glew.h:1252
GLint GLint GLint GLint GLint GLint y
Definition: glew.h:1252
virtual void unpinChannels(bool recurse)
UT_SymbolMap< OP_OperatorTable * > OP_OperatorTableMap
Definition: OP_Network.h:48
OP_DotList & getDotList()
Definition: OP_Network.h:523
virtual int64 getMemoryUsage(bool inclusive) const
UT_String prefixReplaceStr
Definition: OP_Network.h:90
virtual OP_Network * createProxyRefNode(const char *path)
const GLuint GLenum const void * binary
Definition: glew.h:3502
fpreal64 dot(const CE_VectorT< T > &a, const CE_VectorT< T > &b)
Definition: CE_Vector.h:218
virtual OP_ERROR getErrorSeverity()
virtual void setViewSetting(const char *)
Definition: OP_Network.h:641
GLuint const GLuint * names
Definition: glew.h:2690
static void setWarnDeprecatedOpsOnLoad(bool enable)
Definition: OP_Network.h:767
void notifyRenameReferences(const UT_String &full_from)
virtual void clearUndoFlags()
virtual void clearAndDestroy(void)
OP_OpTypeId
Definition: OP_OpTypeId.h:18
Definition: OP_Dot.h:24
virtual OP_NetworkBoxItem * findItem(const char *const_path, OP_ItemTypeMask item_type=OP_ITEMTYPE_ALL)
Definition: OP_Node.h:848
bool getIsClearingContentsOfEditableSubnodes()
Definition: OP_Network.h:760
virtual void undisplayChannels(bool recurse)
GLuint GLuint GLsizei GLenum type
Definition: glew.h:1253
OP_Node * myRenderNodePtr
Definition: OP_Network.h:882
void pickRequest(int shift)
int removeTrailingDigits
Definition: OP_Network.h:95
friend class OP_Network
Definition: OP_Node.h:3892
virtual void buildOpDependencies()
GLsizei const GLchar *const * path
Definition: glew.h:6461
void pickRequest(int shift)
Definition: OP_Network.h:582
void *(OP_Network::* OP_FindItemFunc)(const char *)
Definition: OP_Network.h:120
virtual void changeParmTemplate(PRM_Template *new_template)
unsigned int OP_ItemTypeMask
Definition: OP_ItemId.h:43
double fpreal
Definition: SYS_Types.h:276
Create an evaluation context scope with a new node.
Definition: OP_Director.h:60
virtual void rebuildOpDependents(bool proxy_only)
virtual bool syncContents(UT_IStream &is)
virtual void unscopeChannels(bool recurse)
virtual void dumpDependencies(std::ostream &os)
virtual void globPostIts(const char *pat, UT_String *expand, UT_ValArray< OP_PostIt * > *list=0, OP_GlobContext *glob_context=0, const char *prefix=" ")
#define OP_API
Definition: OP_API.h:10
virtual void getPotentialChildErrorNodes(OP_NodeList &nodes) const
FMT_CONSTEXPR bool find(Ptr first, Ptr last, T value, Ptr &out)
Definition: format.h:2104
virtual int getDandROpsEqual()
Definition: OP_Node.h:798
OIIO_API bool copy(string_view from, string_view to, std::string &err)
virtual bool allowOperatorAsChild(OP_Operator *)
Definition: OP_Network.h:113
OP_EventType
Definition: OP_Value.h:22
virtual void getActiveOperatorsDefinedByOTL(UT_Set< OP_Operator * > &active_operators) const
virtual bool getSaveWithVopnets()
virtual int updateDandROpsEqual(int=1)
Definition: OP_Node.h:801
virtual void inputConnectChanged(int which)
virtual bool opShouldHandleChange(OP_EventType reason)
GLubyte * pattern
Definition: glew.h:5711
virtual void getAdditionalUndoNodes(const OP_NodeList &orig_list, OP_NodeList &nodes_for_input_undo)
Definition: OP_Network.h:888
virtual void moveDependencies(OP_Node *from_node)
virtual void getRawErrors(UT_Array< UT_Error > &errors, bool update)
virtual OP_SubnetIndirectInput * findParentInput(const char *const_path)
Definition: OP_Node.h:846
OP_ScopeOp
Definition: OP_Parameters.h:58
bool all(const vbool4 &v)
Definition: simd.h:3371
GLsizei const GLfloat * value
Definition: glew.h:1849
virtual OP_NetworkBox * findNetworkBox(const char *name)
Definition: OP_Node.h:840
OP_RenameAction
Definition: OP_Network.h:69
UT_String suffixStr
Definition: OP_Network.h:94
GLboolean enable
Definition: glew.h:2745
GLdouble GLdouble t
Definition: glew.h:1398
OP_API const OP_OperatorTableMap & OPgetGlobalOperatorTables()
static const char * theChildTableName
Definition: OP_Network.h:770
virtual void clearUnreferencedInputs()
Definition: OP_PostIt.h:42
GLboolean GLuint group
Definition: glew.h:2745
virtual OP_Dot * findDot(const char *const_path)
Definition: OP_Node.h:844
UT_String prefixStr
Definition: OP_Network.h:91