00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __OP_Node_h__
00020 #define __OP_Node_h__
00021
00022 #include "OP_API.h"
00023 #include <iostream.h>
00024 #include <UT/UT_Color.h>
00025 #include <UT/UT_String.h>
00026 #include <UT/UT_IntArray.h>
00027 #include <UT/UT_RefArray.h>
00028 #include <UT/UT_PtrArray.h>
00029 #include <UT/UT_BitArray.h>
00030 #include <UT/UT_Vector3.h>
00031 #include <UT/UT_PathSearch.h>
00032 #include <UT/UT_TokenString.h>
00033 #include <UT/UT_XformOrder.h>
00034 #include <IMG/IMG_Raster.h>
00035 #include "OP_DataTypes.h"
00036 #include "OP_Error.h"
00037 #include "OP_Parameters.h"
00038 #include "OP_NodeFlags.h"
00039 #include "OP_NetworkBoxItemFlags.h"
00040 #include "OP_Version.h"
00041 #include "OP_Context.h"
00042 #include "OP_Cache.h"
00043 #include "OP_Dependency.h"
00044 #include "OP_NetworkBoxItem.h"
00045 #include "OP_BundleReferences.h"
00046 #include "OP_OTLLicenseType.h"
00047 #include "OP_PropagateData.h"
00048
00049 class UT_Matrix3;
00050 class UT_DMatrix3;
00051 class UT_Matrix4;
00052 class UT_DMatrix4;
00053 class UT_Ramp;
00054 class UT_WorkArgs;
00055 class UT_WorkBuffer;
00056 class UT_StringArray;
00057 class UT_InfoTree;
00058 class UT_Undo;
00059 class UT_BoundingBox;
00060 class PY_CompiledCode;
00061 class PY_Result;
00062 class DD_Source;
00063 class DD_ChoiceList;
00064 class CL_Clip;
00065 class CL_Track;
00066 class EV_SYMBOL;
00067 class CMD_Args;
00068 class PRM_BatchList;
00069 class OP_Operator;
00070 class OP_OutputCodeParms;
00071 class OP_ExtraInput;
00072 class OP_InputIndirect;
00073 class OP_ParmInterest;
00074 class OP_Input;
00075 class OP_Node;
00076 class OP_Network;
00077 class OP_Group;
00078 class OP_Bundle;
00079 class OP_PreDefRules;
00080 class OP_GalleryEntry;
00081 class OP_SaveFlags;
00082 class OP_GlobContext;
00083 class DOP_Parent;
00084 class VOP_CodeGenerator;
00085
00086
00087 typedef UT_PtrArray<const CL_Track *> CL_TrackListC;
00088 typedef UT_PtrArray<OP_Node *> OP_NodeList;
00089
00090 typedef int (*OP_EditCallback)(void *data, OP_Node *src,
00091 CL_Track *track, float t, float value);
00092
00093
00094 #define OPREF_PREFIX "op:"
00095 #define OPREF_PREFIX_LEN 3
00096
00097
00098
00099
00100
00101
00102 #define OP_INVALID_NODE_ID -999
00103
00104
00105 #define INVALID_TABLE_NAME "Node"
00106 #define OBJ_TABLE_NAME "Object"
00107 #define SOP_TABLE_NAME "Sop"
00108 #define POPNET_TABLE_NAME "Particle"
00109 #define POP_TABLE_NAME "Pop"
00110 #define CHOPNET_TABLE_NAME "ChopNet"
00111 #define CHOP_TABLE_NAME "Chop"
00112 #define ROP_TABLE_NAME "Driver"
00113 #define SHOP_TABLE_NAME "Shop"
00114 #define COP2_TABLE_NAME "Cop2"
00115 #define COPNET_TABLE_NAME "CopNet"
00116 #define VOP_TABLE_NAME "Vop"
00117 #define VOPNET_TABLE_NAME "VopNet"
00118 #define DOP_TABLE_NAME "Dop"
00119
00120
00121 #define MGR_TABLE_NAME "Manager"
00122 #define DIR_TABLE_NAME "Director"
00123
00124
00125
00126 #define INVALID_SCRIPT_NAME "node"
00127 #define OBJ_SCRIPT_NAME "obj"
00128 #define SOP_SCRIPT_NAME "sop"
00129 #define POPNET_SCRIPT_NAME "part"
00130 #define POP_SCRIPT_NAME "pop"
00131 #define CHOPNET_SCRIPT_NAME "ch"
00132 #define CHOP_SCRIPT_NAME "chop"
00133 #define ROP_SCRIPT_NAME "out"
00134 #define SHOP_SCRIPT_NAME "shop"
00135 #define COPNET_SCRIPT_NAME "img"
00136 #define COP2_SCRIPT_NAME "cop2"
00137 #define VOP_SCRIPT_NAME "vop"
00138 #define VOPNET_SCRIPT_NAME "vex"
00139 #define DOP_SCRIPT_NAME "dop"
00140
00141
00142 #define MGR_SCRIPT_NAME "mgr"
00143 #define DIR_SCRIPT_NAME "dir"
00144
00145
00146 #define INVALID_OPTYPE_NAME "NODE"
00147 #define OBJ_OPTYPE_NAME "OBJ"
00148 #define SOP_OPTYPE_NAME "SOP"
00149 #define POPNET_OPTYPE_NAME "PART"
00150 #define POP_OPTYPE_NAME "POP"
00151 #define CHOPNET_OPTYPE_NAME "CHOPNET"
00152 #define CHOP_OPTYPE_NAME "CHOP"
00153 #define ROP_OPTYPE_NAME "ROP"
00154 #define SHOP_OPTYPE_NAME "SHOP"
00155 #define COP2_OPTYPE_NAME "COP2"
00156 #define COPNET_OPTYPE_NAME "IMG"
00157 #define VOP_OPTYPE_NAME "VOP"
00158 #define VOPNET_OPTYPE_NAME "VOPNET"
00159 #define DOP_OPTYPE_NAME "DOP"
00160
00161
00162
00163
00164
00165 #define MGR_OPTYPE_NAME "MGR"
00166 #define DIR_OPTYPE_NAME "DIR"
00167
00168 #define OP_DEFAULT_COLOR_R 0.8F
00169 #define OP_DEFAULT_COLOR_G 0.8F
00170 #define OP_DEFAULT_COLOR_B 0.8F
00171 #define OP_DEFAULT_COLOR UT_RGB, \
00172 OP_DEFAULT_COLOR_R, \
00173 OP_DEFAULT_COLOR_G, \
00174 OP_DEFAULT_COLOR_B
00175
00176 enum OP_OpTypeId
00177 {
00178 INVALID_OPTYPE_ID = -1,
00179 OBJ_OPTYPE_ID = 0,
00180 SOP_OPTYPE_ID,
00181 POPNET_OPTYPE_ID,
00182 POP_OPTYPE_ID,
00183 CHOPNET_OPTYPE_ID,
00184 CHOP_OPTYPE_ID,
00185 ROP_OPTYPE_ID,
00186 SHOP_OPTYPE_ID,
00187 COP2_OPTYPE_ID,
00188 COPNET_OPTYPE_ID,
00189 VOP_OPTYPE_ID,
00190 VOPNET_OPTYPE_ID,
00191 DOP_OPTYPE_ID,
00192 MGR_OPTYPE_ID,
00193 DIR_OPTYPE_ID,
00194 NUM_MANAGERS
00195 };
00196
00197
00198
00199
00200 #define VOP_OUTPUT_NODE_NAME "output"
00201 #define VOP_SUBNET_OUTPUT_NODE_NAME "suboutput"
00202 #define VOP_SUBNET_INPUT_NODE_NAME "subinput"
00203
00204
00205
00206 #define SHOP_MANAGEMENT_OPTYPE "shopnet"
00207 #define POP_MANAGEMENT_OPTYPE "popnet"
00208 #define COP2_MANAGEMENT_OPTYPE "cop2net"
00209 #define ROP_MANAGEMENT_OPTYPE "ropnet"
00210 #define CHOP_MANAGEMENT_OPTYPE "chopnet"
00211 #define SOP_MANAGEMENT_OPTYPE "sopnet"
00212 #define OBJ_MANAGEMENT_OPTYPE "objnet"
00213 #define VOP_MANAGEMENT_OPTYPE "vopnet"
00214 #define DOP_MANAGEMENT_OPTYPE "dopnet"
00215
00216
00217
00218
00219
00220 class OP_API OP_TypeInfo
00221 {
00222 public:
00223 OP_OpTypeId myOptypeId;
00224 const char *myOptypeName;
00225 const char *myTableName;
00226 const char *myScriptDir;
00227 };
00228
00229
00230
00231
00232
00233
00234
00235 class OP_API opParmData
00236 {
00237 public:
00238 float myValue;
00239 UT_String myLabel;
00240 OP_Node *myNode;
00241 int myIndex;
00242 int mySubIndex;
00243
00244 int operator==(const opParmData &v) const
00245 {
00246 return (myValue == v.myValue &&
00247 myLabel == v.myLabel &&
00248 myNode == v.myNode &&
00249 myIndex == v.myIndex &&
00250 mySubIndex == v.mySubIndex
00251 );
00252 }
00253 };
00254
00255
00256
00257 class OBJ_Node;
00258 class SOP_Node;
00259 class POP_Node;
00260 class POPNET_Node;
00261 class CHOPNET_Node;
00262 class CHOP_Node;
00263 class COP2_Node;
00264 class COPNET_Node;
00265 class ROP_Node;
00266 class SHOP_Node;
00267 class VOP_Node;
00268 class VOPNET_Node;
00269 class DOP_Node;
00270
00271 #define INSTANTIATE_NODE_FUNCTIONS(PREFIX) \
00272 PREFIX##_Node *find##PREFIX##Node(const char *path) const \
00273 { \
00274 OP_Node *node; \
00275 \
00276 node = findNode(path); \
00277 if (node) return node->castTo##PREFIX##Node(); \
00278 return 0; \
00279 } \
00280 PREFIX##_Node *castTo##PREFIX##Node() const \
00281 { \
00282 \
00283 \
00284 \
00285 UT_ASSERT(this); \
00286 if (!this) return 0; \
00287 if (getOpTypeID() == PREFIX##_OPTYPE_ID) \
00288 { \
00289 return (PREFIX##_Node *) this; \
00290 } \
00291 return 0; \
00292 }
00293
00294 class OP_API OP_Node : public OP_Parameters, public OP_NetworkBoxItem
00295 {
00296 public:
00297
00298 static const OP_TypeInfo *getOpInfoFromOpTypeID(OP_OpTypeId opid);
00299 static const OP_TypeInfo *getOpInfoFromOpTypeName(const char *name);
00300 static const OP_TypeInfo *getOpInfoFromTableName(const char *name);
00301 static const OP_TypeInfo *getOpInfoFromScriptDir(const char *dir);
00302
00303 OP_Network *getParent() const { return myParent; }
00304
00305
00306
00307
00308 virtual OP_Network *getParentNetwork() const;
00309
00310
00311
00312 bool getIsContainedBy(const OP_Node *testparent) const;
00313
00314
00315 const UT_String &getNetName() const;
00316
00317
00318
00319
00320 virtual OP_OpTypeId getOpTypeID() const = 0;
00321
00322
00323
00324
00325
00326 virtual const char *getOpType() const = 0;
00327
00328 virtual OP_ItemType getItemType() const;
00329
00330
00331
00332
00333
00334
00335
00336
00337
00338
00339
00340
00341
00342 INSTANTIATE_NODE_FUNCTIONS(OBJ)
00343 INSTANTIATE_NODE_FUNCTIONS(SOP)
00344 INSTANTIATE_NODE_FUNCTIONS(POPNET)
00345 INSTANTIATE_NODE_FUNCTIONS(POP)
00346 INSTANTIATE_NODE_FUNCTIONS(CHOPNET)
00347 INSTANTIATE_NODE_FUNCTIONS(CHOP)
00348 INSTANTIATE_NODE_FUNCTIONS(ROP)
00349 INSTANTIATE_NODE_FUNCTIONS(SHOP)
00350 INSTANTIATE_NODE_FUNCTIONS(COP2)
00351 INSTANTIATE_NODE_FUNCTIONS(COPNET)
00352 INSTANTIATE_NODE_FUNCTIONS(VOP)
00353 INSTANTIATE_NODE_FUNCTIONS(VOPNET)
00354 INSTANTIATE_NODE_FUNCTIONS(DOP)
00355
00356
00357 const UT_String &getDelScript(void) const { return myDelScript; }
00358
00359
00360
00361 bool setDelScript(const char *str);
00362
00363
00364
00365 const UT_String &getComment(void) const { return myComment; }
00366 bool setComment(const char *str);
00367
00368
00369
00370
00371
00372
00373
00374 virtual const UT_Color *getColor() const { return &myColor; }
00375 virtual bool setColor(const UT_Color &col);
00376
00377
00378
00379
00380
00381
00382 virtual void setXY(fpreal x, fpreal y);
00383 virtual fpreal getX() const { return myPosX; }
00384 virtual fpreal getY() const { return myPosY; }
00385 virtual fpreal getW() const;
00386 virtual fpreal getH() const;
00387
00388
00389
00390
00391
00392 bool setXYWithBoundsChecks(fpreal x, fpreal y);
00393
00394 void pickRequest(int shift);
00395
00396
00397 static int isValidOpName(const char *s,
00398 bool allow_rel_paths = false,
00399 bool ignore_node_names_env_var = false);
00400 static int isValidOpPath(const char *s);
00401 static bool forceValidOpName(UT_String &name);
00402
00403
00404
00405
00406 virtual int findString(const char *str, bool fullword,
00407 bool usewildcards) const;
00408 virtual int changeString(const char *from, const char *to,
00409 bool fullword);
00410
00411
00412
00413 virtual int getNchildren() const;
00414 virtual OP_Node *getChild(const char *name, int *hint=0) const;
00415 virtual OP_Node *getChild(int index) const;
00416 void getPickedChildren(OP_NodeList &picked,
00417 bool include_hidden=false) const;
00418 void getAllChildren(OP_NodeList &children) const;
00419 virtual OP_Node *matchChild(const char *pattern, OP_Node *prevmatch=0,
00420 const char *optype=0,
00421 int casesensitive = 0) const;
00422 virtual OP_Node *matchChildBackwards(const char *pattern,
00423 OP_Node *prevmatch=0,
00424 const char *optype=0,
00425 int casesensitive = 0) const;
00426 virtual OP_Network *createProxyRefNode( const char *path );
00427
00428
00429 static OP_Node *lookupNode(int unique_id, bool include_proxy=false)
00430 {
00431 if( unique_id >= 0 && unique_id <= theUniqueId
00432 && theUniqueNodes[unique_id] )
00433 {
00434 if( include_proxy || !theUniqueNodes[unique_id]
00435 ->isProxyRefNode() )
00436 return theUniqueNodes[unique_id];
00437 }
00438 return 0;
00439 }
00440
00441 static void getAllNodes(OP_NodeList &nodes);
00442
00443 int getUniqueId() const
00444 { return myUniqueId; }
00445
00446
00447
00448
00449 bool expandGroupPattern(const char *pattern,
00450 UT_String &result,
00451 bool expandToFullPaths = false);
00452
00453
00454
00455 bool patternContainsBundle(const char *pattern,
00456 const OP_Bundle *bundle) const;
00457 bool patternContainsGroup(const char *pattern,
00458 const OP_Group *group) const;
00459
00460 virtual int isManager() const;
00461
00462
00463
00464 virtual int isManagementNode() const;
00465
00466
00467
00468
00469
00470
00471
00472
00473
00474 virtual int isSubNetwork(bool includemanagementops) const;
00475 virtual int isNetwork() const;
00476 virtual int isInSubNetwork() const;
00477
00478 bool isProxyRefNode() const
00479 { return myIsProxyRefNode; }
00480 void setProxyRefNode(bool f)
00481 { myIsProxyRefNode = f; }
00482
00483
00484
00485
00486 int isNetworkWithKids() const;
00487
00488 virtual int isVex() const;
00489
00490
00491
00492
00493
00494 OP_Bundle * getParmBundle(const char* parm_name, int vector_index,
00495 UT_String &pattern, OP_Network *creator,
00496 const char *filter);
00497 void markBundleRefsAsUnused();
00498 void cleanUnusedBundleRefs();
00499 void cleanAllBundleRefs();
00500
00501
00502
00503
00504
00505
00506 virtual bool bundleChanged(const OP_Bundle *bundle);
00507
00508
00509 void touchBundleParm(const char *name);
00510 void touchBundleParm(int parm_index);
00511
00512
00513 virtual int getDandROpsEqual() { return 1; }
00514
00515
00516 virtual int updateDandROpsEqual(int = 1) { return 1; }
00517
00518 int isAncestor(const OP_Node *node,
00519 int checkextra=1) const;
00520
00521
00522
00523 const char *getInfoText(OP_Context &context, int verbose,
00524 int max_separator_length = -1);
00525
00526 virtual void getNodeSpecificInfoText(OP_Context &context,
00527 int verbose,
00528 UT_WorkBuffer &text);
00529
00530
00531 OP_Node *findNode(const char *path) const;
00532
00533
00534
00535
00536 OP_Node *findSubNode(const char *path) const;
00537
00538
00539
00540 virtual OP_NetworkBox *findNetworkBox(const char * )
00541 { return NULL; }
00542
00543
00544
00545 virtual OP_PostIt* findPostItNote(const char * )
00546 { return NULL; }
00547
00548
00549
00550
00551 virtual OP_NetworkBoxItem *findItem(const char *const_path,
00552 OP_ItemTypeMask item_type =
00553 OP_ITEMTYPE_ALL);
00554
00555
00556
00557
00558
00559
00560 SOP_Node *getSOPNode(const char *path, int addextra = 0) const;
00561
00562
00563 COP2_Node *getCOP2Node(const char *path, int addextra = 0) const;
00564
00565
00566 POP_Node *getPOPNode(const char *path, int addextra = 0) const;
00567
00568
00569 DOP_Node *getDOPNode(const char *path, int addextra = 0) const;
00570 ROP_Node *getROPNode(const char *path, int addextra = 0) const;
00571
00572
00573 virtual void getFullPath(UT_String &str) const;
00574
00575
00576 virtual void getPathWithSubnet(UT_String &str) const;
00577
00578
00579 void getRelativePathTo(const OP_Node *base_node,
00580 UT_String &result) const;
00581
00582
00583
00584
00585
00586 void completePath(const char *prefixpath,
00587 UT_String &completepath) const;
00588
00589 virtual CH_Channel *getTrackChannel(const char *name);
00590
00591 virtual bool findParmFromTrack(float t, const char *trackname,
00592 OP_Node *&node,
00593 PRM_Parm *&parm, int &vecidx);
00594
00595
00596
00597
00598 virtual void evaluateBatchParms(PRM_BatchList &list, fpreal now);
00599
00600
00601
00602
00603
00604 void globNodes(const char *pat, UT_String *expand,
00605 UT_PtrArray<OP_Node *> *list=0,
00606 OP_GlobContext *context = 0,
00607 const char *prefix = " ");
00608
00609 CH_Channel *findChannel(const char *path);
00610 void globChannels(const char *, UT_String &expand,
00611 OP_GlobContext *context = 0,
00612 const char *prefix = " ") const;
00613
00614 void globChannels(const char *pattern,
00615 CH_ChannelList &clist,
00616 OP_GlobContext *context = 0,
00617 OP_Node *dependent = 0);
00618
00619 void globChanRefs(const char *pattern,
00620 CH_ChannelRefList &list,
00621 OP_GlobContext *context = 0,
00622 OP_Node *dependent = 0);
00623
00624 int globParms(const char *pattern, float t,
00625 UT_RefArray<opParmData> &list,
00626 OP_GlobContext *context = 0,
00627 OP_Node *dependent = 0,
00628 int calc_value = 1);
00629
00630
00631 void globNodeParms(const char *pattern, float t,
00632 UT_RefArray<opParmData> &list,
00633 OP_GlobContext *context,
00634 OP_Node *dependent,
00635 int calc_value,
00636 bool animated_only);
00637
00638
00639 void globNodeChannels(const char *pattern,
00640 CH_ChannelList &list,
00641 OP_GlobContext *context,
00642 int *parm_start = NULL,
00643 UT_IntArray *parm_indices = NULL
00644 ) const;
00645
00646
00647 void globNodeChanRefs(const char *pattern,
00648 CH_ChannelRefList &list,
00649 OP_GlobContext *context,
00650 int *parm_start = NULL,
00651 UT_IntArray *parm_indices = NULL
00652 ) const;
00653
00654
00655
00656
00657 virtual void globNetworkBoxes(const char *pat, UT_String *expand,
00658 UT_PtrArray<OP_NetworkBox *> *list=0,
00659 OP_GlobContext *glob_context = 0,
00660 const char *prefix = " ");
00661
00662 virtual void globPostIts(const char *pat, UT_String *expand,
00663 UT_PtrArray<OP_PostIt *> *list=0,
00664 OP_GlobContext *glob_context = 0,
00665 const char *prefix = " ");
00666
00667
00668 int getAllChannels(CH_ChannelList &list, int scoped=0);
00669
00670
00671
00672 virtual void opChanged(OP_EventType reason, void *data=0);
00673
00674
00675
00676
00677 virtual void referencedParmChanged(int pi);
00678
00679
00680
00681
00682
00683 virtual void forceRecook(bool evensmartcache = true);
00684
00685
00686
00687
00688
00689 virtual void reloadExternalFiles();
00690
00691
00692
00693
00694 virtual unsigned needToCook(OP_Context &context, bool queryonly=false);
00695
00696 virtual unsigned cook(OP_Context &context);
00697
00698
00699
00700
00701 virtual OP_ERROR pubCookInputGroups(OP_Context &context, int alone = 0);
00702
00703 void bumpVersionParm() { myVersionParms++; }
00704 int cookParmsModified() const
00705 { return myVersionParms != myVersionCache; }
00706
00707
00708
00709
00710
00711
00712 virtual int getDataClass() const;
00713
00714
00715
00716 virtual void getXformOrder(UT_XformOrder &xord, CH_Channel *chp);
00717
00718
00719
00720 virtual OP_DATA_TYPE getCookedDataType() const = 0;
00721 virtual void *getCookedData(OP_Context &);
00722 virtual void deleteCookedData() = 0;
00723
00724
00725
00726 virtual bool hasCookedData(OP_Context &);
00727
00728 virtual int saveCookedData(ostream &os, OP_Context &,
00729 int binary = 0) = 0;
00730 virtual bool loadCookedData(UT_IStream &is, const char *path=0);
00731 virtual int saveCookedData(const char *filename, OP_Context &) = 0;
00732
00733 virtual void *stealCookedData(void *);
00734
00735
00736
00737 virtual int getRelativeTransform(OP_Node &to, UT_Matrix4 &xform,
00738 OP_Context &context);
00739 virtual int getRelativeTransform(OP_Node &to, UT_DMatrix4 &xform,
00740 OP_Context &context);
00741
00742 virtual int getRelativeCaptureTransform(OP_Node &to,
00743 UT_Matrix4 &xform,
00744 OP_Context &context);
00745 virtual int getRelativeCaptureTransform(OP_Node &to,
00746 UT_DMatrix4 &xform,
00747 OP_Context &context);
00748 virtual void getRotations(float, float &, float &, float &);
00749
00750
00751
00752 virtual int getWorldTransform(UT_DMatrix4 &xform, OP_Context &);
00753 virtual int getIWorldTransform(UT_DMatrix4 &xform, OP_Context &);
00754
00755
00756 int getWorldTransform(UT_Matrix4 &xform, OP_Context &);
00757 int getIWorldTransform(UT_Matrix4 &xform, OP_Context &);
00758
00759
00760
00761 virtual const UT_DMatrix4 &getWorldTransform(OP_Context &);
00762 virtual const UT_DMatrix4 &getIWorldTransform(OP_Context &);
00763
00764
00765
00766 virtual bool getBoundingBox(UT_BoundingBox &box, OP_Context &);
00767
00768
00769
00770 virtual const char *getInternalOpTable() const
00771 { return INVALID_TABLE_NAME; }
00772 virtual OP_Operator *getInternalOperator() const
00773 { return 0; }
00774
00775
00776 virtual void getResolution(OP_Context &);
00777
00778
00779 virtual void stashCaptureAngles(float time);
00780
00781 virtual const char *inputLabel(unsigned idx) const;
00782 virtual const char *outputLabel(unsigned idx) const;
00783
00784
00785
00786 virtual const char *inputConnectorLabel(unsigned idx);
00787
00788
00789 virtual int isRefInput(unsigned ) const { return 0; }
00790
00791
00792
00793
00794
00795 bool hasRefOutputs(bool recurse_on_implicits = false) const;
00796
00797
00798
00799 virtual int getAuxInput() const;
00800
00801
00802
00803
00804
00805
00806
00807 int setLock(int state, int saveundo = 1);
00808 int getSoftLock() const {return flags().getSoftLocked();}
00809 int getHardLock() const {return flags().getHardLocked();}
00810 int getLock() const {return flags().getLocked(); }
00811
00812
00813
00814
00815
00816 int getNetworkLock(bool relaxedlockcheck = false,
00817 const OP_Node *inputNode = NULL) const;
00818
00819
00820 virtual int setModelLock(int on_off,
00821 void *modeler = 0,
00822 int allow_softlock_promotion=0,
00823 UT_Undo *undo = 0);
00824 int getModelLock() const;
00825
00826
00827
00828
00829 int setUnload(int on_off);
00830 int getUnload() const;
00831
00832
00833 virtual bool isLoaded() const { return true; }
00834
00835
00836
00837
00838 virtual bool unloadData();
00839
00840
00841 void takeActivateFlag(uchar flag, bool enable=true,
00842 bool send_flag_event=true);
00843 void takeDeactivateFlag(uchar flag)
00844 { takeActivateFlag(flag, false); }
00845 bool takeIsActiveFlag(uchar flag) const;
00846 void setHasTakeData(int onoff);
00847
00848 bool canAccessFlag(unsigned mask, uchar flag) const;
00849
00850
00851
00852
00853
00854
00855 virtual int setPicked(int on_off,
00856 bool propagate_parent_event = true);
00857
00858
00859
00860
00861
00862 int setEditPicked(int on_off,
00863 bool propagate_parent_event = true);
00864
00865 void setAutoscope(bool on_off) { myAutoscope = on_off; }
00866 bool isAutoscope() { return myAutoscope; }
00867
00868 int setCurrent(int on_off);
00869 int setExpose(int on_off);
00870 int setBypass(int on_off);
00871 int setTemplate(int on_off);
00872 int setFootprint(int on_off);
00873 int setXray(int on_off);
00874 int setDisplay(int on_off);
00875 int setRender(int on_off);
00876 int setHighlight(int on_off);
00877 int setModified(int on_off);
00878 int setSaveData(int on_off);
00879
00880 virtual int setPickable(int on_off);
00881 virtual int setAudio(int on_off);
00882 virtual int setExport(int on_off);
00883
00884
00885
00886
00887 void userSetTemplate(bool onoff);
00888
00889
00890
00891
00892 void userSetSelectableTemplate(bool onoff);
00893
00894
00895
00896 virtual int setFlag(char tag, int on_off);
00897 virtual int getFlag(char tag) const;
00898
00899 virtual int getPicked() const {return flags().getPicked(); }
00900 virtual int getEditPicked() const
00901 { return flags().getEditPicked(); }
00902 int getCurrent() const;
00903 int getDisplay() const {return flags().getDisplay(); }
00904 int getRender() const {return flags().getRender(); }
00905 int getHighlight()const {return flags().getHighlight();}
00906 int getBypass() const {return flags().getBypass(); }
00907 int getTemplate() const {return flags().getTemplate(); }
00908 int getFootprint() const {return flags().getFootprint(); }
00909 int getXray() const {return flags().getXray(); }
00910 int getExpose() const {return flags().getExpose(); }
00911 int getModified() const {return flags().getModified(); }
00912 int getSaveData() const {return flags().getSaveData(); }
00913 virtual int getHasTakeData() const
00914 { return flags().getHasTakeData(); }
00915 virtual int getPickable();
00916 virtual int getAudio() const;
00917 virtual int getExport() const;
00918 OP_Node *getPickableSelfOrParent();
00919
00920
00921 virtual void setExtraFlag(char, int) {}
00922
00923
00924
00925
00926
00927 virtual void setExtraFlags(int axis);
00928
00929
00930
00931
00932 int setCompress(int on_off);
00933 int getCompress() const;
00934
00935
00936
00937 void setCurrentAndPicked();
00938
00939
00940
00941
00942
00943
00944
00945 virtual bool setVisible(int onoff);
00946 virtual bool getVisible() const;
00947
00948
00949
00950
00951 virtual const OP_NodeFlags &flags() const
00952 { return static_cast<const OP_NodeFlags &>(OP_NetworkBoxItem::flags()); }
00953 virtual OP_NodeFlags &flags()
00954 { return static_cast<OP_NodeFlags &>(OP_NetworkBoxItem::flags()); }
00955
00956 virtual void getSaveFlagsString(UT_String &cmd,
00957 const char *flags,
00958 bool save_to_hip) const;
00959 virtual void getPreParmSaveFlagsString( UT_String &cmd ) const;
00960 virtual void getPostParmSaveFlagsString( UT_String &cmd ) const;
00961
00962 int hasOpInterest(void *data, OP_EventMethod m) const
00963 { return myEventValue.hasOpInterest(data, m); }
00964 void addOpInterest(void *data, OP_EventMethod m)
00965 { myEventValue.addOpInterest(data, m); }
00966 void removeOpInterest(void *data, OP_EventMethod m)
00967 { myEventValue.removeOpInterest(data, m); }
00968 int isBeingDeleted() const
00969 { return myBeingDeleted; }
00970 void setNodeBeingDeleted(int beingdeleted);
00971
00972
00973
00974
00975
00976
00977
00978
00979 static void repositionOpsMaxY(OP_NodeList &ops,
00980 UT_PtrArray<OP_NetworkBox *> &netboxes,
00981 float x, float y);
00982
00983
00984 virtual unsigned minInputs() const;
00985
00986
00987 virtual unsigned maxInputs() const;
00988
00989
00990
00991 virtual unsigned getNumVisibleInputs() const;
00992
00993
00994
00995
00996
00997 virtual unsigned orderedInputs() const;
00998
00999
01000
01001 virtual unsigned maxOutputs() const;
01002
01003
01004
01005 virtual unsigned getNumVisibleOutputs() const;
01006
01007
01008 bool hasUnorderedInputs() const;
01009
01010
01011
01012 unsigned nInputs() const { return myInputs.entries(); }
01013
01014
01015
01016 unsigned nConnectedInputs() const;
01017
01018 unsigned getActiveInputIndex() const
01019 { return myActiveInputIndex; }
01020 void setActiveInputIndex(unsigned idx);
01021
01022 OP_Node *getExtraInput(unsigned idx) const;
01023
01024 OP_InterestType getExtraInputInterest(unsigned idx) const;
01025
01026 unsigned nExtraInputs() const { return myExtraInputs.entries();}
01027
01028 OP_Node *getInput(unsigned idx, bool mark_used=false) const;
01029
01030
01031
01032 int getConnectedInputIndex(int startAt = -1) const;
01033
01034
01035 int getNthConnectedInput(int n) const;
01036
01037
01038 virtual OP_ERROR setInput(unsigned idx, OP_Node *op,
01039 unsigned outputIdx = 0);
01040
01041
01042 virtual OP_ERROR setIndirectInput(unsigned idx,
01043 OP_InputIndirect *input);
01044
01045
01046 virtual OP_ERROR setInputReference(unsigned idx, const char *label,
01047 int keeppos, unsigned outputIdx = 0);
01048
01049
01050
01051 int whichInputIs(const OP_Node *who) const;
01052
01053
01054 int whichInputIs(const OP_InputIndirect *who) const;
01055
01056
01057
01058
01059 int whichOutputIs(OP_Node* target_node, int input_on_target_node);
01060
01061
01062
01063
01064 int whichInputIs(OP_Node* source_node, int counter);
01065
01066
01067 void consolidateInputs();
01068 virtual void clearUnreferencedInputs();
01069 virtual OP_Input *getInputReference(unsigned idx, int grow=1);
01070 virtual OP_Input *getInputReferenceConst(unsigned idx) const;
01071 virtual int doDeleteRewire() const { return 1; }
01072
01073
01074
01075 virtual void moveInput(int srcidx, int dstidx,
01076 bool forcesubnet = false);
01077 OP_ERROR insertInput(unsigned idx, OP_Node *op,
01078 unsigned outputIdx);
01079 OP_ERROR insertIndirectInput(unsigned idx,
01080 OP_InputIndirect *input);
01081
01082
01083 virtual void addExtraInput(OP_Node *op, OP_InterestType type);
01084
01085
01086
01087 static void addExprOpDependency(const char *arg_str,
01088 const OP_RefId &ref_id,
01089 OP_InterestType interest_type);
01090 static void addExprOpDependency1From2(const char *arg_str1,
01091 const char *arg_str2,
01092 const OP_RefId &ref_id,
01093 OP_InterestType interest_type);
01094 static void addExprOpParmDependency(const char *arg_str,
01095 const OP_RefId &ref_id,
01096 OP_InterestType interest_type);
01097
01098 static void changeExprOpRef(const char *arg_str,
01099 char *&new_arg,
01100 const char *new_fullpath,
01101 const char *old_fullpath,
01102 const char *old_cwd);
01103
01104 static void changeExprOpRef1From2(const char *arg_str1,
01105 const char *arg_str2,
01106 char *&new_arg1,
01107 char *&new_arg2,
01108 const char *new_fullpath,
01109 const char *old_fullpath,
01110 const char *old_cwd);
01111
01112 static void changeExprOpParmRef(const char *arg_str,
01113 char *&new_arg,
01114 const char *new_fullpath,
01115 const char *old_fullpath,
01116 const char *old_cwd,
01117 const char *chan_name,
01118 const char *old_chan_name);
01119
01120 void addGenericOpNameReference( const UT_String &oppath );
01121 void addGenericOpNameReference( const OP_RefId &ref_id,
01122 OP_Node *node );
01123
01124 static void moveAndUpdateDependencies(
01125 const OP_NodeList &src_nodes,
01126 const OP_NodeList &dest_nodes );
01127
01128 static void updateChannelPtrs( CH_CollectionList &parents );
01129
01130
01131
01132
01133 virtual void rebuildParmDependency( int parm_index );
01134
01135
01136 virtual void clearParmDependency( int parm_index );
01137
01138 void decrementOpReference(int node_id);
01139
01140 virtual void dumpDependencies();
01141 void dumpOpDependents(OP_Node *ref, int brief, ostream &os);
01142 int countReferences(int op_id);
01143
01144 void getExistingOpReferences(OP_NodeList &refs,
01145 bool recurse);
01146
01147 void getExistingOpDependents(OP_NodeList &deps,
01148 bool recurse);
01149 UT_RefArray<OP_Dependency> &getOpDependents() { return myOpDependents; }
01150
01151
01152 void getParmsThatReference(const char *channame,
01153 UT_PtrArray<PRM_Parm *> &parms,
01154 UT_IntArray &parmsubidxs);
01155
01156 virtual void inputConnectChanged(int which);
01157
01158
01159
01160
01161 unsigned nOutputs(int outputIdx = -1) const;
01162
01163 OP_Node *getOutput(unsigned idx, int outputIdx = -1);
01164
01165 const OP_Node *getOutput(unsigned idx, int outputIdx = -1) const;
01166
01167 unsigned nExtraOutputs() const
01168 { return myExtraOutputs.entries(); }
01169
01170 const OP_Node *getExtraOutput(unsigned idx)
01171 {
01172 return (idx < myExtraOutputs.entries())
01173 ? myExtraOutputs(idx) : 0;
01174 }
01175 void getNonSubnetOutputs( OP_NodeList &nodes ) const;
01176
01177
01178
01179 OP_Node *getOutputTowardsNode( const OP_Node *target );
01180
01181
01182
01183
01184 void fillInfoTree(UT_InfoTree &tree, float time);
01185
01186
01187
01188
01189 virtual void fillInfoTreeNodeSpecific(UT_InfoTree &tree,float time);
01190
01191
01192
01193
01194
01195
01196 virtual const char *getDefaultSelectedInfoTreeBranchName() const;
01197
01198
01199
01200
01201
01202
01203
01204
01205
01206
01207
01208
01209
01210
01211
01212 virtual OP_ERROR lockInput(unsigned idx, OP_Context &context);
01213 virtual void unlockInput(unsigned idx);
01214 virtual OP_ERROR lockInputs(OP_Context &context);
01215 virtual void unlockInputs(void);
01216
01217
01218
01219
01220 int getCookCount(void) const { return myCookCount; }
01221 void triggerOutputChanged();
01222
01223
01224
01225 int getSourceCount(void) const { return mySourceCount; }
01226 int bumpSourceCount(int d)
01227 {
01228 mySourceCount += d;
01229 return mySourceCount;
01230 }
01231
01232 virtual void setCacheSize(int size);
01233 virtual int getCacheSize() const;
01234
01235 OP_VERSION getVersionParms() const { return myVersionParms; }
01236
01237
01238
01239 virtual bool handleTimeChange( float ) { return false; }
01240
01241
01242
01243 bool isTimeDependent(OP_Context &context);
01244
01245 static int getGlobbedNodes(OP_Node *cwd, UT_String &holder,
01246 const char *pattern, UT_WorkArgs &argv,
01247 OP_GlobContext *context);
01248
01249 static int getGlobbedNetworkBoxes(OP_Node *cwd, UT_String &holder,
01250 const char *pattern, UT_WorkArgs &argv,
01251 OP_GlobContext *context);
01252
01253 static int getGlobbedPostIts(OP_Node *cwd, UT_String &holder,
01254 const char *pattern, UT_WorkArgs &argv,
01255 OP_GlobContext *context);
01256
01257
01258
01259
01260
01261 virtual bool runCreateScript();
01262
01263
01264 void updateParmsToMatchCurrentUnits();
01265
01266
01267 void loadContentsSection();
01268
01269
01270 const UT_String &getSyncErrors() const
01271 { return mySyncErrors; }
01272
01273 OP_ERROR getSyncErrorLevel() const
01274 { return mySyncErrorLevel; }
01275
01276 int getMatchesOTLDefinition() const;
01277 void setMatchesOTLDefinition(int matches);
01278 static void propagateSyncToAncestors(OP_Node *node,
01279 bool sync_flag);
01280
01281
01282
01283 int getCanDeviateFromOTLDefinition() const;
01284 void setAllChildAssetPermissions(int permission);
01285
01286
01287 bool getIsEditableAssetSubNode() const;
01288
01289
01290 void turnOffAllChildExports(void);
01291
01292
01293 bool haveLicenseToAccessContents() const;
01294 bool haveLicenseToAccessParentContents() const;
01295 bool haveAncestorWithoutFullLicense(bool ignore_self) const;
01296 OP_OTLLicenseType getLicense() const;
01297
01298 OP_Node *getFirstExecLicenseOnlyAncestor(
01299 bool ignore_self = true) const;
01300
01301 OP_Node *getLastExecLicenseOnlyAncestor(
01302 bool ignore_self = true) const;
01303
01304
01305 void saveWires(ostream &os, const char *name,
01306 int dogeneral = 0);
01307 void saveOutputWires(ostream &os, const char *name,
01308 int dogeneral = 0);
01309 virtual void saveIntrinsicCommand(ostream &os, const char *name);
01310
01311
01312 virtual OP_ERROR saveCommand(ostream &os,
01313 const char *name,
01314 int valuesOnly,
01315 int defaultstoo,
01316 int docreate,
01317 int doparms,
01318 int doflags,
01319 int dowires,
01320 int dowiresout,
01321 int frames,
01322 int dogeneral,
01323 int dochblock,
01324 float x,
01325 float y,
01326 const char *netboxname,
01327 int dospareparms);
01328
01329
01330
01331
01332
01333
01334
01335
01336
01337
01338
01339
01340
01341
01342
01343 void saveParameterFlags(ostream &os, const char *name,
01344 const char *command,
01345 bool (PRM_Parm::*flag_method)(int) const,
01346 bool defaultstoo, bool reverse,
01347 UT_RefArray<opParmData> *parm_array);
01348
01349 enum RampError
01350 {
01351 RAMP_ERR_SUCCESS,
01352 RAMP_ERR_NOT_FOUND,
01353 RAMP_ERR_FIRST_OR_LAST_KEY
01354 };
01355 virtual RampError rampCommand(bool remove, float pos, float rgba[4]);
01356 RampError rampCommand(bool remove, float pos, float rgba[4],
01357 UT_Ramp &ramp);
01358
01359 virtual bool loadRamp(UT_IStream &is, const char *path=0);
01360
01361 bool loadRamp(UT_IStream &is, UT_Ramp &ramp,
01362 const char *path=0);
01363 OP_ERROR saveRamp(ostream &os, UT_Ramp &ramp,
01364 const char *name = 0, int command = 0);
01365
01366 bool loadExtraInputs(UT_IStream &is, const char *path=0);
01367
01368 void saveOverrides(ostream &os);
01369 void saveOverrides(ostream &os, OP_Node *root,
01370 const UT_String &rootpath,
01371 bool &added);
01372 void saveChildOverrides(ostream &os, OP_Node *root,
01373 const UT_String &rootpath,
01374 bool &added);
01375 bool loadOverride(UT_IStream &is);
01376 virtual int prmCookOverrides(float t);
01377 OP_ERROR cookOverrides(OP_Context &c);
01378
01379 virtual void removeOverrideDestination(OP_Node * ) {}
01380 virtual void removeOverrideDestination(OP_Node * ,
01381 int ) {}
01382
01383
01384 virtual void executeCommand(const char *command,
01385 ostream *out,
01386 ostream *err) const;
01387 virtual void pushAsPwdAndRunPython(
01388 PY_CompiledCode &compiled_code,
01389 PY_Result::Type desired_result_type,
01390 PY_Result &result) const;
01391
01392 OP_ERROR executeHscriptScript(UT_String &script, float now);
01393 OP_ERROR executePythonScript(UT_String &script, float now);
01394
01395 void saveInputs(ostream &os);
01396 bool loadInputs(UT_IStream &is, const char *path=0);
01397
01398 void checkInputs();
01399
01400
01401
01402
01403 virtual void saveDialogScriptExtraInfo(ostream &os);
01404
01405
01406 virtual void createGalleryEntry(OP_GalleryEntry &entry);
01407
01408
01409
01410
01411
01412
01413
01414 void evalOpPathString(UT_String &val, int pi, int vi,
01415 float t, int &op_id, float &op_time,
01416 int expanded = 1);
01417 void evalOpPathString(UT_String &val, const char *pn,
01418 int &pi, int vi, float t,
01419 int &op_id, float &op_time, int expanded=1);
01420 static int findOpFramePair(const char *path, int &op_id,
01421 float &frame);
01422
01423
01424 static void buildXformOrder(int trs, int xyz,
01425 UT_XformOrder &order);
01426
01427
01428 static UT_XformOrder::rstOrder getMainOrder( int trs );
01429
01430
01431 static int getMainOrderMenuIndex(UT_XformOrder::rstOrder order);
01432
01433 static UT_XformOrder::xyzOrder getRotOrder( int xyz );
01434
01435
01436 static int getRotOrderMenuIndex(UT_XformOrder::xyzOrder order);
01437
01438 static UT_Vector3 getXformPivot(int trs,
01439 float tx, float ty, float tz,
01440 float px, float py, float pz);
01441 static UT_Vector3 getPivotParmValue(int trs,
01442 float tx, float ty, float tz,
01443 float px, float py, float pz);
01444 static void buildXform(int trs, int xyz,
01445 float tx, float ty, float tz,
01446 float rx, float ry, float rz,
01447 float sx, float sy, float sz,
01448 float px, float py, float pz,
01449 UT_Matrix4 &mat);
01450 static void buildXform(int trs, int xyz,
01451 float tx, float ty, float tz,
01452 float rx, float ry, float rz,
01453 float sx, float sy, float sz,
01454 float px, float py, float pz,
01455 UT_DMatrix4 &mat);
01456 static void buildXform(int trs, int xyz,
01457 float tx, float ty, float tz,
01458 float rx, float ry, float rz,
01459 float sx, float sy, float sz,
01460 float s_xy, float s_xz, float s_yz,
01461 float px, float py, float pz,
01462 UT_Matrix4 &mat);
01463 static void buildXform(int trs, int xyz,
01464 float tx, float ty, float tz,
01465 float rx, float ry, float rz,
01466 float sx, float sy, float sz,
01467 float s_xy, float s_xz, float s_yz,
01468 float px, float py, float pz,
01469 UT_DMatrix4 &mat);
01470 static void buildXform(int trs,
01471 float tx, float ty, float rz,
01472 float sx, float sy, float px, float py,
01473 UT_Matrix3 &mat);
01474 static void buildXform(int trs,
01475 float tx, float ty, float rz,
01476 float sx, float sy, float px, float py,
01477 UT_DMatrix3 &mat);
01478 static void buildXform(int trs,
01479 float tx, float ty, float rz,
01480 float sx, float sy, float s_xy,
01481 float px, float py,
01482 UT_Matrix3 &mat);
01483 static void buildXform(int trs,
01484 float tx, float ty, float rz,
01485 float sx, float sy, float s_xy,
01486 float px, float py,
01487 UT_DMatrix3 &mat);
01488
01489 virtual int getTranslateParmIndex();
01490
01491
01492
01493 void resolveInputReferences();
01494
01495 static void clearAllPendingUndoFlags();
01496
01497 virtual void clearUndoFlags();
01498 virtual void setAnyUndoFlag();
01499 void saveForUndoInput();
01500
01501 void blockModify(int on_off, int propagate = 1);
01502 int isBlockModify(void) const;
01503 virtual void propagateEndBlockModify();
01504
01505 int getNParmInterests() const
01506 { return myParmInterestCount; }
01507 const OP_ParmInterest *getParmInterest(int index) const
01508 {
01509 return (index < myParmInterestCount)
01510 ? myParmInterests(index) : 0;
01511 }
01512
01513
01514
01515
01516
01517 void addParmInterest(OP_Node *src, int srcindex,
01518 int dstindex);
01519 void dumpParmInterests() const;
01520
01521
01522 virtual const CL_Clip *getClip(OP_Context *context = 0);
01523
01524
01525
01526 void getMotionEffectsNetworkPath(UT_String &path);
01527
01528
01529 float getCookDuration() const;
01530 const char *getCookDurationString() const;
01531
01532
01533 virtual int getNetOverviewColor( UT_Color &color );
01534
01535
01536 virtual UT_Ramp *getRamp();
01537
01538 virtual int isCookingRender() const { return 0; }
01539 virtual void setCookingRender(int val);
01540
01541 virtual void clearInterrupted();
01542 int wasInterrupted() const { return flags().interrupted; }
01543
01544
01545
01546
01547 void setRenameConflict()
01548 { myRenameConflict = 1; }
01549 void setRunningCreateScript(int onoff);
01550
01551
01552 virtual int outputCode(OP_OutputCodeParms &, OP_Context &);
01553
01554 virtual float getTimeTransform(int input, float t);
01555 virtual void getInputRes(int input, float t,
01556 const OP_Context &context,
01557 OP_Context &input_context);
01558
01559
01560 static void setIndentLevel(int numspaces);
01561 static void writeIndent(ostream &os, int indent);
01562 static void writeSpaces(ostream &os, int spaces);
01563 static void writeFileHeader(ostream &os, const char *filename,
01564 const char *prefix);
01565
01566 UT_TokenString & getHashCode(OP_Context &context, int group_mask =1);
01567 virtual UT_TokenString & getParmHashCode(OP_Context &context,
01568 int group_mask = 1);
01569
01570 virtual int getNumInputsToHash();
01571 virtual OP_Node *getInputToHash(int i);
01572
01573 void clearHashCodeFlags();
01574 bool isHashCodeBuilt() const { return myBuiltHashCode;}
01575 void builtHashCode(bool b = true) { myBuiltHashCode = b; }
01576 void buildInputHashCode(UT_TokenString &string,
01577 OP_Context &context,
01578 int group_mask,
01579 int level);
01580
01581
01582 void setCreatorState(const char *s)
01583 { myCreatorState.harden(s); }
01584 const UT_String &getCreatorState() const { return myCreatorState; }
01585 void builtExplicitly(int yn) { myBuiltExplicitly = yn; }
01586 int wasBuiltExplicitly() const{ return myBuiltExplicitly; }
01587
01588 bool matchesState(const char *state) const;
01589
01590
01591
01592 virtual void changeParmTemplate(PRM_Template *new_template);
01593
01594 void ensureInputsAndOutputsAreValid();
01595
01596
01597
01598 void connectToInputNode(OP_Node &inputnode, int input_idx,
01599 int branch_off=0);
01600
01601
01602 virtual int editCallback(CL_Track *track, float t,
01603 float newValue);
01604
01605
01606 static OP_EditCallback getEditCallback(void *&data);
01607 static void setEditCallback(OP_EditCallback func,
01608 void *data);
01609
01610
01611
01612
01613
01614 static void buildQuadricXform(UT_Matrix4 &mat,
01615 float tx, float ty, float tz,
01616 float sx, float sy, float sz,
01617 char axis = 'y');
01618
01619 static void buildQuadricXform(UT_DMatrix4 &mat,
01620 float tx, float ty, float tz,
01621 float sx, float sy, float sz,
01622 char axis = 'y');
01623
01624 static int buildOpMenu(OP_Network *net, PRM_Name *theMenu,
01625 int theMenuSize, int (*doAdd)(OP_Node *) = 0,
01626 int startItem = 0, PRM_Parm *parm = 0,
01627 int showSubnets = 1, int expandSubnets = 1,
01628 bool recurse = false);
01629
01630
01631
01632
01633 static void buildPreDefRulesMenu(PRM_Name *menu,
01634 OP_PreDefRules &pdr);
01635
01636
01637
01638
01639
01640 virtual const CH_LocalVariable *resolveVariable(const char *name);
01641 virtual const CH_LocalVariable *resolveExtraVariableForSyntaxHighlight(
01642 const char *name);
01643
01644
01645 static int getNameSerialIndex();
01646
01647
01648 virtual void setMapping(int idx, int type, const char *label = 0);
01649 virtual int getMapping(int idx, const char *&label) const;
01650
01651
01652 virtual int acceptDragDrop(DD_Source &src, const char *label);
01653 virtual int testDragDrop(DD_Source &src);
01654 virtual void getDragDropChoice(DD_Source &src, DD_ChoiceList &c);
01655
01656
01657 bool hasComment() const;
01658 bool hasParmsNotAtFactoryDefault() const;
01659 bool hasAnimatedParms() const;
01660 bool hasChopOverriddenParms() const;
01661
01662
01663
01664
01665
01666
01667
01668
01669
01670
01671
01672
01673
01674
01675
01676 bool traverseInputs(bool (*callback)(OP_Node &, void *),
01677 void *data,
01678 bool follow_subnets,
01679 bool follow_ref_inputs,
01680 bool follow_extra_inputs,
01681 OP_InterestType extra_interest_mask =
01682 OP_INTEREST_ALL);
01683 bool traverseInputs(bool (*callback)(const OP_Node &, void*),
01684 void *data,
01685 bool follow_subnets,
01686 bool follow_ref_inputs,
01687 bool follow_extra_inputs,
01688 OP_InterestType extra_interest_mask =
01689 OP_INTEREST_ALL) const;
01690
01691
01692
01693
01694 bool traverseChildren(bool (*callback)(OP_Node &, void*),
01695 void *data,
01696 bool recurse_into_subnets);
01697
01698
01699
01700 virtual bool usesFootprint() const { return false; }
01701
01702 void getExternalReferences(UT_StringArray &reflist,
01703 UT_StringArray *nodelist = 0,
01704 bool from_children_too = true,
01705 bool collapse = false,
01706 bool check_missing = false,
01707 bool show_missing_only = false);
01708 virtual bool getSaveWithVopnets();
01709 virtual void runDelScript();
01710
01711
01712
01713 virtual DOP_Parent *castToDOPParent() { return 0; }
01714 virtual const DOP_Parent *castToDOPParent() const { return 0; }
01715
01716
01717
01718
01719 virtual VOP_CodeGenerator *getVopCodeGenerator() { return 0; }
01720
01721
01722
01723 bool setChannelAlias(PRM_Parm &parm, int subindex,
01724 const char *alias_name);
01725
01726 void disconnectAllInputsOutputs(bool keepSelected,
01727 bool forceDisconnectOutputs = false);
01728
01729 void disconnectAllInputs(void);
01730 void disconnectAllOutputs(void);
01731
01732
01733 virtual void notifyParmRenameDependents(
01734 const UT_String &chan_name,
01735 const UT_String &old_chan_name );
01736
01737 void writeChannel(CH_Channel *channel, ostream &os,
01738 const char *name, bool frames);
01739 void writeAllChannels(ostream &os, const char *name,
01740 bool frames, bool dochblock,
01741 bool dospareparms);
01742
01743
01744
01745
01746 virtual bool triggerParmCallback(PRM_Parm *parmptr, float now,
01747 int value, void *data);
01748
01749 virtual int64 getMemUsage(UT_Bool onlythis) const;
01750 int64 getExtraInputMemUsage() const;
01751 static void printOpMemoryUsageStats(ostream &os);
01752
01753
01754
01755
01756
01757 virtual void unscopeChannels(bool recurse);
01758
01759
01760
01761
01762 virtual void setChannelScope(const char *pattern,
01763 OP_ScopeOp scope_op,
01764 const OP_ScopeOptions &scope_opts);
01765
01766
01767
01768 virtual const UT_String &getItemName() const { return getName(); }
01769
01770
01771 virtual bool changeSpareParms(UT_IStream &istream,
01772 UT_String &errors);
01773
01774
01775 virtual void spareParmRemoved(const char *parmname);
01776
01777
01778
01779 virtual PRM_ParmList *createObsoleteParmList();
01780 virtual void resolveAndDeleteObsoleteParmList(
01781 PRM_ParmList *&obsolete_parms);
01782
01783
01784
01785
01786
01787
01788
01789 bool setGlobalFloatParam(const char *param,
01790 float value,
01791 bool *warned);
01792 bool setGlobalStringParam(const char *param,
01793 const char *strvalue,
01794 bool *warned);
01795
01796
01797
01798
01799 void beginPropagateModification(OP_PropagateData *data = 0);
01800 void endPropagateModification();
01801
01802
01803 virtual void getActiveOperatorsDefinedByOTL(
01804 UT_HashTable &active_operators) const;
01805
01806
01807
01808
01809
01810 static bool getDoingBulkNotification();
01811
01812
01813
01814
01815 virtual bool hasDifferentMultiInputs() const;
01816
01817
01818 bool canCreateNewOpType() const;
01819 static bool createNewOpType
01820 (OP_Node *node,
01821 UT_String &errors,
01822 const char *typeName=NULL,
01823 const char *typeLabel=NULL,
01824 const char *otlFile=NULL,
01825 const char *metaSource=NULL,
01826 const char *comment=NULL,
01827 const char *version=NULL,
01828 const char *newName=NULL,
01829 int minimumInputs=-1,
01830 int maximumInputs=-1,
01831 bool ignoreExternalReferences=false,
01832 bool compressContents=false,
01833 bool force=false,
01834 int *newNodeId=NULL);
01835
01836
01837 virtual UT_String *getMaterialIconFilename() { return 0; }
01838 virtual void setMaterialIconFilename(char * ) {}
01839 virtual IMG_Raster *getMaterialIconImage() { return 0; }
01840 virtual bool getMaterialIconAllowRegenerateFlag() { return true; }
01841 virtual void setMaterialIconAllowRegenerateFlag(bool) {}
01842
01843
01844 static const char *OP_INFO_SEPARATOR_STRING;
01845
01846
01847
01848
01849
01850 static void setSmallMode();
01851
01852 static bool getSmallMode();
01853
01854
01855
01856
01857
01858 static void startBulkNotifications(
01859 const OP_NodeList &changed);
01860 static void endBulkNotifications(
01861 const OP_NodeList &changed);
01862
01863
01864 static void setNodeButtonWidthFlagMult(int new_mult);
01865
01866
01867
01868
01869
01870 virtual bool willAutoconvertInputType(int input_idx);
01871
01872 protected:
01873 OP_Node(OP_Network *parent, const char *name, OP_Operator *entry);
01874 virtual ~OP_Node();
01875
01876 void setNewParent( OP_Network *new_parent );
01877
01878 static void bumpNameSerialIndex();
01879
01880
01881
01882 virtual void clearAndDestroy(void);
01883
01884
01885
01886
01887
01888
01889
01890 virtual OP_ERROR cookMe(OP_Context &context) = 0;
01891
01892
01893
01894
01895
01896 virtual OP_ERROR bypassMe(OP_Context &context, int &copied_input) = 0;
01897
01898
01899
01900
01901 virtual void doOverridePreCook() { }
01902 virtual void doOverridePostCook() { }
01903
01904
01905
01906 virtual OP_ERROR cookInputGroups(OP_Context &context, int alone = 0);
01907
01908
01909
01910
01911
01912
01913 virtual int deleteNodeData(void *);
01914 virtual void *copyNodeData(void *);
01915
01916
01917 virtual OP_ERROR saveIntrinsic(ostream &os, const OP_SaveFlags &flags);
01918 virtual OP_ERROR save(ostream &os, const OP_SaveFlags &flags,
01919 const char *path_prefix = "");
01920
01921 bool loadIntrinsic(UT_IStream &is, const char *path=0);
01922 virtual bool loadPacket(UT_IStream &is, short class_id,
01923 short sig, const char *path=0);
01924 virtual bool loadPacket(UT_IStream &is, const char *token,
01925 const char *path=0);
01926 virtual bool load(UT_IStream &is, const char *ext="",
01927 const char *path=0);
01928
01929
01930 virtual void loadStart();
01931 virtual void loadFinished();
01932
01933
01934
01935 virtual bool syncContents(UT_IStream &is);
01936
01937 virtual const char *getFileExtension(int binary) const = 0;
01938 virtual const char *getDataFileExtension(int binary) const;
01939
01940
01941
01942 const char *inputLabelNum(unsigned idx) const;
01943 const char *outputLabelNum(unsigned idx) const;
01944
01945
01946
01947 virtual void checkTimeDependencies( int do_parms=1,
01948 int do_inputs=1,
01949 int do_extras=1 );
01950 unsigned isInput(unsigned idx)
01951 { return idx < myInputs.entries(); }
01952
01953
01954 void sendEvent(OP_EventType type, void *data=0);
01955
01956
01957
01958 int haveSeenDataModification(long modification_id);
01959
01960
01961
01962
01963
01964
01965
01966
01967
01968 virtual int propagateModification(OP_Node *by_whom,
01969 OP_EventType reason,
01970 int parm_index,
01971 OP_PropagateData &prop_data);
01972 virtual void propagateParmChange(OP_Node *node,
01973 OP_PropagateData &prop_data,
01974 bool &data_changed);
01975 void propagateParmChangeFromSource(OP_Node *source,
01976 OP_PropagateData &data);
01977
01978 void putDataIntoCache(void *, OP_Context &);
01979 OP_Cache myCache;
01980
01981 OP_VERSION getVersionCache();
01982 void setVersionCache(OP_VERSION);
01983
01984 static void deleteDataCallback(void *, void *);
01985 static void *copyDataCallback(void *, void *);
01986
01987 static void cmd_locate(CMD_Args &);
01988
01989 virtual void saveFlagsForUndo();
01990 void saveForUndoLayout();
01991 void saveForUndoColor();
01992
01993 static void saveForUndoDelete(OP_NodeList &nodes);
01994
01995
01996 void clearDependency(bool include_parm);
01997 void clearExtraInputs();
01998 void clearParmInterests()
01999 {
02000 myParmInterestCount = 0;
02001 mySelfParmInterest = false;
02002 mySelfParmDataInterest = false;
02003 }
02004
02005
02006
02007 virtual void cloneFromProxyRefNode( OP_Network *proxy );
02008
02009 virtual OP_Network * cloneToProxyRefNode();
02010 void stealDependents( OP_Node *other );
02011
02012 int hasOpDependents()
02013 { return myOpDependents.entries(); }
02014 virtual int hasProxyRefNodes() const
02015 { return 0; }
02016 virtual void moveProxyRefNodes( OP_Network * ) { }
02017 void clearOpReferences();
02018 virtual void rebuildOpDependents( bool proxy_only );
02019
02020
02021 virtual int removeOpDependent(
02022 int op_id, const OP_RefId &ref_id,
02023 OP_InterestType mask = OP_INTEREST_ALL );
02024 virtual int removeOpDependent(
02025 int op_id, OP_InterestType mask = OP_INTEREST_ALL );
02026
02027
02028
02029
02030
02031 virtual void buildOpDependencies();
02032 virtual void checkChannelDependencies( CH_Channel *ch,
02033 CH_CHANGE_TYPE reason );
02034
02035 void notifyOpDependents( OP_InterestType interest,
02036 bool recurse );
02037 virtual void moveDependencies( OP_Node *from_node );
02038
02039
02040
02041
02042
02043 void notifyRenameDependents( const UT_String &full_from );
02044 virtual void notifyRenameDependents( const UT_String &full_from,
02045 OP_NodeList &cook_nodes );
02046
02047
02048
02049
02050
02051 void notifyRenameReferences( const UT_String &full_from );
02052 virtual void notifyRenameReferences( const UT_String &full_from,
02053 OP_NodeList &cook_nodes );
02054 void notifyExtraNameOutputs( const char *old_name );
02055
02056
02057 virtual void handleOpDependency( int referenced_op_id,
02058 const OP_Dependency &op_dep,
02059 OP_InterestType interest_type,
02060 bool &need_cook,
02061 const char *old_fullpath,
02062 const char *old_cwd,
02063 const char *old_chan_name );
02064 virtual void buildParmDependency( int parm_index );
02065
02066 void addOpNameReference(
02067 const OP_RefId &ref_id, const UT_String &op_path,
02068 OP_InterestType type );
02069
02070 void addChannelNameReference(
02071 const OP_RefId &ref_id, const UT_String &op_path,
02072 const UT_String &chan_name, OP_InterestType type );
02073
02074 OP_Node *getNodeOrCreateProxy(const UT_String &op_path);
02075
02076 void addOpReference( const OP_RefId &ref_id, OP_Node *node,
02077 const OP_RefId &source_ref_id,
02078 OP_InterestType type );
02079
02080
02081
02082
02083
02084
02085
02086
02087
02088
02089
02090
02091
02092
02093
02094 bool changeOpPathRef( UT_String &value_str,
02095 const char *new_fullpath,
02096 const char *old_fullpath,
02097 const char *old_cwd,
02098 const char *new_cwd );
02099
02100
02101
02102 static bool getStringParmOpPath(
02103 PRM_Parm &parm, int vi, UT_String &oppath,
02104 int thread );
02105 void handleStringParmOpPathDependency(
02106 int parm_index, int vi,
02107 const char *new_fullpath,
02108 const char *old_fullpath, const char *old_cwd );
02109
02110
02111
02112 virtual void nodeDeleted(OP_Node *op, int propagate=1);
02113
02114 void startCookTimer(const OP_Context &context);
02115 void stopCookTimer();
02116
02117 virtual const char *getCookTimerLabel(const OP_Context &context) const;
02118
02119
02120 virtual void permissionError(const char *chname = 0);
02121
02122
02123 void addInputError(unsigned input_idx);
02124
02125
02126
02127
02128
02129 virtual bool isInputConnectedInsideSubnet(int input_idx) const;
02130
02131
02132 virtual void nodeUnlocked() { ; }
02133
02134
02135 virtual void setUniqueId(int id);
02136 void changeOpDependentUniqueId( int old_id, int new_id );
02137 void changeOpReferenceUniqueId( int old_id, int new_id );
02138 virtual void clearUniqueId();
02139
02140 void setAllowBuildDependencies( int yesno )
02141 { myAllowBuildDependencies = yesno; }
02142 int allowBuildDependencies() const
02143 { return myAllowBuildDependencies; }
02144
02145
02146
02147 void evaluateAllParms(float t);
02148
02149
02150
02151 virtual void getMyExternalReferences(UT_StringArray &reflist,
02152 UT_StringArray *nodelist =0,
02153 bool collapse = false,
02154 bool check_missing = false,
02155 bool show_missing_only=false);
02156
02157 void getExternalFiles(UT_StringArray &files,
02158 const char *stringparm,
02159 int framestart, int frameend,
02160 bool collapse,
02161 bool check_missing,
02162 bool show_only_missing,
02163 UT_KnownPath path);
02164
02165
02166 virtual bool canDestroyNode();
02167
02168
02169
02170
02171
02172
02173 static bool canDestroyNodes(OP_Network *src_net,
02174 OP_NodeList *nodes);
02175
02176
02177
02178
02179
02180 virtual bool cookedDataUsesAllParameters() const
02181 { return false; }
02182
02183
02184 virtual bool cookedDataNeedsErrors() const
02185 { return false; }
02186
02187
02188
02189 bool getIsRunningInCreateScript() const;
02190
02191
02192
02193
02194
02195 virtual void refreshRepresentativeNode(OP_Node &changed_child);
02196
02197
02198
02199 void appendExportingChopToCook( int id );
02200
02201
02202
02203 void convertOpdefToAbsolutePath(UT_String &str) const;
02204
02205 bool isCookedTime(float t) const;
02206
02207 UT_TokenString myHashCode;
02208 UT_TokenString myParmHashCode;
02209 int myLastGroupMask;
02210 OP_VERSION myHashVersion;
02211 float myHashTime;
02212 int myParmLastGroupMask;
02213 OP_VERSION myParmHashVersion;
02214 float myParmHashTime;
02215 UT_String mySyncErrors;
02216 OP_ERROR mySyncErrorLevel;
02217 int mySyncDepth;
02218
02219
02220
02221
02222
02223
02224
02225 static fpreal getFlagWidth();
02226
02227
02228 static fpreal getNodeHeight();
02229
02230
02231
02232 static fpreal getNodeButtonWidth();
02233
02234
02235
02236 static fpreal getConnectorHeight();
02237
02238 static bool theSmallMode;
02239
02240
02241
02242 void deleteInput(int idx);
02243
02244 private:
02245 #ifdef INTEL_COMPILER
02246 OP_Node(const OP_Node& );
02247 #endif
02248
02249 void createCollection( OP_Operator *entry );
02250
02251
02252
02253 OP_ERROR saveIntrinsicError();
02254 OP_ERROR saveError();
02255 OP_ERROR saveGroupMemberships(ostream &os,
02256 const OP_SaveFlags &flags,
02257 const char *path_prefix);
02258 bool loadGroupMemberships(UT_IStream &is,const char*path=0);
02259
02260
02261 OP_ERROR saveNetworkBox(ostream &os,
02262 const OP_SaveFlags &flags,
02263 const char *path_prefix);
02264
02265
02266 bool loadNetworkBox(UT_IStream &is, const char *path=0);
02267
02268 bool loadNodeFlags(UT_IStream &is, const char *path);
02269
02270 void saveForUndoComment();
02271 void saveForUndoDelScript();
02272
02273 UT_BitArray &getGroups() { return myGroups; }
02274 const UT_BitArray &getGroups() const { return myGroups; }
02275
02276 bool setOutput(OP_Node *node, int outputIdx);
02277 bool delOutput(OP_Node *node, int outputIdx);
02278
02279 void setInterrupted();
02280
02281 void setExtraOutput(OP_Node *);
02282 void delExtraOutput(OP_Node *);
02283 int hasExtraInput(const OP_Node *match_node,
02284 OP_InterestType type);
02285
02286 int findAncestor(const OP_Node *node) const;
02287 int findDataAncestor(const OP_Node *node) const;
02288 void clearRecursionBit() const;
02289
02290 void initializeExpressions() const;
02291 void clearInputs();
02292
02293
02294
02295
02296 void removeOpReference(
02297 const OP_RefId &ref_id,
02298 OP_InterestType mask = OP_INTEREST_ALL );
02299 void removeOpReference(
02300 const OP_RefId &ref_id,
02301 int op_id,
02302 OP_InterestType mask = OP_INTEREST_ALL );
02303
02304 int addOpDependent( int op_id,
02305 const OP_RefId &source_ref,
02306 const OP_RefId &ref_id,
02307 OP_InterestType type );
02308
02309 void updateRenameDependent( OP_Node *dependent,
02310 const char *old_cwd,
02311 OP_NodeList &cook_nodes );
02312
02313 void buildScriptOpDependencies();
02314 void changeScriptOpRef( const char *new_fullpath,
02315 const char *old_path,
02316 const char *old_cwd );
02317 static void changeScriptCB( UT_String &str,
02318 const char *token_start,
02319 const char *&ch, void *userdata );
02320
02321
02322
02323
02324
02325
02326
02327
02328
02329
02330
02331
02332
02333
02334 bool findTimeInterests(OP_Context &context, OP_Node *node,
02335 bool update_cook,
02336 OP_NodeList *interests = NULL);
02337
02338
02339 bool attemptPrefixMatch(const OP_NetworkBoxItem *item,
02340 char *childpref, int childpreflen,
02341 UT_String &maxprefix) const;
02342
02343
02344 void findUsedDataInterests(OP_NodeList &nodes, OP_Node *op);
02345 void propagateSelfParmInterest(int src_index,
02346 const UT_HashTable &dag,
02347 bool expr_change,
02348 UT_BitArray &visited,
02349 bool &data_changed);
02350
02351
02352
02353 bool internalSetGlobalParam(const char *param,
02354 int setreturned,
02355 bool *warned);
02356
02357 int internalSetPicked(int on_off,
02358 bool propagate_parent_event,
02359 bool edit);
02360
02361 OP_ERROR myLastCookResult;
02362
02363
02364
02365 void skipUntilClosingBrace(UT_IStream &is);
02366
02367 OP_Network *myParent;
02368 UT_PtrArray<OP_Input *> myInputs;
02369 mutable UT_BitArray myUsedInputs;
02370 UT_PtrArray<OP_ExtraInput *> myExtraInputs;
02371 UT_RefArray<OP_NodeList> myOutputs;
02372 OP_NodeList myExtraOutputs;
02373 UT_PtrArray<OP_ParmInterest *> myParmInterests;
02374 int myParmInterestCount;
02375 UT_String myComment;
02376 UT_String myDelScript;
02377 UT_String myCreatorState;
02378 UT_Color myColor;
02379 UT_BitArray myGroups;
02380 OP_Value myEventValue;
02381 float myCookTime;
02382 fpreal myPosX;
02383 fpreal myPosY;
02384 long myCookCount;
02385 long mySourceCount;
02386 int myCacheSize;
02387 int myBlockModify;
02388 int myUniqueId;
02389 unsigned myActiveInputIndex;
02390 OP_VERSION myVersionParms;
02391
02392 OP_VERSION myVersionCache;
02393
02394 bool myAutoscope;
02395
02396
02397
02398 long myLastDataModification;
02399
02400
02401
02402 float myCookDuration;
02403 unsigned int myRenameConflict : 1,
02404 myCookedForRender : 1,
02405 myModifyWaiting : 1,
02406 mySelfParmInterest : 1,
02407 myBuiltExplicitly : 1,
02408 myAllowBuildDependencies : 1,
02409 myBeingDeleted : 1,
02410 myRunningCreateScript : 1,
02411 myRunningDelScript : 1,
02412 myAlreadyRunDelScript : 1,
02413 myMatchesOTLDefinition : 1,
02414 myLoadCookedDataError : 1,
02415 myBuiltHashCode : 1,
02416 myIsProxyRefNode : 1,
02417 mySelfParmDataInterest : 1;
02418
02419 mutable bool myStartedTraverseInputs;
02420 mutable bool myRecursionFlag;
02421
02422
02423 static long theModificationCounter;
02424
02425 static int thePropagateLevel;
02426
02427 static UT_IntArray theChopExportsToCook;
02428
02429
02430 UT_RefArray<OP_Reference> myOpReferences;
02431
02432 UT_RefArray<OP_Dependency> myOpDependents;
02433
02434
02435 OP_BundleReferences myBundleRefs;
02436
02437 static int myNumSpaces;
02438
02439 static int myNodeButtonWidthFlagMult;
02440
02441
02442 static OP_EditCallback theEditCallback;
02443 static void *theEditCallbackData;
02444
02445
02446 static int makeUniqueId(OP_Node *node);
02447
02448 static int theUniqueId;
02449 static int theUniqueSize;
02450 static OP_Node **theUniqueNodes;
02451 static bool theDoingBulkNotification;
02452
02453 friend class OP_Network;
02454 friend class OP_Group;
02455 friend class OP_Input;
02456 friend class OP_ExtraInput;
02457 friend class OP_InputIndirect;
02458 friend class OP_UndoDelete;
02459 friend class OP_UndoInput;
02460 friend class OP_UndoCreate;
02461 friend class OP_UndoSpareParm;
02462 };
02463
02464
02465
02466 OP_API OP_Node * OPgetNodeFromChannel( const CH_Channel *chp );
02467
02468 #define CAST_INSTANTIATE(PREFIX) \
02469 inline static PREFIX##_Node *CAST_##PREFIX##NODE(OP_Node *op) \
02470 { \
02471 return ((op) ? (op)->castTo##PREFIX##Node() : 0); \
02472 } \
02473 \
02474 inline static const PREFIX##_Node *CAST_##PREFIX##NODE(const OP_Node *op) \
02475 { \
02476 return ((op) ? (op)->castTo##PREFIX##Node() : 0); \
02477 } \
02478
02479
02480
02481
02482
02483
02484 CAST_INSTANTIATE(OBJ)
02485 CAST_INSTANTIATE(SOP)
02486 CAST_INSTANTIATE(POP)
02487 CAST_INSTANTIATE(POPNET)
02488 CAST_INSTANTIATE(CHOPNET)
02489 CAST_INSTANTIATE(CHOP)
02490 CAST_INSTANTIATE(ROP)
02491 CAST_INSTANTIATE(SHOP)
02492 CAST_INSTANTIATE(COP2)
02493 CAST_INSTANTIATE(COPNET)
02494 CAST_INSTANTIATE(VOP)
02495 CAST_INSTANTIATE(VOPNET)
02496 CAST_INSTANTIATE(DOP)
02497
02498
02499 #undef CAST_INSTANTIATE
02500
02501
02502 #undef INSTANTIATE_NODE_FUNCTIONS
02503
02504 #endif