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