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