203 , myParentXfo(parent_cb)
208 : myTrackIndex(index)
212 , myParentXfo(parent_cb)
237 #define OPREF_PREFIX "op:"
238 #define OPREF_PREFIX_LEN 3
242 #define DEFAULT_COMP_HASH_VALUE (17*19)
245 #define INVALID_TABLE_NAME "Node"
246 #define OBJ_TABLE_NAME "Object"
247 #define SOP_TABLE_NAME "Sop"
248 #define CHOPNET_TABLE_NAME "ChopNet"
249 #define CHOP_TABLE_NAME "Chop"
250 #define ROP_TABLE_NAME "Driver"
251 #define SHOP_TABLE_NAME "Shop"
252 #define COP2_TABLE_NAME "Cop2"
253 #define COPNET_TABLE_NAME "CopNet"
254 #define VOP_TABLE_NAME "Vop"
255 #define VOPNET_TABLE_NAME "VopNet"
256 #define DOP_TABLE_NAME "Dop"
257 #define TOP_TABLE_NAME "Top"
258 #define TOPNET_TABLE_NAME "TopNet"
259 #define LOP_TABLE_NAME "Lop"
262 #define MGR_TABLE_NAME "Manager"
263 #define DIR_TABLE_NAME "Director"
267 #define INVALID_SCRIPT_NAME "node"
268 #define OBJ_SCRIPT_NAME "obj"
269 #define SOP_SCRIPT_NAME "sop"
270 #define CHOPNET_SCRIPT_NAME "ch"
271 #define CHOP_SCRIPT_NAME "chop"
272 #define ROP_SCRIPT_NAME "out"
273 #define SHOP_SCRIPT_NAME "shop"
274 #define COPNET_SCRIPT_NAME "img"
275 #define COP2_SCRIPT_NAME "cop2"
276 #define VOP_SCRIPT_NAME "vop"
277 #define VOPNET_SCRIPT_NAME "vex"
278 #define DOP_SCRIPT_NAME "dop"
279 #define TOP_SCRIPT_NAME "top"
280 #define TOPNET_SCRIPT_NAME "tasks"
281 #define LOP_SCRIPT_NAME "lop"
284 #define MGR_SCRIPT_NAME "mgr"
285 #define DIR_SCRIPT_NAME "dir"
286 #define MAT_SCRIPT_NAME "mat"
289 #define INVALID_OPTYPE_NAME "NODE"
290 #define OBJ_OPTYPE_NAME "OBJ"
291 #define SOP_OPTYPE_NAME "SOP"
292 #define CHOPNET_OPTYPE_NAME "CHOPNET"
293 #define CHOP_OPTYPE_NAME "CHOP"
294 #define ROP_OPTYPE_NAME "ROP"
295 #define SHOP_OPTYPE_NAME "SHOP"
296 #define COP2_OPTYPE_NAME "COP2"
297 #define COPNET_OPTYPE_NAME "IMG"
298 #define VOP_OPTYPE_NAME "VOP"
299 #define VOPNET_OPTYPE_NAME "VOPNET"
300 #define DOP_OPTYPE_NAME "DOP"
301 #define TOP_OPTYPE_NAME "TOP"
302 #define TOPNET_OPTYPE_NAME "TOPNET"
303 #define LOP_OPTYPE_NAME "LOP"
309 #define MGR_OPTYPE_NAME "MGR"
310 #define DIR_OPTYPE_NAME "DIR"
327 #define VOP_OUTPUT_NODE_NAME "output"
328 #define VOP_SUBNET_OUTPUT_NODE_NAME "suboutput"
329 #define VOP_SUBNET_INPUT_NODE_NAME "subinput"
330 #define VOP_COLLECT_NODE_NAME "collect"
334 #define SHOP_MANAGEMENT_OPTYPE "shopnet"
335 #define COP2_MANAGEMENT_OPTYPE "cop2net"
336 #define ROP_MANAGEMENT_OPTYPE "ropnet"
337 #define CHOP_MANAGEMENT_OPTYPE "chopnet"
338 #define SOP_MANAGEMENT_OPTYPE "sopnet"
339 #define OBJ_MANAGEMENT_OPTYPE "objnet"
340 #define VOP_MANAGEMENT_OPTYPE "vopnet"
341 #define DOP_MANAGEMENT_OPTYPE "dopnet"
342 #define TOP_MANAGEMENT_OPTYPE "topnet"
343 #define LOP_MANAGEMENT_OPTYPE "lopnet"
363 (
bool values_only_ =
false
364 ,
bool defaultstoo_ =
true
365 ,
bool docreate_ =
true
366 ,
bool doparms_ =
true
367 ,
bool doflags_ =
true
368 ,
bool dowires_ =
true
369 ,
bool dowiresout_ =
true
370 ,
bool frames_ =
false
371 ,
bool dogeneral_ =
false
372 ,
bool dochblock_ =
true
373 ,
bool dospareparms_ =
true
374 ,
bool omit_version_info_ =
false
376 : values_only(values_only_)
377 , defaultstoo(defaultstoo_)
378 , docreate(docreate_)
382 , dowiresout(dowiresout_)
384 , dogeneral(dogeneral_)
385 , dochblock(dochblock_)
386 , dospareparms(dospareparms_)
387 , omit_version_info(omit_version_info_)
422 return (myValue == v.
myValue &&
448 #define INSTANTIATE_FINDNODE_FUNCTIONS(PREFIX) \
449 PREFIX##_Node *find##PREFIX##Node(const char *path) const \
453 node = findNode(path); \
454 if (node) return node->castTo##PREFIX##Node(); \
457 #define INSTANTIATE_CASTNODE_FUNCTIONS(PREFIX) \
458 PREFIX##_Node *castTo##PREFIX##Node() const \
463 { const void *this_local = this; \
464 UT_ASSERT(this_local); \
465 if (!this_local) return 0; } \
466 if (getOpTypeID() == PREFIX##_OPTYPE_ID) \
468 return (PREFIX##_Node *) this; \
474 #define INSTANTIATE_FOR_ALL_NODE_TYPES(MACRO_FUNC) \
477 MACRO_FUNC(CHOPNET) \
503 static const OP_TypeInfo *getOpInfoFromTableName(
const char *name);
504 static const OP_TypeInfo *getOpInfoFromScriptDir(
const char *dir);
505 static const char *getOpTableNameFromManagerTypeName(
const char *name);
510 {
return myRootCompiledParent; }
519 bool getIsContainedBy(
const OP_Node *testparent)
const;
533 virtual const char *getOpType()
const = 0;
592 bool setDelScript(
const char *str);
596 const UT_String &getComment()
const {
return myComment; }
597 bool setComment(
const char *str);
610 bool getColorDefault()
const;
611 bool setColorDefault(
bool usedefault);
624 fpreal getX()
const override {
return myPosX; }
625 fpreal getY()
const override {
return myPosY; }
630 void pickRequest(
int shift);
634 bool allow_rel_paths =
false,
635 bool ignore_node_names_env_var =
false);
636 static bool isValidOpName(
const char *
s,
637 bool allow_rel_paths =
false,
638 bool ignore_node_names_env_var =
false)
642 ignore_node_names_env_var);
644 static bool isValidOpName(
const UT_String &str,
645 bool allow_rel_paths =
false,
646 bool ignore_node_names_env_var =
false)
648 return isValidOpName(str.
c_str(),
650 ignore_node_names_env_var);
653 static bool forceValidOpName(
UT_String &name);
658 int findString(
const char *str,
bool fullword,
659 bool usewildcards)
const override;
661 bool fullword)
override;
668 bool notifyVarChange(
673 virtual int getNchildren()
const;
674 virtual OP_Node *getChild(
const char *name,
int *hint=0)
const;
677 bool include_hidden=
false)
const;
680 const char *optype=0,
681 int casesensitive = 0)
const;
684 const char *optype=0,
685 int casesensitive = 0)
const;
696 virtual void getPotentialChildErrorNodes(
OP_NodeList &nodes)
const;
699 static OP_Node *lookupNode(
int unique_id,
bool include_proxy=
false)
701 if( unique_id >= 0 && unique_id <= theUniqueId
702 && theUniqueNodes[unique_id] )
704 if( include_proxy || !theUniqueNodes[unique_id]
706 return theUniqueNodes[unique_id];
710 static int getNumUniqueIds()
711 {
return theUniqueId + 1; }
715 int getUniqueId()
const
716 {
return myUniqueId; }
718 {
return myUniqueId; }
723 bool expandGroupPattern(
const char *
pattern,
725 bool expandToFullPaths =
false);
729 bool patternContainsBundle(
const char *
pattern,
731 bool patternContainsGroup(
const char *
pattern,
734 virtual int isManager()
const;
738 virtual int isManagementNode()
const;
743 bool isEffectivelyAManagementNode()
const;
746 virtual bool isMaterialManager()
const;
756 virtual int isSubNetwork(
bool includemanagementops)
const;
757 virtual int isNetwork()
const;
758 virtual int isInSubNetwork()
const;
760 bool isProxyRefNode()
const
761 {
return myIsProxyRefNode; }
762 void setProxyRefNode(
bool f)
763 { myIsProxyRefNode =
f; }
766 virtual bool isOutputNode()
const;
768 virtual int whichOutputNode()
const;
773 int isNetworkWithKids()
const;
775 virtual int isVex()
const;
781 OP_Bundle * getParmBundle(
const char* parm_name,
int vector_index,
784 void markBundleRefsAsUnused();
785 void cleanUnusedBundleRefs();
786 void cleanAllBundleRefs();
788 static void getValueAsBundlePaths(
fpreal t,
793 static void getValueAsBundlePaths(
fpreal t,
804 virtual bool bundleChanged(
const OP_Bundle *bundle);
807 void touchBundleParm(
const char *name);
808 void touchBundleParm(
int parm_index);
811 virtual int getDandROpsEqual() {
return 1; }
814 virtual int updateDandROpsEqual(
int = 1) {
return 1; }
820 bool isInputAncestor(
const OP_Node *parent,
821 bool check_extra=
true)
const;
826 bool isParentAncestor(
const OP_Node *parent)
const;
855 virtual OP_PostIt *findPostItNote(
const char *const_path)
857 virtual OP_Dot *findDot(
const char *const_path)
871 SOP_Node *getSOPNode(
const char *
path,
int addextra = 0,
872 bool *got_by_flag=
nullptr)
const;
875 COP2_Node *getCOP2Node(
const char *
path,
int addextra = 0)
const;
878 DOP_Node *getDOPNode(
const char *
path,
int addextra = 0)
const;
879 ROP_Node *getROPNode(
const char *
path,
int addextra = 0)
const;
882 bool *got_by_flag=
nullptr)
const;
884 TOP_Node *getTOPNode(
const char *
path,
int addextra = 0)
const;
886 LOP_Node *getLOPNode(
const char *
path,
int addextra = 0)
const;
893 virtual void getPathWithSubnet(
UT_String &str)
const;
901 void completePath(
const char *prefixpath,
904 virtual CH_Channel *getTrackChannel(
const char *name);
907 const char *trackname,
921 void globNodes(
const char *pat,
UT_String *expand,
924 const char *prefix =
" ");
927 void globChannels(
const char *,
UT_String &expand,
929 const char *prefix =
" ")
const;
931 void globChannels(
const char *
pattern,
940 void globChanRefs(
const char *
pattern,
944 bool use_multi_match =
true);
961 void globNodeChannels(
const char *
pattern,
964 int *parm_start =
nullptr,
973 void globNodeChanRefs(
const char *
pattern,
976 int *parm_start =
nullptr,
979 bool use_multi_match =
true
985 virtual void globNetworkBoxes(
const char *pat,
UT_String *expand,
988 const char *prefix =
" ");
990 virtual void globPostIts(
const char *pat,
UT_String *expand,
993 const char *prefix =
" ");
1004 virtual bool opShouldHandleChange(
OP_EventType reason);
1009 virtual void referencedParmChanged(
int pi);
1015 virtual void forceRecook(
bool evensmartcache =
true);
1021 virtual void reloadExternalFiles();
1050 template <
typename F>
1051 void cookLockedExecute(
const F &functor)
1058 #if H_BUILD_PARALLEL_COOK_MODE
1059 if (isOperatorThreadSafe())
1060 EXPR_StaticLock::theStaticCounter.
add(-1);
1069 const UT_TaskState & taskState()
const {
return myTaskState; }
1076 void bumpVersionParm()
1078 dataMicroNode().bumpModVersion();
1079 if (hasIndepParmListMicroNode())
1080 parmListMicroNode().bumpModVersion();
1082 int cookParmsModified()
const
1083 {
return parmListMicroNodeConst()
1084 .isModVersionOutdated(); }
1091 virtual int getDataClass()
const;
1100 virtual OP_DataType getCookedDataType()
const = 0;
1102 virtual void deleteCookedData() = 0;
1104 virtual int saveCookedData(std::ostream &os,
OP_Context &,
1116 virtual int getRelativeCaptureTransform(
OP_Node &to,
1119 virtual int getRelativeCaptureTransform(
OP_Node &to,
1130 TRANSFORM_PRECONSTRAINT,
1131 TRANSFORM_PARENTBONE,
1134 TRANSFORM_PRERAWPARM,
1147 bool ok = getWorldTransform(m, ctx);
1154 bool ok = getIWorldTransform(m, ctx);
1161 bool ok = getTransform(mode, m, ctx);
1168 void addTransformError(
const OP_Node &node,
1169 const char *
label=0)
const;
1177 virtual const char *getInternalOpTable()
const
1182 virtual const char *inputLabel(
unsigned idx)
const;
1183 virtual const char *outputLabel(
unsigned idx)
const;
1188 const char *inputLabelNum(
unsigned idx)
const;
1189 const char *outputLabelNum(
unsigned idx)
const;
1193 virtual const char *inputConnectorLabel(
unsigned idx);
1196 virtual int isRefInput(
unsigned idx)
const;
1200 virtual int getAuxInput()
const;
1214 bool getLock()
const {
return flags().isLocked(); }
1216 bool getSoftLock()
const {
return flags().getSoftLocked();}
1217 void setSoftLock(
bool on_off)
1223 bool getHardLock()
const {
return flags().getHardLocked();}
1224 void setHardLock(
bool on_off)
1232 virtual OP_LockTypes setModelLock(OP_LockTypes state,
1233 void *modeler =
nullptr,
1234 bool allow_softlock_promotion =
false,
1242 int getNetworkLock(
bool relaxedlockcheck =
false,
1243 const OP_Node *inputNode=
nullptr)
const;
1248 bool setUnload(
bool on_off);
1249 bool getUnload()
const;
1252 virtual bool isLoaded()
const {
return true; }
1257 virtual bool unloadData();
1261 bool send_flag_event=
true);
1262 void takeDeactivateFlag(
uchar flag)
1263 { takeActivateFlag(flag,
false); }
1264 bool takeIsActiveFlag(
uchar flag)
const;
1265 void setHasTakeData(
bool onoff);
1267 bool canAccessFlag(
unsigned mask,
uchar flag)
const;
1275 bool propagate_parent_event =
true)
override;
1281 bool setEditPicked(
bool on_off,
1282 bool propagate_parent_event =
true);
1287 void setAutoscope(
bool on_off) { myAutoscope = on_off; }
1288 bool isAutoscope() {
return myAutoscope; }
1290 bool setCurrent(
bool on_off);
1291 bool setExpose(
bool on_off);
1292 bool setBypass(
bool on_off);
1293 bool setTemplate(
bool on_off);
1294 bool setFootprint(
bool on_off);
1295 bool setXray(
bool on_off);
1296 bool setDisplay(
bool on_off);
1297 bool setRender(
bool on_off);
1298 bool setHighlight(
bool on_off);
1299 bool setModified(
bool on_off);
1300 bool setSaveBypass(
bool on_off);
1301 bool setSaveData(
bool on_off);
1303 virtual bool setPickable(
bool on_off)
1305 virtual bool setAudio(
bool on_off)
1307 virtual bool setExport(
bool on_off)
1309 virtual bool setDebug(
bool on_off)
1311 virtual bool setDisplayOrigin(
bool on_off_unchanged)
1317 void userSetTemplate(
bool onoff);
1322 void userSetSelectableTemplate(
bool onoff);
1326 virtual void setFlag(
char tag,
int8 val);
1327 virtual int8 getFlag(
char tag)
const;
1330 {
return flags().getPicked(); }
1331 virtual bool getEditPicked()
const
1333 bool getCurrent()
const;
1334 bool getDisplay()
const {
return flags().getDisplay(); }
1335 bool getRender()
const {
return flags().getRender(); }
1336 bool getHighlight()
const {
return flags().getHighlight();}
1337 bool getBypass()
const {
return flags().getBypass(); }
1338 bool getTemplate()
const {
return flags().getTemplate(); }
1339 bool getFootprint()
const {
return flags().getFootprint(); }
1340 bool getXray()
const {
return flags().getXray(); }
1341 bool getExpose()
const {
return flags().getExpose(); }
1342 bool getModified()
const {
return flags().getModified(); }
1343 bool getSaveBypass()
const{
return flags().getSaveBypass(); }
1344 bool getSaveData()
const {
return flags().getSaveData(); }
1346 {
return flags().getHasTakeData(); }
1347 virtual bool getPickable()
1349 virtual bool getAudio()
const
1351 virtual bool getExport()
const
1353 virtual bool getDebug()
const
1355 virtual bool getDisplayOrigin()
const
1358 {
return getExpose(); }
1360 { setExpose(expose); }
1363 bool getDisplayDescriptiveName()
const
1364 {
return flags().getDisplayDescriptiveName();}
1365 bool setDisplayDescriptiveName(
bool state);
1366 bool getDisplayComment()
const
1368 bool setDisplayComment(
bool state);
1369 int8 getOutputForView()
const
1370 {
return flags().getOutputForView(); }
1371 int8 setOutputForView(
int8 output);
1373 OP_Node *getPickableSelfOrParent();
1378 bool setCompress(
bool on_off);
1379 bool getCompress()
const;
1383 void setCurrentAndPicked();
1391 virtual bool setVisible(
bool onoff);
1392 virtual bool getVisible()
const;
1399 virtual void getSaveFlagsString(
UT_String &cmd,
1401 bool save_to_hip)
const;
1402 virtual void getPreParmSaveFlagsString(
UT_String &cmd )
const;
1403 virtual void getPostParmSaveFlagsString(
UT_String &cmd )
const;
1406 {
return myEventValue.hasOpInterest(data, m); }
1408 { myEventValue.addOpInterest(data, m); }
1410 { myEventValue.removeOpInterest(data, m); }
1411 int isBeingDeleted()
const
1412 {
return myBeingDeleted; }
1413 void setNodeBeingDeleted(
int beingdeleted);
1417 bool setInhibitInputConsolidation(
bool value);
1430 virtual unsigned minInputs()
const;
1433 virtual unsigned maxInputs()
const;
1437 virtual unsigned getNumVisibleInputs()
const;
1443 virtual unsigned orderedInputs()
const;
1447 virtual unsigned maxOutputs()
const;
1451 virtual unsigned getNumVisibleOutputs()
const;
1454 bool hasUnorderedInputs()
const;
1464 virtual unsigned nInputs()
const;
1471 unsigned nConnectedInputs(
bool check_subnet_inside=
true)
const;
1473 unsigned getActiveInputIndex()
const
1474 {
return myActiveInputIndex; }
1475 void setActiveInputIndex(
unsigned idx);
1489 int getConnectedInputIndex(
int startAt = -1)
const;
1492 int getNthConnectedInput(
int n)
const;
1500 void forceClearInput(
int idx);
1504 unsigned outputIdx = 0);
1507 virtual OP_ERROR setIndirectInput(
unsigned idx,
1511 virtual OP_ERROR setInputReference(
unsigned idx,
const char *
label,
1512 int keeppos,
unsigned outputIdx = 0);
1516 int whichInputIs(
const OP_Node *who)
const;
1529 int whichOutputIs(
const OP_Node* target_node,
1530 int input_on_target_node)
const;
1535 int whichOutputIsFollowingIndirect(
1537 int input_on_target_node)
const;
1542 int whichInputIs(
const OP_Node* source_node,
1546 void consolidateInputs();
1547 virtual void clearUnreferencedInputs();
1548 virtual bool allowConsolidatingInput(
int idx);
1554 virtual OP_Input *getInputReference(
unsigned idx,
bool grow);
1558 virtual OP_Input *getInputReferenceConst(
unsigned idx)
const;
1560 virtual int doDeleteRewire()
const {
return 1; }
1564 virtual void moveInput(
int srcidx,
int dstidx,
1565 bool forcesubnet =
false);
1567 unsigned outputIdx);
1568 OP_ERROR insertIndirectInput(
unsigned idx,
1573 virtual UT_Options getInputDataDefault(
int idx)
const
1578 virtual int getInputEditorInputs();
1580 virtual bool allowInputEditorInputParm();
1582 virtual bool allowInputEditorInputDelete();
1585 virtual bool getInputEditorInputLabel(
UT_String &
label,
int idx);
1588 dataMicroNodeConst()
const
1589 {
return myDataMicroNode; }
1593 dataMicroNodeConst());
1599 parmListMicroNodeConst()
const
1600 {
return dataMicroNodeConst(); }
1604 parmListMicroNodeConst());
1607 bool hasIndepParmListMicroNode()
const
1609 return (&parmListMicroNodeConst()
1610 != &dataMicroNodeConst());
1614 {
return myFlagMicroNode; }
1628 return myEventMicroNodes[e] !=
nullptr;
1634 virtual void getOwnedMicroNodes(
1639 void propagateDirtyMicroNode(
1643 bool send_root_event);
1652 void addExtraInput(
OP_Node &op,
int parm_i,
int vec_i);
1672 static void addExtraInputToEvalChannel(
1676 addExtraInputToEvalChannel(
1680 static void addExtraInputToEvalChannel(
1682 OP_Node &op,
int parm_i,
int vec_i)
1684 addExtraInputToEvalChannel(
1688 static void addExtraInputToEvalChannel(
1693 target = getEvalChannelMicroNode(thread);
1697 static void addExtraInputToEvalChannel(
1702 target = getEvalChannelMicroNode(thread);
1712 static void addExtraInput(
1715 static void addExtraInput(
1718 static void addExtraInput(
1723 static void addMultiparmInterests(
const OP_InterestRef &target_ref,
1730 void getExtraInputNodes(
1732 bool remove_duplicates =
true,
1733 bool data_interest =
true,
1734 bool parm_interest =
true,
1735 bool flag_interest =
true,
1736 bool include_parmlist =
true,
1737 bool follow_simulation_inputs =
false)
const;
1738 void getExtraOutputNodes(
1740 bool remove_duplicates =
true,
1741 bool data_interest =
true,
1742 bool parm_interest =
true,
1743 bool flag_interest =
true)
const;
1745 int getNumExtraInputs()
const;
1747 void dumpExtraInputs(
1750 int indent_level = 0)
const;
1754 static void addExprOpDependency(
const char *arg_str,
1757 static void addExprOpDependency1From2(
const char *arg_str1,
1758 const char *arg_str2,
1761 static void addExprOpParmDependency(
const char *arg_str,
1765 static void changeExprOpRef(
const char *arg_str,
1767 const char *new_fullpath,
1768 const char *old_fullpath,
1769 const char *old_cwd);
1771 static void changeExprOpRef1From2(
const char *arg_str1,
1772 const char *arg_str2,
1775 const char *new_fullpath,
1776 const char *old_fullpath,
1777 const char *old_cwd);
1779 static void changeExprOpParmRef(
const char *arg_str,
1781 const char *new_fullpath,
1782 const char *old_fullpath,
1783 const char *old_cwd,
1784 const char *chan_name,
1785 const char *old_chan_name);
1787 void addGenericOpNameReference(
const UT_String &oppath );
1788 void addGenericOpNameReference(
const PRM_RefId &ref_id,
1790 void addGenericOpInputReference(
const PRM_RefId &ref_id,
1793 static void moveAndUpdateDependencies(
1799 bool getParmBaseNodePath(
1812 void decrementOpReference(
int node_id);
1814 virtual void dumpDependencies(std::ostream &os);
1815 void dumpOpDependents(
OP_Node *
ref,
int brief,
1818 &getOpDependents()
const {
return myOpDependents; }
1822 int countReferences(
int op_id);
1827 bool recurse)
const;
1834 bool include_descendants)
const;
1839 bool include_descendants)
const;
1846 bool include_descendants)
const;
1849 void getParmsThatReference(
const char *channame,
1853 virtual void inputConnectChanged(
int which);
1857 unsigned nOutputEntries()
const;
1861 int nOutputItems(
int output_idx = -1)
const;
1864 bool hasAnyOutputNodes(
bool through_dots =
true,
1865 int output_idx = -1)
const;
1870 bool into_subnets =
false,
1871 bool through_dots =
true,
1872 int output_idx = -1)
const;
1875 OP_Node *getFirstOutputNode(
bool through_dots =
true,
1876 int output_idx = -1)
const;
1891 virtual void fillInfoTreeNodeSpecific(
UT_InfoTree &tree,
1897 virtual bool fillInfoTreeChildSpecific(
UT_InfoTree &tree,
1916 virtual void unlockInput(
unsigned idx);
1918 virtual void unlockInputs();
1923 int getCookCount()
const {
return myCookCount; }
1924 void triggerOutputChanged();
1926 void triggerUIChanged(
1930 virtual int cookedInputIndex()
const {
return -1; }
1945 virtual OP_Node *getPassThroughNode(
1947 bool mark_used =
false);
1949 bool setMinimumCacheSize(
int min_size);
1952 {
return dataMicroNodeConst().modVersion(); }
1956 virtual bool handleTimeChange(
fpreal ) {
return false; }
1979 virtual void getExtraNodesForCopyOrDelete(
OP_NodeList &extras)
const;
1985 virtual bool runCreateScript();
1988 void updateParmsToMatchCurrentUnits();
1992 virtual void matchOTLDefinition();
1995 virtual void unmatchOTLDefinition();
1999 virtual void handleOTLIndexFileCleared();
2004 {
return mySyncErrors; }
2007 {
return mySyncErrorLevel; }
2010 int getMatchesOTLDefinition()
const;
2013 static void propagateMatchOTLDefinitionToAncestors(
OP_Node *node,
2018 int getCanDeviateFromOTLDefinition()
const;
2019 void setAllChildAssetPermissions(
int permission);
2022 void computeAllChildAssetPermissions();
2025 bool getIsEditableAssetSubNode()
const;
2028 void turnOffAllChildExports();
2031 bool haveLicenseToAccessContents(
2032 OP_Node* opt_specific_child =
nullptr)
const;
2033 bool haveLicenseToAccessParentContents()
const;
2034 bool haveAncestorWithoutFullLicense(
bool ignore_self)
const;
2037 OP_Node *getFirstExecLicenseOnlyAncestor(
2038 bool ignore_self =
true)
const;
2040 OP_Node *getLastExecLicenseOnlyAncestor(
2041 bool ignore_self =
true)
const;
2043 bool isCompiled()
const;
2046 void saveWires(std::ostream &os,
const char *name,
2048 void saveOutputWires(std::ostream &os,
const char *name,
2050 virtual void saveIntrinsicCommand(std::ostream &os,
2054 virtual OP_ERROR saveCommand(std::ostream &os,
2058 const char *netboxname,
2075 void saveParameterFlags(std::ostream &os,
const char *name,
2076 const char *command,
2077 bool (
PRM_Parm::*flag_method)(
int)
const,
2078 bool defaultstoo,
bool reverse,
2081 void saveUserDataCommand(
2082 std::ostream &os,
const char *node_name,
2083 bool omit_version =
false);
2091 virtual RampError rampCommand(
bool remove,
fpreal pos,
float rgba[4]);
2092 RampError rampCommand(
bool remove,
fpreal pos,
float rgba[4],
2098 const char *
path=0);
2100 const char *name = 0,
int command = 0);
2111 {
return myUserData; }
2113 OP_ERROR saveUserData(std::ostream &os,
const char *
path);
2114 void clearUserData(
bool save_undo);
2118 static const char *internalUserDataPrefix() {
return "sidefx::"; }
2129 template<
typename T>
2142 bool hasBlindData(
const char *key)
const;
2146 bool deleteBlindData(
const char *key);
2153 OP_ERROR saveDataBlocksPacket(std::ostream &os,
2154 const char *path_prefix,
2162 virtual int deleteNodeData(
void *);
2163 void propagateNodeDataDeleted();
2170 void setCachedPythonObject(
2171 const char *key,
void *opaque_py_object);
2173 bool deleteCachedPythonObject(
const char *key);
2174 void clearCachedPythonObjects();
2178 {
return myCachedPythonObjects; }
2182 void saveOverrides(std::ostream &os);
2183 void saveOverrides(std::ostream &os,
OP_Node *root,
2186 void saveChildOverrides(std::ostream &os,
OP_Node *root,
2192 const char *parm_name,
2193 int vec_idx)
override;
2195 int vec_idx)
const override;
2198 virtual void removeOverrideDestination(
OP_Node * ) {}
2199 virtual void removeOverrideDestination(
OP_Node * ,
2205 std::ostream *err)
const override;
2218 void addPythonNodeError(
const PY_Result &py_result);
2220 void saveInputs(std::ostream &os,
bool compile_basic);
2222 bool named =
false);
2223 void saveNamedInputs(std::ostream &os,
bool compile_basic);
2224 void saveNamedOutputs(std::ostream &os);
2229 void getEditableInputDataKeys(
int idx,
2233 void setEditableInputData(
int idx,
2236 void saveEditableInputData(std::ostream &os)
const;
2243 void setEditableInputString(
int idx,
2258 virtual void saveDialogScriptExtraInfo(std::ostream &os);
2274 int &op_id,
fpreal &op_time,
2276 static int findOpFramePair(
const char *
path,
int &op_id,
2280 static void buildXformOrder(
int trs,
int xyz,
2283 static const UT_XformOrder& buildXformOrder(
int trs,
int xyz );
2306 fpreal pivot_rz,
bool inverse =
false);
2314 fpreal pivot_rz,
bool inverse =
false);
2316 static void buildXform(
int trs,
int xyz,
2317 float tx,
float ty,
float tz,
2318 float rx,
float ry,
float rz,
2319 float sx,
float sy,
float sz,
2320 float px,
float py,
float pz,
2322 static void buildXform(
int trs,
int xyz,
2323 double tx,
double ty,
double tz,
2324 double rx,
double ry,
double rz,
2325 double sx,
double sy,
double sz,
2326 double px,
double py,
double pz,
2328 static void buildXform(
int trs,
int xyz,
2329 float tx,
float ty,
float tz,
2330 float rx,
float ry,
float rz,
2331 float sx,
float sy,
float sz,
2334 static void buildXform(
int trs,
int xyz,
2335 double tx,
double ty,
double tz,
2336 double rx,
double ry,
double rz,
2337 double sx,
double sy,
double sz,
2340 static void buildXform(
int trs,
int xyz,
2341 float tx,
float ty,
float tz,
2342 float rx,
float ry,
float rz,
2343 float sx,
float sy,
float sz,
2344 float s_xy,
float s_xz,
float s_yz,
2345 float px,
float py,
float pz,
2347 static void buildXform(
int trs,
int xyz,
2348 double tx,
double ty,
double tz,
2349 double rx,
double ry,
double rz,
2350 double sx,
double sy,
double sz,
2351 double s_xy,
double s_xz,
double s_yz,
2352 double px,
double py,
double pz,
2354 static void buildXform(
int trs,
int xyz,
2355 float tx,
float ty,
float tz,
2356 float rx,
float ry,
float rz,
2357 float sx,
float sy,
float sz,
2358 float s_xy,
float s_xz,
float s_yz,
2361 static void buildXform(
int trs,
int xyz,
2362 double tx,
double ty,
double tz,
2363 double rx,
double ry,
double rz,
2364 double sx,
double sy,
double sz,
2365 double s_xy,
double s_xz,
double s_yz,
2368 static void buildXform(
2369 const UT_Matrix4F::FullTransformModel &parms,
2371 static void buildXform(
2372 const UT_Matrix4D::FullTransformModel &parms,
2374 static void buildXform(
int trs,
2375 float tx,
float ty,
float rz,
2376 float sx,
float sy,
float px,
float py,
2378 static void buildXform(
int trs,
2379 double tx,
double ty,
double rz,
2380 double sx,
double sy,
double px,
double py,
2382 static void buildXform(
int trs,
2383 float tx,
float ty,
float rz,
2384 float sx,
float sy,
float s_xy,
2387 static void buildXform(
int trs,
2388 double tx,
double ty,
double rz,
2389 double sx,
double sy,
double s_xy,
2390 double px,
double py,
2393 virtual int getTranslateParmIndex();
2397 void resolveInputReferences();
2399 static void clearAllPendingUndoFlags();
2403 void saveForUndoInput();
2405 void blockModify(
int on_off,
int propagate = 1);
2406 int isBlockModify()
const;
2407 bool isModifyWaiting()
const;
2408 virtual void propagateEndBlockModify();
2418 void getCookInfo(
UT_String &info)
const;
2428 virtual int isCookingRender()
const {
return 0; }
2429 virtual void setCookingRender(
int val);
2431 virtual void clearInterrupted()
2432 { clearInterruptedImpl(
true); }
2434 {
return flags().getInterrupted(); }
2439 void setRenameConflict()
2440 { myRenameConflict = 1; }
2441 void setRunningCreateScript(
int onoff);
2454 int group_mask = 1);
2456 virtual int getNumInputsToHash();
2457 virtual OP_Node *getInputToHash(
int i);
2459 void clearHashCodeFlags();
2460 bool isHashCodeBuilt()
const {
return myBuiltHashCode;}
2461 void builtHashCode(
bool b =
true) { myBuiltHashCode =
b; }
2468 void setCreatorState(
const char *s)
2469 { myCreatorState.harden(s); }
2470 const UT_String &getCreatorState()
const {
return myCreatorState; }
2471 void builtExplicitly(
int yn) { myBuiltExplicitly = yn; }
2472 int wasBuiltExplicitly()
const{
return myBuiltExplicitly; }
2474 bool matchesState(
const char *state)
const;
2482 virtual void changeParmTemplate(
PRM_Template *new_template);
2485 virtual void ensureInputsAndOutputsAreValid();
2489 void connectToInputNode(
OP_Node &inputnode,
int input_idx,
2505 static void buildQuadricXform(
UT_Matrix4 &mat,
2506 float tx,
float ty,
float tz,
2507 float sx,
float sy,
float sz,
2509 float rx = 0.0
f,
float ry = 0.0
f,
2513 double tx,
double ty,
double tz,
2514 double sx,
double sy,
double sz,
2516 double rx = 0.0,
double ry = 0.0,
2520 int theMenuSize,
int (*doAdd)(
OP_Node *) = 0,
2521 int startItem = 0,
const PRM_Parm *parm = 0,
2522 int showSubnets = 1,
int expandSubnets = 1,
2523 bool recurse =
false);
2528 static void buildPreDefRulesMenu(
PRM_Name *menu,
2540 static int getNameSerialIndex();
2543 virtual void setMapping(
int idx,
int type,
const char *
label = 0);
2544 virtual int getMapping(
int idx,
const char *&
label)
const;
2552 bool hasComment()
const;
2553 bool hasParmsNotAtFactoryDefault()
const;
2554 bool hasAnimatedParms()
const;
2555 bool hasChopOverriddenParms()
const;
2585 TRAVERSE_DEFAULT = 0x0000,
2586 TRAVERSE_INTO_SUBNETS = 0x0001,
2587 TRAVERSE_REF_INPUTS = 0x0002,
2588 TRAVERSE_ONLY_USED_INPUTS = 0x0004,
2589 TRAVERSE_PASSTHROUGH_INPUTS = 0x0008,
2590 TRAVERSE_EXTRA_INPUTS = 0x0010,
2591 TRAVERSE_SIMULATION_INPUTS = 0x0020,
2592 TRAVERSE_COOKED_INPUT_INDEX_INPUTS = 0x0040,
2594 bool traverseInputs(
bool (*callback)(
OP_Node &,
void *),
2596 TraverseOptions opts,
2599 bool traverseInputs(
bool (*callback)(
const OP_Node &,
void*),
2601 TraverseOptions opts,
2614 bool traverseChildren(
bool (*callback)(
OP_Node &,
void*),
2616 bool recurse_into_subnets);
2620 bool isCooking(
bool include_ancestors)
const;
2624 virtual bool usesFootprint()
const {
return false; }
2628 bool from_children_too =
true,
2629 bool collapse =
false,
2630 bool check_missing =
false,
2631 bool show_missing_only =
false);
2632 virtual bool getSaveWithVopnets();
2633 virtual void runDelScript();
2636 virtual void preDelete() { }
2640 virtual DOP_Parent *castToDOPParent() {
return 0; }
2641 virtual const DOP_Parent *castToDOPParent()
const {
return 0; }
2661 bool create_if_needed=
false)
2671 virtual int beginVopCodeGeneratorUpdate() {
return 0; }
2672 virtual void endVopCodeGeneratorUpdate(
int update_level) {}
2682 int end_parm = INT_MAX,
2683 bool use_parmvop_tag=
true
2685 int buildVexCommandWithDependencies(
OP_Node *owner,
2691 int end_parm = INT_MAX,
2692 bool use_parmvop_tag=
true
2703 static PRM_Name theVexClearParmName;
2714 virtual bool hasVexShaderParameter(
const char *parm_name);
2724 virtual bool getScriptMaterialInfo(
UT_String & mat_info,
2732 virtual const char *getHDASubType()
2737 bool setChannelAlias(
PRM_Parm &parm,
int subindex,
2738 const char *alias_name);
2740 void disconnectAllInputsOutputs(
bool keepSelected,
2741 bool forceDisconnectOutputs =
false);
2743 void disconnectAllInputs();
2744 void disconnectAllOutputs();
2747 virtual void notifyParmRenameDependents(
2751 void writeChannel(
CH_Channel *channel, std::ostream &os,
2752 const char *name,
bool frames);
2753 void writeAllChannels(std::ostream &os,
const char *name,
2754 bool frames,
bool dochblock,
2765 const UT_Options *options =
nullptr)
override;
2768 int64 getExtraInputMemoryUsage()
const;
2769 static void printOpMemoryUsageStats(std::ostream &os);
2774 virtual void unscopeChannels(
bool recurse);
2779 virtual void undisplayChannels(
bool recurse);
2784 virtual void unpinChannels(
bool recurse);
2789 virtual void setChannelScope(
const char *
pattern,
2818 bool relative_references =
true)
override;
2820 void clearVersionUserData();
2821 void updateVersionUserData();
2831 void syncNodeVersionIfNeeded(
2833 const char *from_version =
nullptr,
2834 bool update_node_version =
false);
2840 const char *old_version,
2841 const char *current_version,
2842 bool *node_deleted)
override;
2850 bool setGlobalFloatParam(
const char *
param,
2853 bool setGlobalStringParam(
const char *
param,
2854 const char *strvalue,
2859 void beginPropagateModification();
2860 void endPropagateModification();
2863 virtual void getActiveOperatorsDefinedByOTL(
2870 static bool getDoingBulkNotification();
2871 static bool isDirectorDoingBulkNotification();
2876 virtual bool hasDifferentMultiInputs()
const;
2879 virtual bool canCreateNewOpType()
const;
2880 static bool createNewOpType
2883 const char *typeName=
nullptr,
2884 const char *typeLabel=
nullptr,
2885 const char *otlFile=
nullptr,
2886 const char *metaSource=
nullptr,
2887 const char *comment=
nullptr,
2889 const char *newName=
nullptr,
2890 int minimumInputs=-1,
2891 int maximumInputs=-1,
2892 bool ignore_external_references=
false,
2893 bool compress_contents=
false,
2895 int *newNodeId=
nullptr,
2896 bool compile_contents =
false,
2897 bool change_node_type =
true,
2898 bool create_backup =
true);
2901 virtual void setMaterialIconFilename(
const char * ) {}
2903 virtual bool getMaterialIconAllowRegenerateFlag() {
return true; }
2904 virtual void setMaterialIconAllowRegenerateFlag(
bool) {}
2911 static void startBulkNotifications(
2914 static void endBulkNotifications(
2921 virtual bool willAutoconvertInputType(
int input_idx);
2927 virtual bool getIsInputVisibleDefault(
int idx);
2931 bool verifyTemplatesWithParameters()
const;
2936 OP_Input *getNamedInputReferenceConst(
2940 bool mark_used=
false)
const;
2944 virtual int getInputFromName(
const UT_String &
in)
const;
2945 virtual int getOutputFromName(
const UT_String &out)
const;
2946 virtual void getInputName(
UT_String &
in,
int idx)
const;
2947 virtual void getOutputName(
UT_String &out,
int idx)
const;
2949 int getInputFromUniqueName(
2951 int getOutputFromUniqueName(
2956 void getUniqueInputName(
2958 bool getUniqueInputNameConst(
2962 bool getUniqueOutputNameConst(
2970 virtual OP_ERROR setNamedIndirectInput(
2973 virtual OP_ERROR setNamedInputReference(
2975 const char *
label,
int,
2986 virtual void onCreated() { }
2988 virtual bool isOrderedInput(
const OP_ConnectorId& input_name)
const;
2996 virtual bool willAutoconvertNamedInputType(
3005 unsigned getInputsArraySize()
3006 {
return myInputs.entries(); }
3009 {
return (getInputsArraySize() > idx) ? 1 : 0; }
3017 bool setLocalVarActive(
bool f)
3019 bool old = myLocalVarActive;
3020 myLocalVarActive =
f;
3025 bool isLocalVarActive()
const
3026 {
return myLocalVarActive; }
3033 void recomputeCompiledHash();
3037 void clearCompiledHash()
3043 { sendEvent(type,
data); }
3045 virtual bool scopedChannelsDirty();
3049 virtual bool getActiveLayerContribution(
const UT_String &track_name,
3055 virtual bool resolveExport(
const PRM_Parm*
p,
int subindex,
3061 virtual bool addOrMoveVisualizerToOutput(
int outputidx)
3068 int vec_idx)
const override;
3070 OP_Bundle * getParmBundle(
const char* parm_name,
int vector_index,
3072 const char *
filter,
bool subnet_inclusion);
3076 static const UT_Color &getGlobalDefaultColor();
3082 static fpreal getFlagWidth();
3084 static fpreal getNodeHeight();
3087 static fpreal getNodeButtonWidth();
3089 static fpreal getConnectorHeight();
3096 static bool canDestroyNodes(
OP_Network *src_net,
3110 virtual void getDefaultState(
UT_String &default_state_name);
3130 void clearInputContextOptionDepIfSafe(
3135 virtual bool hasTransformTracks()
const {
return false; }
3157 void finishedLoadingParentNetwork();
3161 static void bumpNameSerialIndex();
3165 void beginScriptBlockingDel()
3166 { myScriptsBlockingDelCount += 1; }
3167 void endScriptBlockingDel()
3168 { myScriptsBlockingDelCount -= 1; }
3171 void setLegacyConnectingInputIndex(
int index)
3172 { myLegacyConnectingInputIndex =
index; }
3176 virtual void clearAndDestroy();
3179 virtual void clearCache();
3181 void clearInterruptedImpl(
bool allow_recook);
3196 virtual void doOverridePreCook() { }
3197 virtual void doOverridePostCook() { }
3202 int getSourceCount()
const;
3203 virtual int bumpSourceCount(
int d);
3210 virtual OP_ERROR saveIntrinsic(std::ostream &os,
3213 const char *path_prefix =
"",
3215 OP_ERROR saveUserDataPacket(std::ostream &os,
3216 const char *path_prefix,
3219 bool loadIntrinsicParentUneditable(
UT_IStream &is,
3220 const char *
path=0);
3222 virtual bool loadPacket(
UT_IStream &is,
short class_id,
3223 short sig,
const char *
path=0);
3224 virtual bool loadPacket(
UT_IStream &is,
const char *token,
3225 const char *
path=0);
3228 const char *
path = 0);
3235 const char *
path = 0);
3238 virtual void loadStart();
3239 virtual void loadFinished();
3243 void loadContentsSection();
3250 void setMatchesOTLDefinition(
int matches);
3252 virtual const char *getFileExtension(
int binary)
const = 0;
3253 virtual const char *getDataFileExtension(
int binary)
const;
3257 virtual void checkTimeDependencies(
int do_parms=1,
3263 virtual void checkContextOptionDependencies(
int do_parms);
3270 int haveSeenDataModification(
exint modification_id);
3280 virtual int propagateModification(
OP_Node *by_whom,
3287 OP_Cache * getCookCache() {
return &myCache; }
3289 static void cmd_locate(
CMD_Args &);
3291 virtual void saveFlagsForUndo();
3292 void saveForUndoLayout();
3294 static void saveForUndoDelete(
OP_NodeList &nodes);
3297 void clearDependency();
3310 bool dirtyForTimeChange(
fpreal t)
3312 if (isCookedTime(t))
3326 virtual void cloneFromProxyRefNode(
OP_Network *proxy );
3331 bool hasOpDependents()
3332 {
return !myOpDependents.isEmpty(); }
3333 virtual int hasProxyRefNodes()
const
3335 virtual void moveProxyRefNodes(
OP_Network * ) { }
3336 void clearOpReferences();
3337 virtual void rebuildOpDependents(
bool proxy_only );
3340 virtual int removeOpDependent(
3343 virtual int removeOpDependent(
3357 virtual void moveDependencies(
OP_Node *from_node );
3363 void notifyRenameDependents(
const UT_String &full_from );
3364 virtual void notifyRenameDependents(
const UT_String &full_from,
3371 void notifyRenameReferences(
const UT_String &full_from );
3372 virtual void notifyRenameReferences(
const UT_String &full_from,
3376 virtual void handleOpDependency(
int referenced_op_id,
3380 const char *old_fullpath,
3381 const char *old_cwd,
3382 const char *old_chan_name );
3383 virtual void buildParmDependency(
int parm_index );
3385 void addOpNameReference(
3389 void addChannelNameReference(
3415 bool changeOpPathRef(
UT_String &value_str,
3416 const char *new_fullpath,
3417 const char *old_fullpath,
3418 const char *old_cwd,
3419 const char *new_cwd );
3423 static bool getStringParmOpPath(
3426 void handleStringParmOpPathDependency(
3427 int parm_index,
int vi,
3428 const char *new_fullpath,
3429 const char *old_fullpath,
const char *old_cwd );
3432 void notifyNodeDeletion();
3436 virtual void nodeDeleted(
OP_Node *op,
int propagate=1);
3447 void addInputError(
unsigned input_idx);
3457 virtual bool isInputConnectedInsideSubnet(
int input_idx)
const;
3458 virtual bool isNamedInputConnectedInsideSubnet(
3462 virtual void nodeUnlocked() { ; }
3465 virtual void setUniqueId(
int id);
3466 void changeOpDependentUniqueId(
int old_id,
int new_id );
3467 void changeOpReferenceUniqueId(
int old_id,
int new_id );
3468 virtual void clearUniqueId();
3470 void setAllowBuildDependencies(
int yesno )
3471 { myAllowBuildDependencies = yesno; }
3472 int allowBuildDependencies()
const
3473 {
return myAllowBuildDependencies; }
3477 void evaluateAllParms(
fpreal t);
3484 bool collapse =
false,
3485 bool check_missing =
false,
3486 bool show_missing_only=
false);
3489 const char *stringparm,
3490 int framestart,
int frameend,
3493 bool show_only_missing,
3499 virtual void getDescriptiveParmName(
UT_String &str)
const;
3504 virtual void getDescriptiveName(
UT_String &str)
const;
3507 void dirtyDescriptiveNameCache();
3510 virtual bool canDestroyNode();
3516 virtual bool cookedDataUsesAllParameters()
const
3520 virtual bool cookedDataNeedsErrors()
const
3528 virtual bool cookDataForAnyOutput()
const
3533 bool getIsRunningInCreateScript()
const;
3539 virtual void refreshRepresentativeNode(
OP_Node &changed_child);
3543 virtual void setupConnectorsAfterLoad();
3550 bool isCookedTime(
fpreal t)
const
3552 return dataMicroNodeConst()
3553 .isEqualToLastUpdateTime(t);
3558 virtual void dumpMicroNodes(
3561 int indent_level)
const;
3566 int myLastGroupMask;
3569 int myParmLastGroupMask;
3578 void deleteInput(
int idx);
3582 virtual void doDeleteInput(
int idx);
3585 void updateErrorSeverity();
3588 virtual void onInputAllocated(
OP_Input* new_input,
int index) { }
3591 void checkConnectorsConsistency();
3599 void renameOutput(
OP_Output* output,
int new_id);
3601 void notifyChannelOpDependents(
PRM_Parm * in_parm,
int vecid);
3607 void updateSpareParmTemplates(
3609 bool leavedefaultsunchanged)
override;
3611 bool doDebugConsistencyCheck();
3618 OP_ERROR saveGroupMemberships(std::ostream &os,
3620 const char *path_prefix);
3624 OP_ERROR saveNetworkBox(std::ostream &os,
3626 const char *path_prefix);
3633 void saveForUndoComment();
3634 void saveForUndoDelScript();
3637 const UT_BitArray &getGroups()
const {
return myGroups; }
3646 void setInterrupted();
3648 int findAncestor(
const OP_Node *node)
const;
3649 int findDataAncestor(
const OP_Node *node)
const;
3650 void clearRecursionBit()
const;
3652 void initializeExpressions()
const;
3654 void clearOutputs();
3658 static bool getMicroNodesFromRef(
3662 static void traverseInputsAddInputs(
3666 TraverseOptions opts,
3668 bool include_parmlist);
3673 void removeOpReference(
3676 void removeOpReference(
3681 int addOpDependent(
int op_id,
3686 void updateRenameDependent(
OP_Node *dependent,
3687 const char *old_cwd,
3690 void notifyInputOpDependents(
int input_i);
3692 void getExistingOpReferencesImpl(
3693 OP_NodeList &refs,
bool include_descendants)
const;
3694 void getExistingOpDependentsImpl(
3695 OP_NodeList &deps,
bool include_descendants)
const;
3697 void buildScriptOpDependencies();
3698 void changeScriptOpRef(
const char *new_fullpath,
3699 const char *old_path,
3700 const char *old_cwd );
3701 static void changeScriptCB(
UT_String &str,
3702 const char *token_start,
3703 const char *&ch,
void *userdata );
3717 char *childpref,
int childpreflen,
3725 bool internalSetGlobalParam(
const char *
param,
3729 bool internalSetPicked(
bool on_off,
3730 bool propagate_parent_event,
3736 virtual void removeInputFromMapping(
int idx);
3737 void removeOutputFromMapping(
int idx);
3745 void resolveUnresolvedLoadedInputs();
3748 OP_Output *getOrCreateOutput(
int array_index,
bool create,
3751 uint32 computeCompiledHash()
const;
3755 void addDeprecationWarningsIfAny();
3758 int getConnectorNextId()
const;
3760 bool computeCompiledStatus()
const;
3762 bool isOperatorThreadSafe()
const;
3767 virtual bool isSelectionOwnerType()
const
3774 static void addExtraInputs(
3779 static void addExtraInput(
OP_Node &
source,
int source_pi,
int source_vi,
3780 OP_Node &target,
int target_pi,
int target_vi
3783 static bool getMicroNodesFromRef(
3787 static bool getMicroNodesFromRef(
3788 OP_Node &op,
int parm_i,
int vec_i,
3800 virtual bool isUsingCurrentFrameForVexTransformContext()
const {
return true;}
3834 int myScriptsBlockingDelCount;
3836 int myNextIdOverride;
3837 unsigned myActiveInputIndex;
3840 int myLegacyConnectingInputIndex;
3845 unsigned int myRenameConflict : 1,
3846 myCookedForRender : 1,
3847 myModifyWaiting : 1,
3848 myBuiltExplicitly : 1,
3849 myAllowBuildDependencies : 1,
3851 myRunningCreateScript : 1,
3852 myRunningDelScript : 1,
3853 myAlreadyRunDelScript : 1,
3854 myMatchesOTLDefinition : 1,
3855 myLoadCookedDataError : 1,
3856 myBuiltHashCode : 1,
3857 myIsProxyRefNode : 1,
3858 myInhibitInputConsolidation : 1,
3864 myLocalVarActive : 1;
3866 mutable bool myRecursionFlag;
3869 static int thePropagateLevel;
3910 bool myCachedDescriptiveNameDirty;
3915 bool myLoadedNamedInputs;
3922 int myChildErrorSeverityTimestamp;
3925 static int makeUniqueId(
OP_Node *node);
3927 static bool *theCheckConnectionConsistency;
3928 static int theUniqueId;
3929 static int theUniqueSize;
3930 static OP_Node **theUniqueNodes;
3931 static bool theDoingBulkNotification;
3942 friend class OP_UndoCreate;
3943 friend class OP_UndoDelete;
3944 friend class OP_UndoInput;
3945 friend class OP_UndoSpareParm;
3946 friend class OP_UndoUserData;
3948 friend class op_MicroNodeDirtied;
3965 static inline size_t
3986 #define CAST_INSTANTIATE(PREFIX) \
3987 inline static PREFIX##_Node *CAST_##PREFIX##NODE(OP_Node *op) \
3989 return ((op) ? (op)->castTo##PREFIX##Node() : 0); \
3992 inline static const PREFIX##_Node *CAST_##PREFIX##NODE(const OP_Node *op) \
3994 return ((op) ? (op)->castTo##PREFIX##Node() : 0); \
4019 #undef CAST_INSTANTIATE
4022 #undef INSTANTIATE_FINDNODE_FUNCTIONS
4023 #undef INSTANTIATE_CASTNODE_FUNCTIONS
4024 #undef INSTANTIATE_FOR_ALL_NODE_TYPES
4037 bool into_subnets =
false,
4038 bool through_dots =
true,
4039 int output_idx = -1)
4041 node.
getOutputNodes(*
this, into_subnets, through_dots, output_idx);
4047 using Parent::rbegin;
4050 using Parent::operator();
4051 using Parent::entries;
4066 bool into_subnets =
false,
4067 bool through_dots =
true,
4068 int output_idx = -1)
4074 const_reverse_iterator
end()
const {
return Parent::rend(); }
4083 using Parent::operator();
4084 using Parent::entries;
OP_API const UT_StringHolder OP_USERDATA_NODESHAPE
The change type wasn't set, so it could be any of them.
virtual void executeCommand(const char *command, std::ostream *out, std::ostream *err) const =0
virtual bool setColor(const UT_Color &color)
void adoptFromString(UT_String &str)
#define CAST_INSTANTIATE(PREFIX)
GLenum GLenum GLenum input
OP_API void OPgetUniqueCollections(const CH_ChannelList &channels, CH_CollectionList &collections)
GT_API const UT_StringHolder filename
const PRM_Parm * myParmRef
virtual UT_ErrorSeverity prmCookOverrides(fpreal, int, const char *, int)
virtual OP_ItemType getItemType() const =0
Our children should implement this and return what type of item they are.
OP_ConnectorInputMap::iterator OP_ConnectorInputIter
#define SYS_DEPRECATED(__V__)
GLuint const GLchar * name
virtual void checkChannelDependencies(CH_Channel *, CH_CHANGE_TYPE)
const UT_String & getName() const
int64 getMemoryUsage(bool inclusive) const
FMT_CONSTEXPR auto begin(const C &c) -> decltype(c.begin())
virtual int changeString(const char *from, const char *to, bool fullword)
OP_API void OPlinkNodeToChannel(const OP_Node *node, const CH_Channel *chp)
UT_CycleDetect< OP_Node * > OP_NodeCycleDetect
GT_API const UT_StringHolder time
void addExplicitInput(DEP_MicroNode &inp, bool check_dup)
Methods for manipulating explicit edges.
A task node for managing which thread is currently working on a given task.
GLuint const GLfloat * val
virtual void opChanged(OP_EventType type, void *dataptr=0)=0
GLuint GLuint GLfloat weight
const UT_StringHolder myTableName
UT_LockedRawPtr< OP_NodeList, OP_Lock > OP_LockedNodeList
GLenum GLsizei GLsizei GLsizei GLsizei GLbitfield flags
SYS_FORCE_INLINE T * SYSconst_cast(const T *foo)
base_iterator< const OP_Node *, false > const_reverse_iterator
#define INSTANTIATE_CASTNODE_FUNCTIONS(PREFIX)
virtual void setXY(fpreal x, fpreal y)=0
virtual fpreal getY() const =0
virtual bool getHasTakeData() const
void reverse(I begin, I end)
virtual fpreal getX() const =0
GLsizei GLsizei GLchar * source
Parameters for OP_Node::getInfoText()/OP_Node::getNodeSpecificInfoText()
OP_API const UT_StringHolder OP_USERDATA_BGIMAGES
const OP_DopParent * castToOpDopParent() const
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
std::pair< const OP_Node *, int > opNodeOutput
virtual OP_Network * getParentNetwork() const =0
Returns the network that is our parent.
virtual void clearParmDependency(int parmidx)=0
int(* OP_EditCallback)(void *data, OP_Node *src, CL_Track *track, fpreal t, fpreal value)
const char * c_str() const
virtual UT_StringHolder evaluateDisableExpression(const PRM_Parm &prm, const UT_StringRef &function) const
GLuint GLdouble GLdouble GLint GLint order
UT_SymbolMap< PY_OpaqueObject * > OP_PythonObjectCache
virtual int findString(const char *str, bool fullword, bool usewildcards) const
virtual bool setPicked(bool on_off, bool propagate_parent_event=true)=0
base_iterator< OP_Node *, false > reverse_iterator
const OP_Node * myEvalNode
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
void setDirty(bool flag, bool allow_clear=true)
Flag accessors.
virtual void setAnyUndoFlag()
PivotSpaceT< fpreal32 > PivotSpace
virtual int64 getItemUniqueId() const =0
Functions to get hip-file-unique ids for any item type.
OP_OutputPair(OP_Output *p, OP_ConnectorId n)
GLdouble GLdouble GLdouble GLdouble q
PRM_ParmList * createObsoleteParmList() override
A utility class to do read-only operations on a subset of an existing string.
const char * getFullPath(UT_String &str) const
virtual void pushAsPwdAndRunPython(PY_CompiledCode &compiled_code, PY_Result::Type desired_result_type, PY_Result &result, PY_EvaluationContext *context=NULL) const =0
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
virtual fpreal getW() const =0
const UT_StringHolder myScriptDir
#define INSTANTIATE_FOR_ALL_NODE_TYPES(MACRO_FUNC)
This macro allows us to run another macro for all node types.
UT_ValArray< const CL_Track * > CL_TrackListC
reverse_iterator rbegin()
Begin iterating over the array in reverse.
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
Mapper that provides an HDA section name for a given shader node.
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
void(* OP_EventMethod)(OP_Node *caller, void *callee, OP_EventType type, void *data)
GLint GLenum GLsizei GLint GLsizei const void * data
const GLuint GLenum const void * binary
void resolveAndDeleteObsoleteParmList(PRM_ParmList *&obsolete_parms) override
OP_API const UT_StringHolder OP_USERDATA_OPMENUFILE
GLubyte GLubyte GLubyte GLubyte w
GLuint const GLuint * names
#define INVALID_TABLE_NAME
OP_Network * getRootCompiledParent() const
Wrapper around hboost::intrusive_ptr.
virtual bool triggerParmCallback(PRM_Parm *parmptr, fpreal now, int value, void *data, const UT_Options *options=0)=0
typedef int(WINAPI *PFNWGLRELEASEPBUFFERDCARBPROC)(HPBUFFERARB hPbuffer
DEP_MicroNode & parmMicroNode(int parm_idx, int vi)
SYS_FORCE_INLINE const char * c_str() const
*Note that the tasks the is the thread number *for the or if it s being executed by a non pool thread(this *can happen in cases where the whole pool is occupied and the calling *thread contributes to running the work load).**Thread pool.Have fun
HUSD_API bool eval(VtValue &val, T &ret_val)
#define INSTANTIATE_FINDNODE_FUNCTIONS(PREFIX)
UT_ArrayMap< OP_ConnectorId, OP_Input * > OP_ConnectorInputMap
virtual void setItemExpose(bool expose)
virtual void buildOpDependencies()
GLuint GLuint GLsizei GLenum type
virtual bool getItemExpose() const
UT_ArrayMap< OP_ConnectorId, OP_Output * > OP_ConnectorOutputMap
reverse_iterator rend()
End reverse iterator.
virtual bool changeSpareParms(UT_IStream &ds, UT_String &errors)
GLuint GLsizei GLsizei GLchar * label
OP_API void OPclearNodeToChannelLinks()
GT_API const UT_StringHolder version
GLsizei const GLchar *const * path
GLdouble GLdouble GLdouble b
void doGetFullPath(UT_WorkBuffer &str) const override
Compute the full path of the node.
virtual void rebuildParmDependency(int parmidx)=0
unsigned int OP_ItemTypeMask
const UT_StringHolder myOptypeName
OP_API const char * OPtypeIdLabels[NUM_MANAGERS]
Nice label names used by network view, corresponding to OP_OpTypeId.
A map of string to various well defined value types.
Parameters for OP_Node::fillInfoTree()/OP_Node::fillInfoTreeNodeSpecific()
bool operator==(const OP_NodeParmRef &other)
virtual const UT_String & getItemName() const =0
virtual void addExtraInput(OP_Node *op, OP_InterestType type)
virtual bool setItemName(const UT_String &name)=0
virtual void permissionError(const char *chname=0)
Utility class for containing a color ramp.
typename set_type::iterator iterator
Inherit iterator and const_iterator.
virtual unsigned referenceAllParameters(OP_Parameters *from, bool relative_references=true)
OP_API const UT_StringHolder OP_USERDATA_CHILDOPMENUFILE
void getOutputNodes(UT_Array< OP_Node * > &outputs, bool into_subnets=false, bool through_dots=true, int output_idx=-1) const
A global error manager scope.
GA_API const UT_StringHolder pivot
base_iterator< const OP_Node *, true > const_iterator
OP_API const UT_StringHolder OP_USERDATA_WIRESTYLE
constexpr T pi()
Pi constant taken from Boost to match old behaviour.
UT_CycleDetect< OP_NodeParmRef > OP_NodeParmRefCycle
OP_Network * getParent() const
virtual void clearUndoFlags()
virtual UT_Color getColor() const
Accessors for color used in the network view.
virtual bool getPicked() const =0
virtual void convertOpdefToAbsolutePath(UT_String &str) const =0
This is the base class for all DOP nodes.
virtual OP_Node * castToOPNode()
virtual void spareParmRemoved(const char *parmname)=0
virtual fpreal getH() const =0
OP_NodeParmRef(const OP_Node *eval_node=0, const PRM_Parm *parm_ref=0, int vi=-1)
void lockedExecute(const F &functor)
EXPR_API EXPR_GlobalStaticLock & ev_GlobalEvalLock()
ImageBuf OIIO_API add(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
int operator==(const opParmData &v) const
virtual void syncNodeVersion(const char *old_version, const char *current_version, bool *node_deleted)
Options class for use with OP_Node::saveCommand()
vint4 min(const vint4 &a, const vint4 &b)
#define DEFAULT_COMP_HASH_VALUE
bool wasInterrupted(T *i, int percent=-1)
SYS_FORCE_INLINE PRM_ParmList * getParmList()
GLsizei const GLfloat * value
void sort(I begin, I end, const Pred &pred)
virtual PRM_ParmMicroNode * createParmMicroNodes(PRM_Parm &parm) const
#define UTstatic_pointer_cast
OP_API const UT_StringHolder OP_USERDATA_DESCRIPTIVE_PARM
UT_LockedRawPtr< const OP_NodeList, OP_Lock > OP_LockedConstNodeList
iterator end()
End iterator.
OP_API OP_Node * OPgetNodeFromChannel(const CH_Channel *chp)
virtual bool isParmPendingOverride(const char *, int) const
ImageBuf OIIO_API channels(const ImageBuf &src, int nchannels, cspan< int > channelorder, cspan< float > channelvalues={}, cspan< std::string > newchannelnames={}, bool shuffle_channel_names=false, int nthreads=0)
virtual const PRM_Parm * traverseRef(int *sub_idx, fpreal time, int parm_idx, int vec_idx) const =0