199 , myParentXfo(parent_cb)
204 : myTrackIndex(index)
208 , myParentXfo(parent_cb)
233 #define OPREF_PREFIX "op:"
234 #define OPREF_PREFIX_LEN 3
238 #define DEFAULT_COMP_HASH_VALUE (17*19)
241 #define INVALID_TABLE_NAME "Node"
242 #define OBJ_TABLE_NAME "Object"
243 #define SOP_TABLE_NAME "Sop"
244 #define CHOPNET_TABLE_NAME "ChopNet"
245 #define CHOP_TABLE_NAME "Chop"
246 #define ROP_TABLE_NAME "Driver"
247 #define SHOP_TABLE_NAME "Shop"
248 #define COP_TABLE_NAME "Cop"
249 #define COP2_TABLE_NAME "Cop2"
250 #define COP2NET_TABLE_NAME "CopNet"
251 #define VOP_TABLE_NAME "Vop"
252 #define VOPNET_TABLE_NAME "VopNet"
253 #define DOP_TABLE_NAME "Dop"
254 #define TOP_TABLE_NAME "Top"
255 #define TOPNET_TABLE_NAME "TopNet"
256 #define LOP_TABLE_NAME "Lop"
259 #define MGR_TABLE_NAME "Manager"
260 #define DIR_TABLE_NAME "Director"
261 #define DATA_TABLE_NAME "Data"
265 #define INVALID_SCRIPT_NAME "node"
266 #define OBJ_SCRIPT_NAME "obj"
267 #define SOP_SCRIPT_NAME "sop"
268 #define CHOPNET_SCRIPT_NAME "ch"
269 #define CHOP_SCRIPT_NAME "chop"
270 #define ROP_SCRIPT_NAME "out"
271 #define SHOP_SCRIPT_NAME "shop"
272 #define COP_SCRIPT_NAME "cop"
273 #define COP2_SCRIPT_NAME "cop2"
274 #define COP2NET_SCRIPT_NAME "img"
275 #define VOP_SCRIPT_NAME "vop"
276 #define VOPNET_SCRIPT_NAME "vex"
277 #define DOP_SCRIPT_NAME "dop"
278 #define TOP_SCRIPT_NAME "top"
279 #define TOPNET_SCRIPT_NAME "tasks"
280 #define LOP_SCRIPT_NAME "lop"
283 #define MGR_SCRIPT_NAME "mgr"
284 #define DIR_SCRIPT_NAME "dir"
285 #define MAT_SCRIPT_NAME "mat"
286 #define DATA_SCRIPT_NAME "data"
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 COP_OPTYPE_NAME "COP"
297 #define COP2_OPTYPE_NAME "COP2"
298 #define COP2NET_OPTYPE_NAME "IMG"
299 #define VOP_OPTYPE_NAME "VOP"
300 #define VOPNET_OPTYPE_NAME "VOPNET"
301 #define DOP_OPTYPE_NAME "DOP"
302 #define TOP_OPTYPE_NAME "TOP"
303 #define TOPNET_OPTYPE_NAME "TOPNET"
304 #define LOP_OPTYPE_NAME "LOP"
310 #define MGR_OPTYPE_NAME "MGR"
311 #define DIR_OPTYPE_NAME "DIR"
312 #define DATA_OPTYPE_NAME "DATA"
329 #define OP_NAME_INPUT "input"
330 #define OP_NAME_OUTPUT "output"
331 #define OP_NAME_SUBOUTPUT "suboutput"
332 #define OP_NAME_SUBINPUT "subinput"
333 #define OP_NAME_COLLECT "collect"
337 #define SHOP_MANAGEMENT_OPTYPE "shopnet"
338 #define COP_MANAGEMENT_OPTYPE "copnet"
339 #define COP2_MANAGEMENT_OPTYPE "cop2net"
340 #define ROP_MANAGEMENT_OPTYPE "ropnet"
341 #define CHOP_MANAGEMENT_OPTYPE "chopnet"
342 #define SOP_MANAGEMENT_OPTYPE "sopnet"
343 #define OBJ_MANAGEMENT_OPTYPE "objnet"
344 #define VOP_MANAGEMENT_OPTYPE "vopnet"
345 #define DOP_MANAGEMENT_OPTYPE "dopnet"
346 #define TOP_MANAGEMENT_OPTYPE "topnet"
347 #define LOP_MANAGEMENT_OPTYPE "lopnet"
367 (
bool values_only_ =
false
368 ,
bool defaultstoo_ =
true
369 ,
bool docreate_ =
true
370 ,
bool doparms_ =
true
371 ,
bool doflags_ =
true
372 ,
bool dowires_ =
true
373 ,
bool dowiresout_ =
true
374 ,
bool frames_ =
false
375 ,
bool dogeneral_ =
false
376 ,
bool dochblock_ =
true
377 ,
bool dospareparms_ =
true
378 ,
bool omit_version_info_ =
false
380 : values_only(values_only_)
381 , defaultstoo(defaultstoo_)
382 , docreate(docreate_)
386 , dowiresout(dowiresout_)
388 , dogeneral(dogeneral_)
389 , dochblock(dochblock_)
390 , dospareparms(dospareparms_)
391 , omit_version_info(omit_version_info_)
426 return (myValue == v.
myValue &&
453 #define INSTANTIATE_FINDNODE_FUNCTIONS(PREFIX) \
454 PREFIX##_Node *find##PREFIX##Node(const char *path) const \
458 node = findNode(path); \
459 if (node) return node->castTo##PREFIX##Node(); \
462 #define INSTANTIATE_CASTNODE_FUNCTIONS(PREFIX) \
463 PREFIX##_Node *castTo##PREFIX##Node() const \
468 { const void *this_local = this; \
469 UT_ASSERT(this_local); \
470 if (!this_local) return 0; } \
471 if (getOpTypeID() == PREFIX##_OPTYPE_ID) \
473 return (PREFIX##_Node *) this; \
479 #define INSTANTIATE_FOR_ALL_NODE_TYPES(MACRO_FUNC) \
482 MACRO_FUNC(CHOPNET) \
488 MACRO_FUNC(COP2NET) \
509 static const OP_TypeInfo *getOpInfoFromTableName(
const char *name);
510 static const OP_TypeInfo *getOpInfoFromScriptDir(
const char *dir);
515 {
return myRootCompiledParent; }
524 bool getIsContainedBy(
const OP_Node *testparent)
const;
539 virtual const char *getOpType()
const;
598 const
UT_String &getDelScript()
const {
return myDelScript; }
602 bool setDelScript(
const char *str);
606 const UT_String &getComment()
const {
return myComment; }
607 bool setComment(
const char *str);
620 bool getColorDefault()
const;
621 bool setColorDefault(
bool usedefault);
634 fpreal getX()
const override {
return myPosX; }
635 fpreal getY()
const override {
return myPosY; }
640 void pickRequest(
int shift);
644 bool allow_rel_paths =
false,
645 bool ignore_node_names_env_var =
false);
646 static bool isValidOpName(
const char *
s,
647 bool allow_rel_paths =
false,
648 bool ignore_node_names_env_var =
false)
652 ignore_node_names_env_var);
654 static bool isValidOpName(
const UT_String &str,
655 bool allow_rel_paths =
false,
656 bool ignore_node_names_env_var =
false)
658 return isValidOpName(str.
c_str(),
660 ignore_node_names_env_var);
663 static bool forceValidOpName(
UT_String &name);
668 int findString(
const char *str,
bool fullword,
669 bool usewildcards)
const override;
671 bool fullword)
override;
678 bool notifyVarChange(
683 virtual int getNchildren()
const;
684 virtual OP_Node *getChild(
const char *name,
int *hint=0)
const;
687 bool include_hidden=
false)
const;
690 const char *optype=0,
691 int casesensitive = 0)
const;
694 const char *optype=0,
695 int casesensitive = 0)
const;
706 virtual void getPotentialChildErrorNodes(
OP_NodeList &nodes)
const;
709 static OP_Node *lookupNode(
int unique_id,
bool include_proxy=
false)
711 if( unique_id >= 0 && unique_id <= theUniqueId
712 && theUniqueNodes[unique_id] )
714 if( include_proxy || !theUniqueNodes[unique_id]
716 return theUniqueNodes[unique_id];
720 static int getNumUniqueIds()
721 {
return theUniqueId + 1; }
725 int getUniqueId()
const
726 {
return myUniqueId; }
728 {
return myUniqueId; }
733 bool expandGroupPattern(
const char *
pattern,
735 bool expandToFullPaths =
false);
739 bool patternContainsBundle(
const char *
pattern,
741 bool patternContainsGroup(
const char *
pattern,
744 virtual int isManager()
const;
748 virtual int isManagementNode()
const;
753 bool isEffectivelyAManagementNode()
const;
756 virtual bool isMaterialManager()
const;
766 virtual int isSubNetwork(
bool includemanagementops)
const;
767 virtual int isNetwork()
const;
768 virtual int isInSubNetwork()
const;
770 bool isProxyRefNode()
const
771 {
return myIsProxyRefNode; }
772 void setProxyRefNode(
bool f)
773 { myIsProxyRefNode =
f; }
776 virtual bool isOutputNode()
const;
778 virtual int whichOutputNode()
const;
783 int isNetworkWithKids()
const;
785 virtual int isVex()
const;
791 OP_Bundle * getParmBundle(
const char* parm_name,
int vector_index,
794 void markBundleRefsAsUnused();
795 void cleanUnusedBundleRefs();
796 void cleanAllBundleRefs();
798 static void getValueAsBundlePaths(
fpreal t,
803 static void getValueAsBundlePaths(
fpreal t,
814 virtual bool bundleChanged(
const OP_Bundle *bundle);
817 void touchBundleParm(
const char *name);
818 void touchBundleParm(
int parm_index);
821 virtual int getDandROpsEqual() {
return 1; }
824 virtual int updateDandROpsEqual(
int = 1) {
return 1; }
830 bool isInputAncestor(
const OP_Node *parent,
831 bool check_extra=
true)
const;
836 bool isParentAncestor(
const OP_Node *parent)
const;
849 virtual void getNodeSpecificInfoText(
OP_Context &context,
859 OP_Node *findNode(
const char *
path, OTLSyncMode syncmode = OTLSYNC_DOSYNC)
const;
871 virtual OP_PostIt *findPostItNote(
const char *const_path)
873 virtual OP_Dot *findDot(
const char *const_path)
887 SOP_Node *getSOPNode(
const char *
path,
int addextra = 0,
888 bool *got_by_flag=
nullptr)
const;
891 COP_Node *getCOPNode(
const char *
path,
int addextra = 0)
const;
892 COP2_Node *getCOP2Node(
const char *
path,
int addextra = 0)
const;
896 DOP_Node *getDOPNode(
const char *
path,
int addextra = 0)
const;
897 ROP_Node *getROPNode(
const char *
path,
int addextra = 0)
const;
900 bool *got_by_flag=
nullptr)
const;
902 TOP_Node *getTOPNode(
const char *
path,
int addextra = 0)
const;
904 LOP_Node *getLOPNode(
const char *
path,
int addextra = 0)
const;
911 virtual void getPathWithSubnet(
UT_String &str)
const;
919 void completePath(
const char *prefixpath,
922 virtual CH_Channel *getTrackChannel(
const char *name);
925 const char *trackname,
939 void globNodes(
const char *pat,
UT_String *expand,
942 const char *prefix =
" ");
945 void globChannels(
const char *,
UT_String &expand,
947 const char *prefix =
" ")
const;
949 void globChannels(
const char *
pattern,
958 void globChanRefs(
const char *
pattern,
962 bool use_multi_match =
true);
979 void globNodeChannels(
const char *
pattern,
982 int *parm_start =
nullptr,
991 void globNodeChanRefs(
const char *
pattern,
994 int *parm_start =
nullptr,
997 bool use_multi_match =
true
1003 virtual void globNetworkBoxes(
const char *pat,
UT_String *expand,
1006 const char *prefix =
" ");
1008 virtual void globPostIts(
const char *pat,
UT_String *expand,
1011 const char *prefix =
" ");
1022 virtual bool opShouldHandleChange(
OP_EventType reason);
1027 virtual void referencedParmChanged(
int pi);
1033 virtual void forceRecook(
bool evensmartcache =
true);
1039 virtual void reloadExternalFiles();
1045 virtual unsigned needToCook(
OP_Context &context,
bool queryonly=
false);
1058 static bool parallelCook(
OP_Context &context,
1069 template <
typename F>
1070 void cookLockedExecute(
const F &functor);
1077 const UT_TaskState & taskState()
const {
return myTaskState; }
1084 void bumpVersionParm()
1086 dataMicroNode().bumpModVersion();
1087 if (hasIndepParmListMicroNode())
1088 parmListMicroNode().bumpModVersion();
1090 int cookParmsModified()
const
1091 {
return parmListMicroNodeConst()
1092 .isModVersionOutdated(); }
1099 virtual int getDataClass()
const;
1108 virtual OP_DataType getCookedDataType()
const = 0;
1109 virtual void *getCookedData(
const OP_Context &);
1110 virtual void deleteCookedData() = 0;
1112 virtual int saveCookedData(std::ostream &os,
OP_Context &,
1124 virtual int getRelativeCaptureTransform(
OP_Node &to,
1127 virtual int getRelativeCaptureTransform(
OP_Node &to,
1138 TRANSFORM_PRECONSTRAINT,
1139 TRANSFORM_PARENTBONE,
1142 TRANSFORM_PRERAWPARM,
1155 bool ok = getWorldTransform(m, ctx);
1162 bool ok = getIWorldTransform(m, ctx);
1169 bool ok = getTransform(mode, m, ctx);
1176 void addTransformError(
const OP_Node &node,
1177 const char *
label=0)
const;
1185 virtual const char *getInternalOpTable()
const
1190 virtual const char *inputLabel(
unsigned idx)
const;
1191 virtual const char *outputLabel(
unsigned idx)
const;
1196 const char *inputLabelNum(
unsigned idx)
const;
1197 const char *outputLabelNum(
unsigned idx)
const;
1201 virtual const char *inputConnectorLabel(
unsigned idx);
1204 virtual int isRefInput(
unsigned idx)
const;
1208 virtual int getAuxInput()
const;
1222 bool getLock()
const {
return flags().isLocked(); }
1224 bool getSoftLock()
const {
return flags().getSoftLocked();}
1225 void setSoftLock(
bool on_off)
1231 bool getHardLock()
const {
return flags().getHardLocked();}
1232 void setHardLock(
bool on_off)
1240 virtual OP_LockTypes setModelLock(OP_LockTypes state,
1241 void *modeler =
nullptr,
1242 bool allow_softlock_promotion =
false,
1250 int getNetworkLock(
bool relaxedlockcheck =
false,
1251 const OP_Node *inputNode=
nullptr)
const;
1256 bool setUnload(
bool on_off);
1257 bool getUnload()
const;
1260 virtual bool isLoaded()
const {
return true; }
1265 virtual bool unloadData();
1268 void takeActivateFlag(
uchar flag,
bool enable=
true,
1269 bool send_flag_event=
true);
1270 void takeDeactivateFlag(
uchar flag)
1271 { takeActivateFlag(flag,
false); }
1272 bool takeIsActiveFlag(
uchar flag)
const;
1273 void setHasTakeData(
bool onoff);
1275 bool canAccessFlag(
unsigned mask,
uchar flag)
const;
1283 bool propagate_parent_event =
true)
override;
1289 bool setEditPicked(
bool on_off,
1290 bool propagate_parent_event =
true);
1295 void setAutoscope(
bool on_off) { myAutoscope = on_off; }
1296 bool isAutoscope() {
return myAutoscope; }
1298 bool setCurrent(
bool on_off);
1299 bool setExpose(
bool on_off);
1300 bool setBypass(
bool on_off);
1301 bool setTemplate(
bool on_off);
1302 bool setFootprint(
bool on_off);
1303 bool setXray(
bool on_off);
1304 bool setDisplay(
bool on_off);
1305 bool setRender(
bool on_off);
1306 bool setHighlight(
bool on_off);
1307 bool setModified(
bool on_off);
1308 bool setSaveBypass(
bool on_off);
1309 bool setSaveData(
bool on_off);
1311 virtual bool setPickable(
bool on_off)
1313 virtual bool setAudio(
bool on_off)
1315 virtual bool setExport(
bool on_off)
1317 virtual bool setDebug(
bool on_off)
1319 virtual bool setDisplayOrigin(
bool on_off_unchanged)
1325 void userSetTemplate(
bool onoff);
1330 void userSetSelectableTemplate(
bool onoff);
1334 virtual void setFlag(
char tag,
int8 val);
1335 virtual int8 getFlag(
char tag)
const;
1338 {
return flags().getPicked(); }
1339 virtual bool getEditPicked()
const
1341 bool getCurrent()
const;
1342 bool getDisplay()
const {
return flags().getDisplay(); }
1343 bool getRender()
const {
return flags().getRender(); }
1344 bool getHighlight()
const {
return flags().getHighlight();}
1345 bool getBypass()
const {
return flags().getBypass(); }
1346 bool getTemplate()
const {
return flags().getTemplate(); }
1347 bool getFootprint()
const {
return flags().getFootprint(); }
1348 bool getXray()
const {
return flags().getXray(); }
1349 bool getExpose()
const {
return flags().getExpose(); }
1350 bool getModified()
const {
return flags().getModified(); }
1351 bool getSaveBypass()
const{
return flags().getSaveBypass(); }
1352 bool getSaveData()
const {
return flags().getSaveData(); }
1354 {
return flags().getHasTakeData(); }
1355 virtual bool getPickable()
1357 virtual bool getAudio()
const
1359 virtual bool getExport()
const
1361 virtual bool getDebug()
const
1363 virtual bool getDisplayOrigin()
const
1366 {
return getExpose(); }
1368 { setExpose(expose); }
1371 bool getDisplayDescriptiveName()
const
1372 {
return flags().getDisplayDescriptiveName();}
1373 bool setDisplayDescriptiveName(
bool state);
1374 bool getDisplayComment()
const
1376 bool setDisplayComment(
bool state);
1377 int8 getOutputForView()
const
1378 {
return flags().getOutputForView(); }
1379 int8 setOutputForView(
int8 output);
1381 OP_Node *getPickableSelfOrParent();
1386 bool setCompress(
bool on_off);
1387 bool getCompress()
const;
1391 void setCurrentAndPicked();
1399 virtual bool setVisible(
bool onoff);
1400 virtual bool getVisible()
const;
1407 virtual void getSaveFlagsString(
UT_String &cmd,
1409 bool save_to_hip)
const;
1410 virtual void getPreParmSaveFlagsString(
UT_String &cmd )
const;
1411 virtual void getPostParmSaveFlagsString(
UT_String &cmd )
const;
1416 {
return myEventValue.hasOpInterest(data, m); }
1421 { myEventValue.addOpInterest(data, m); }
1425 { myEventValue.removeOpInterest(data, m); }
1427 int isBeingDeleted()
const
1428 {
return myBeingDeleted; }
1429 void setNodeBeingDeleted(
int beingdeleted);
1433 bool setInhibitInputConsolidation(
bool value);
1446 virtual unsigned minInputs()
const;
1449 virtual unsigned maxInputs()
const;
1453 virtual unsigned getNumVisibleInputs()
const;
1463 virtual unsigned orderedInputs()
const;
1467 virtual unsigned maxOutputs()
const;
1471 virtual unsigned getNumVisibleOutputs()
const;
1474 bool hasUnorderedInputs()
const;
1484 virtual unsigned nInputs()
const;
1491 unsigned nConnectedInputs(
bool check_subnet_inside=
true)
const;
1493 unsigned getActiveInputIndex()
const
1494 {
return myActiveInputIndex; }
1495 void setActiveInputIndex(
unsigned idx);
1504 OP_Node *getInputFollowingOutputs(
int input,
1509 int getConnectedInputIndex(
int startAt = -1)
const;
1512 int getNthConnectedInput(
int n)
const;
1516 virtual void getParallelInputs(
OP_Context &context,
1520 void forceClearInput(
int idx);
1524 unsigned outputIdx = 0);
1527 virtual OP_ERROR setIndirectInput(
unsigned idx,
1531 virtual OP_ERROR setInputReference(
unsigned idx,
const char *
label,
1532 int keeppos,
unsigned outputIdx = 0);
1536 int whichInputIs(
const OP_Node *who)
const;
1549 int whichOutputIs(
const OP_Node* target_node,
1550 int input_on_target_node)
const;
1555 int whichOutputIsFollowingIndirect(
1557 int input_on_target_node)
const;
1562 int whichInputIs(
const OP_Node* source_node,
1566 void consolidateInputs();
1567 virtual void clearUnreferencedInputs();
1568 virtual bool allowConsolidatingInput(
int idx);
1574 virtual OP_Input *getInputReference(
unsigned idx,
bool grow);
1578 virtual OP_Input *getInputReferenceConst(
unsigned idx)
const;
1580 virtual int doDeleteRewire()
const {
return 1; }
1584 virtual void moveInput(
int srcidx,
int dstidx,
1585 bool forcesubnet =
false);
1587 unsigned outputIdx);
1588 OP_ERROR insertIndirectInput(
unsigned idx,
1593 virtual UT_Options getInputDataDefault(
int idx)
const
1598 virtual int getInputEditorInputs();
1600 virtual bool allowInputEditorInputParm();
1602 virtual bool allowInputEditorInputDelete();
1605 virtual bool getInputEditorInputLabel(
UT_String &
label,
int idx);
1608 dataMicroNodeConst()
const
1609 {
return myDataMicroNode; }
1613 dataMicroNodeConst());
1619 parmListMicroNodeConst()
const
1620 {
return dataMicroNodeConst(); }
1624 parmListMicroNodeConst());
1627 bool hasIndepParmListMicroNode()
const
1629 return (&parmListMicroNodeConst()
1630 != &dataMicroNodeConst());
1634 {
return myFlagMicroNode; }
1649 if (!myEventMicroNodes)
1651 return bool(myEventMicroNodes[e]);
1657 virtual void getOwnedMicroNodes(
1662 void propagateDirtyMicroNode(
1666 bool send_root_event);
1675 void addExtraInput(
OP_Node &op,
int parm_i,
int vec_i);
1695 static void addExtraInputToEvalChannel(
1699 addExtraInputToEvalChannel(
1703 static void addExtraInputToEvalChannel(
1705 OP_Node &op,
int parm_i,
int vec_i)
1707 addExtraInputToEvalChannel(
1711 static void addExtraInputToEvalChannel(
1716 target = getEvalChannelMicroNode(thread);
1720 static void addExtraInputToEvalChannel(
1725 target = getEvalChannelMicroNode(thread);
1735 static void addExtraInput(
1738 static void addExtraInput(
1741 static void addExtraInput(
1746 static void addMultiparmInterests(
const OP_InterestRef &target_ref,
1753 void getExtraInputNodes(
1755 bool remove_duplicates =
true,
1756 bool data_interest =
true,
1757 bool parm_interest =
true,
1758 bool flag_interest =
true,
1759 bool include_parmlist =
true,
1760 bool follow_simulation_inputs =
false)
const;
1761 void getExtraOutputNodes(
1763 bool remove_duplicates =
true,
1764 bool data_interest =
true,
1765 bool parm_interest =
true,
1766 bool flag_interest =
true)
const;
1768 int getNumExtraInputs()
const;
1770 void dumpExtraInputs(
1773 int indent_level = 0)
const;
1778 virtual bool buildDefaultCopContext(
OP_Context &context,
1783 static void addExprOpDependency(
const char *arg_str,
1786 static void addExprOpDependency1From2(
const char *arg_str1,
1787 const char *arg_str2,
1790 static void addExprOpParmDependency(
const char *arg_str,
1794 static void changeExprOpRef(
const char *arg_str,
1796 const char *new_fullpath,
1797 const char *old_fullpath,
1798 const char *old_cwd);
1800 static void changeExprOpRef1From2(
const char *arg_str1,
1801 const char *arg_str2,
1804 const char *new_fullpath,
1805 const char *old_fullpath,
1806 const char *old_cwd);
1808 static void changeExprOpParmRef(
const char *arg_str,
1810 const char *new_fullpath,
1811 const char *old_fullpath,
1812 const char *old_cwd,
1813 const char *chan_name,
1814 const char *old_chan_name);
1816 void addGenericOpNameReference(
const UT_String &oppath );
1817 void addGenericOpNameReference(
const PRM_RefId &ref_id,
1819 void addGenericOpInputReference(
const PRM_RefId &ref_id,
1822 static void moveAndUpdateDependencies(
1828 bool getParmBaseNodePath(
1841 void decrementOpReference(
int node_id);
1843 virtual void dumpDependencies(std::ostream &os);
1844 void dumpOpDependents(
OP_Node *
ref,
int brief,
1847 &getOpDependents()
const {
return myOpDependents; }
1851 int countReferences(
int op_id);
1856 bool recurse)
const;
1863 bool include_descendants)
const;
1868 bool include_descendants)
const;
1875 bool include_descendants)
const;
1878 void getParmsThatReference(
const char *channame,
1882 virtual void inputConnectChanged(
int which);
1886 unsigned nOutputEntries()
const;
1890 int nOutputItems(
int output_idx = -1)
const;
1893 bool hasAnyOutputNodes(
bool through_dots =
true,
1894 int output_idx = -1)
const;
1899 bool into_subnets =
false,
1900 bool through_dots =
true,
1901 int output_idx = -1)
const;
1904 OP_Node *getFirstOutputNode(
bool through_dots =
true,
1905 int output_idx = -1)
const;
1920 virtual void fillInfoTreeNodeSpecific(
UT_InfoTree &tree,
1926 virtual bool fillInfoTreeChildSpecific(
UT_InfoTree &tree,
1945 virtual void unlockInput(
unsigned idx);
1947 virtual void unlockInputs();
1952 int getCookCount()
const {
return myCookCount; }
1953 void triggerOutputChanged();
1955 void triggerUIChanged(
1959 virtual int cookedInputIndex()
const {
return -1; }
1974 virtual OP_Node *getPassThroughNode(
1976 bool mark_used =
false);
1978 bool setMinimumCacheSize(
int min_size);
1981 {
return dataMicroNodeConst().modVersion(); }
1985 virtual bool handleTimeChange(
fpreal ) {
return false; }
1989 bool isTimeDependent(
const OP_Context &context);
1993 virtual bool isDiveable()
const;
2012 virtual void getExtraNodesForCopyOrDelete(
OP_NodeList &extras)
const;
2018 virtual bool runCreateScript();
2021 void updateParmsToMatchCurrentUnits();
2025 bool getDelaySyncOTL()
const
2026 {
return myDelaySyncOTL; }
2029 void setDelaySyncOTL(
bool isdelayed);
2032 bool shouldDelaySyncOTL()
const;
2035 void syncDelayedOTL()
2037 if (!getDelaySyncOTL())
return;
2038 internalSyncDelayedOTL();
2043 virtual void matchOTLDefinition();
2046 virtual void unmatchOTLDefinition();
2050 virtual void handleOTLIndexFileCleared();
2055 {
return mySyncErrors; }
2058 {
return mySyncErrorLevel; }
2064 bool isAnyAncestorBeingSynced()
const;
2067 int getMatchesOTLDefinition()
const;
2070 static void propagateMatchOTLDefinitionToAncestors(
OP_Node *node,
2075 int getCanDeviateFromOTLDefinition()
const;
2076 void setAllChildAssetPermissions(
int permission);
2079 void computeAllChildAssetPermissions();
2082 bool getIsEditableAssetSubNode()
const;
2085 void turnOffAllChildExports();
2088 bool haveLicenseToAccessContents(
2089 OP_Node* opt_specific_child =
nullptr)
const;
2090 bool haveLicenseToAccessParentContents()
const;
2091 bool haveAncestorWithoutFullLicense(
bool ignore_self)
const;
2094 OP_Node *getFirstExecLicenseOnlyAncestor(
2095 bool ignore_self =
true)
const;
2097 OP_Node *getLastExecLicenseOnlyAncestor(
2098 bool ignore_self =
true)
const;
2100 bool isCompiled()
const;
2103 void saveWires(std::ostream &os,
const char *name,
2105 void saveOutputWires(std::ostream &os,
const char *name,
2107 virtual void saveIntrinsicCommand(std::ostream &os,
2111 virtual OP_ERROR saveCommand(std::ostream &os,
2115 const char *netboxname,
2132 void saveParameterFlags(std::ostream &os,
const char *name,
2133 const char *command,
2134 bool (
PRM_Parm::*flag_method)(
int)
const,
2135 bool defaultstoo,
bool reverse,
2138 void saveUserDataCommand(
2139 std::ostream &os,
const char *node_name,
2140 bool omit_version =
false);
2148 virtual RampError rampCommand(
bool remove,
fpreal pos,
float rgba[4]);
2149 RampError rampCommand(
bool remove,
fpreal pos,
float rgba[4],
2155 const char *
path=0);
2157 const char *name = 0,
int command = 0);
2168 {
return myUserData; }
2170 OP_ERROR saveUserData(std::ostream &os,
const char *
path);
2171 void clearUserData(
bool save_undo);
2175 static const char *internalUserDataPrefix() {
return "sidefx::"; }
2186 template<
typename T>
2199 bool hasBlindData(
const char *key)
const;
2203 bool deleteBlindData(
const char *key);
2210 OP_ERROR saveDataBlocksPacket(std::ostream &os,
2211 const char *path_prefix,
2214 bool clearDataBlocks();
2220 virtual int deleteNodeData(
void *);
2221 void propagateNodeDataDeleted();
2228 void setCachedPythonObject(
2231 bool deleteCachedPythonObject(
const UT_StringRef &key);
2232 void clearCachedPythonObjects();
2236 {
return myCachedPythonObjects; }
2240 void saveOverrides(std::ostream &os);
2241 void saveOverrides(std::ostream &os,
OP_Node *root,
2244 void saveChildOverrides(std::ostream &os,
OP_Node *root,
2250 const char *parm_name,
2251 int vec_idx)
override;
2253 int vec_idx)
const override;
2256 virtual void removeOverrideDestination(
OP_Node * ) {}
2257 virtual void removeOverrideDestination(
OP_Node * ,
2263 std::ostream *err)
const override;
2274 void addPythonNodeError(
const PY_Result &py_result);
2276 void saveInputs(std::ostream &os,
bool compile_basic);
2278 bool named =
false);
2279 void saveNamedInputs(std::ostream &os,
bool compile_basic);
2280 void saveNamedOutputs(std::ostream &os);
2285 void getEditableInputDataKeys(
int idx,
2289 bool setEditableInputData(
int idx,
2292 void saveEditableInputData(std::ostream &os)
const;
2299 bool setEditableInputString(
int idx,
2314 virtual void saveDialogScriptExtraInfo(std::ostream &os);
2330 int &op_id,
fpreal &op_time,
2332 static int findOpFramePair(
const char *
path,
int &op_id,
2336 static void buildXformOrder(
int trs,
int xyz,
2339 static const UT_XformOrder& buildXformOrder(
int trs,
int xyz );
2362 fpreal pivot_rz,
bool inverse =
false);
2370 fpreal pivot_rz,
bool inverse =
false);
2372 static void buildXform(
int trs,
int xyz,
2373 float tx,
float ty,
float tz,
2374 float rx,
float ry,
float rz,
2375 float sx,
float sy,
float sz,
2376 float px,
float py,
float pz,
2378 static void buildXform(
int trs,
int xyz,
2379 double tx,
double ty,
double tz,
2380 double rx,
double ry,
double rz,
2381 double sx,
double sy,
double sz,
2382 double px,
double py,
double pz,
2384 static void buildXform(
int trs,
int xyz,
2385 float tx,
float ty,
float tz,
2386 float rx,
float ry,
float rz,
2387 float sx,
float sy,
float sz,
2390 static void buildXform(
int trs,
int xyz,
2391 double tx,
double ty,
double tz,
2392 double rx,
double ry,
double rz,
2393 double sx,
double sy,
double sz,
2396 static void buildXform(
int trs,
int xyz,
2397 float tx,
float ty,
float tz,
2398 float rx,
float ry,
float rz,
2399 float sx,
float sy,
float sz,
2400 float s_xy,
float s_xz,
float s_yz,
2401 float px,
float py,
float pz,
2403 static void buildXform(
int trs,
int xyz,
2404 double tx,
double ty,
double tz,
2405 double rx,
double ry,
double rz,
2406 double sx,
double sy,
double sz,
2407 double s_xy,
double s_xz,
double s_yz,
2408 double px,
double py,
double pz,
2410 static void buildXform(
int trs,
int xyz,
2411 float tx,
float ty,
float tz,
2412 float rx,
float ry,
float rz,
2413 float sx,
float sy,
float sz,
2414 float s_xy,
float s_xz,
float s_yz,
2417 static void buildXform(
int trs,
int xyz,
2418 double tx,
double ty,
double tz,
2419 double rx,
double ry,
double rz,
2420 double sx,
double sy,
double sz,
2421 double s_xy,
double s_xz,
double s_yz,
2424 static void buildXform(
2425 const UT_Matrix4F::FullTransformModel &parms,
2427 static void buildXform(
2428 const UT_Matrix4D::FullTransformModel &parms,
2430 static void buildXform(
int trs,
2431 float tx,
float ty,
float rz,
2432 float sx,
float sy,
float px,
float py,
2434 static void buildXform(
int trs,
2435 double tx,
double ty,
double rz,
2436 double sx,
double sy,
double px,
double py,
2438 static void buildXform(
int trs,
2439 float tx,
float ty,
float rz,
2440 float sx,
float sy,
float s_xy,
2443 static void buildXform(
int trs,
2444 double tx,
double ty,
double rz,
2445 double sx,
double sy,
double s_xy,
2446 double px,
double py,
2449 virtual int getTranslateParmIndex();
2453 void resolveInputReferences();
2455 static void clearAllPendingUndoFlags();
2459 void saveForUndoInput();
2470 void blockModify(
int on_off,
int propagate = 1);
2472 int isBlockModify()
const;
2473 bool isModifyWaiting()
const;
2474 virtual void propagateEndBlockModify();
2483 fpreal getLastCookTime()
const;
2485 void getLastCookTime(
UT_String &last_cook_time)
const;
2487 void getCookInfo(
UT_String &info)
const;
2497 virtual int isCookingRender()
const {
return 0; }
2498 virtual void setCookingRender(
int val);
2500 virtual void clearInterrupted()
2501 { clearInterruptedImpl(
true); }
2503 {
return flags().getInterrupted(); }
2508 void setRenameConflict()
2509 { myRenameConflict = 1; }
2510 void setRunningCreateScript(
int onoff);
2516 virtual void getInputRes(
int input,
fpreal t,
2523 int group_mask = 1);
2525 virtual int getNumInputsToHash();
2526 virtual OP_Node *getInputToHash(
int i);
2528 void clearHashCodeFlags();
2529 bool isHashCodeBuilt()
const {
return myBuiltHashCode;}
2530 void builtHashCode(
bool b =
true) { myBuiltHashCode =
b; }
2537 void setCreatorState(
const char *s)
2538 { myCreatorState.harden(s); }
2539 const UT_String &getCreatorState()
const {
return myCreatorState; }
2540 void builtExplicitly(
int yn) { myBuiltExplicitly = yn; }
2541 int wasBuiltExplicitly()
const{
return myBuiltExplicitly; }
2543 bool matchesState(
const char *state)
const;
2551 virtual void changeParmTemplate(
PRM_Template *new_template);
2554 virtual void ensureInputsAndOutputsAreValid();
2558 void connectToInputNode(
OP_Node &inputnode,
int input_idx,
2574 static void buildQuadricXform(
UT_Matrix4 &mat,
2575 float tx,
float ty,
float tz,
2576 float sx,
float sy,
float sz,
2578 float rx = 0.0
f,
float ry = 0.0
f,
2582 double tx,
double ty,
double tz,
2583 double sx,
double sy,
double sz,
2585 double rx = 0.0,
double ry = 0.0,
2589 int theMenuSize,
int (*doAdd)(
OP_Node *) = 0,
2590 int startItem = 0,
const PRM_Parm *parm = 0,
2591 int showSubnets = 1,
int expandSubnets = 1,
2592 bool recurse =
false);
2597 static void buildPreDefRulesMenu(
PRM_Name *menu,
2609 static int getNameSerialIndex();
2612 virtual void setMapping(
int idx,
int type,
const char *
label = 0);
2613 virtual int getMapping(
int idx,
const char *&
label)
const;
2621 bool hasComment()
const;
2622 bool hasParmsNotAtFactoryDefault()
const;
2623 bool hasAnimatedParms()
const;
2624 bool hasChopOverriddenParms()
const;
2654 TRAVERSE_DEFAULT = 0x0000,
2655 TRAVERSE_INTO_SUBNETS = 0x0001,
2656 TRAVERSE_REF_INPUTS = 0x0002,
2657 TRAVERSE_ONLY_USED_INPUTS = 0x0004,
2658 TRAVERSE_PASSTHROUGH_INPUTS = 0x0008,
2659 TRAVERSE_EXTRA_INPUTS = 0x0010,
2660 TRAVERSE_SIMULATION_INPUTS = 0x0020,
2661 TRAVERSE_COOKED_INPUT_INDEX_INPUTS = 0x0040,
2663 bool traverseInputs(
bool (*callback)(
OP_Node &,
void *),
2665 TraverseOptions opts,
2668 bool traverseInputs(
bool (*callback)(
const OP_Node &,
void*),
2670 TraverseOptions opts,
2682 bool traverseChildren(
bool (*callback)(
OP_Node &,
void*),
2684 bool recurse_into_subnets);
2688 bool isCooking(
bool include_ancestors)
const;
2692 virtual bool usesFootprint()
const {
return false; }
2696 bool from_children_too =
true,
2697 bool collapse =
false,
2698 bool check_missing =
false,
2699 bool show_missing_only =
false);
2700 virtual bool getSaveWithVopnets();
2701 virtual void runDelScript();
2704 virtual void preDelete() { }
2708 virtual DOP_Parent *castToDOPParent() {
return 0; }
2709 virtual const DOP_Parent *castToDOPParent()
const {
return 0; }
2723 *getVopAutoCodeGenerator()
const{
return 0; }
2726 virtual void buildVopCodeGenerator() {}
2734 bool create_if_needed=
false)
2744 virtual int beginVopCodeGeneratorUpdate() {
return 0; }
2745 virtual void endVopCodeGeneratorUpdate(
int update_level) {}
2755 int end_parm = INT_MAX,
2756 bool use_parmvop_tag=
true
2758 int buildVexCommandWithDependencies(
OP_Node *owner,
2764 int end_parm = INT_MAX,
2765 bool use_parmvop_tag=
true
2776 static PRM_Name theVexClearParmName;
2787 virtual bool hasVexShaderParameter(
const char *parm_name);
2797 virtual bool getScriptMaterialInfo(
UT_String & mat_info,
2805 virtual const char *getHDASubType()
2810 bool setChannelAlias(
PRM_Parm &parm,
int subindex,
2811 const char *alias_name);
2813 void disconnectAllInputsOutputs(
bool keepSelected,
2814 bool forceDisconnectOutputs =
false);
2816 void disconnectAllInputs();
2817 void disconnectAllOutputs();
2820 virtual void notifyParmRenameDependents(
2824 void writeChannel(
CH_Channel *channel, std::ostream &os,
2825 const char *name,
bool frames);
2826 void writeAllChannels(std::ostream &os,
const char *name,
2827 bool frames,
bool dochblock,
2838 const UT_Options *options =
nullptr)
override;
2841 int64 getExtraInputMemoryUsage()
const;
2842 static void printOpMemoryUsageStats(std::ostream &os);
2847 virtual void unscopeChannels(
bool recurse);
2852 virtual void undisplayChannels(
bool recurse);
2857 virtual void unpinChannels(
bool recurse);
2862 virtual void setChannelScope(
const char *
pattern,
2891 bool relative_references =
true)
override;
2893 void clearVersionUserData();
2894 void updateVersionUserData();
2904 void syncNodeVersionIfNeeded(
2906 const char *from_version =
nullptr,
2907 bool update_node_version =
false);
2913 const char *old_version,
2914 const char *current_version,
2915 bool *node_deleted)
override;
2923 bool setGlobalFloatParam(
const char *
param,
2926 bool setGlobalStringParam(
const char *
param,
2927 const char *strvalue,
2932 void beginPropagateModification();
2933 void endPropagateModification();
2936 virtual void getActiveOperatorsDefinedByOTL(
2943 static bool getDoingBulkNotification();
2944 static bool isDirectorDoingBulkNotification();
2949 virtual bool hasDifferentMultiInputs()
const;
2952 virtual bool canCreateNewOpType()
const;
2953 static bool createNewOpType
2956 const char *typeName=
nullptr,
2957 const char *typeLabel=
nullptr,
2958 const char *otlFile=
nullptr,
2959 const char *metaSource=
nullptr,
2960 const char *comment=
nullptr,
2962 const char *newName=
nullptr,
2963 int minimumInputs=-1,
2964 int maximumInputs=-1,
2965 bool ignore_external_references=
false,
2966 bool compress_contents=
false,
2968 int *newNodeId=
nullptr,
2969 bool compile_contents =
false,
2970 bool change_node_type =
true,
2971 bool create_backup =
true);
2974 virtual void setMaterialIconFilename(
const char * ) {}
2976 virtual bool getMaterialIconAllowRegenerateFlag() {
return true; }
2977 virtual void setMaterialIconAllowRegenerateFlag(
bool) {}
2984 static void startBulkNotifications(
2987 static void endBulkNotifications(
2994 virtual bool willAutoconvertInputType(
int input_idx);
3000 virtual bool getIsInputVisibleDefault(
int idx);
3004 bool verifyTemplatesWithParameters()
const;
3009 OP_Input *getNamedInputReferenceConst(
3013 bool mark_used=
false)
const;
3017 virtual int getInputFromName(
const UT_String &in)
const;
3018 virtual int getOutputFromName(
const UT_String &out)
const;
3019 virtual void getInputName(
UT_String &in,
int idx)
const;
3020 virtual void getOutputName(
UT_String &out,
int idx)
const;
3024 int getInputFromUniqueName(
3026 int getOutputFromUniqueName(
3031 void getUniqueInputName(
3033 bool getUniqueInputNameConst(
3037 bool getUniqueOutputNameConst(
3045 virtual OP_ERROR setNamedIndirectInput(
3048 virtual OP_ERROR setNamedInputReference(
3050 const char *
label,
int,
3061 virtual void onCreated() { }
3063 virtual bool isOrderedInput(
const OP_ConnectorId& input_name)
const;
3071 virtual bool willAutoconvertNamedInputType(
3080 unsigned getInputsArraySize()
3081 {
return myInputs.entries(); }
3084 {
return (getInputsArraySize() > idx) ? 1 : 0; }
3092 bool setLocalVarActive(
bool f)
3094 bool old = myLocalVarActive;
3095 myLocalVarActive =
f;
3100 bool isLocalVarActive()
const
3101 {
return myLocalVarActive; }
3108 void recomputeCompiledHash();
3112 void clearCompiledHash()
3118 { sendEvent(type,
data); }
3120 virtual bool scopedChannelsDirty();
3124 virtual bool getActiveLayerContribution(
const UT_String &track_name,
3130 virtual bool resolveExport(
const PRM_Parm* p,
int subindex,
3136 virtual bool addOrMoveVisualizerToOutput(
int outputidx)
3143 int vec_idx)
const override;
3145 OP_Bundle * getParmBundle(
const char* parm_name,
int vector_index,
3147 const char *
filter,
bool subnet_inclusion);
3151 static const UT_Color &getGlobalDefaultColor();
3157 static fpreal getFlagWidth();
3159 static fpreal getNodeHeight();
3162 static fpreal getNodeButtonWidth();
3164 static fpreal getConnectorHeight();
3171 static bool canDestroyNodes(
OP_Network *src_net,
3185 virtual void getDefaultState(
UT_String &default_state_name);
3205 void clearInputContextOptionDepIfSafe(
3210 virtual bool hasTransformTracks()
const {
return false; }
3223 void getOriginalOperatorTableAndName(
UT_WorkBuffer &name)
const;
3224 void getOriginalOperatorTableAndName(
UT_String &name)
const;
3244 void resolveUnresolvedLoadedInputs();
3248 void finishedLoadingParentNetwork();
3252 static void bumpNameSerialIndex();
3256 void beginScriptBlockingDel()
3257 { myScriptsBlockingDelCount += 1; }
3258 void endScriptBlockingDel()
3259 { myScriptsBlockingDelCount -= 1; }
3262 void setLegacyConnectingInputIndex(
int index)
3263 { myLegacyConnectingInputIndex =
index; }
3267 virtual void clearAndDestroy();
3270 virtual void clearCache();
3272 void clearInterruptedImpl(
bool allow_recook);
3287 virtual void doOverridePreCook() { }
3288 virtual void doOverridePostCook() { }
3293 int getSourceCount()
const;
3294 virtual int bumpSourceCount(
int d);
3301 virtual OP_ERROR saveIntrinsic(std::ostream &os,
3304 const char *path_prefix =
"",
3306 OP_ERROR saveUserDataPacket(std::ostream &os,
3307 const char *path_prefix,
3310 bool loadIntrinsicParentUneditable(
UT_IStream &is,
3311 const char *
path=0);
3313 virtual bool loadPacket(
UT_IStream &is,
short class_id,
3314 short sig,
const char *
path=0);
3315 virtual bool loadPacket(
UT_IStream &is,
const char *token,
3316 const char *
path=0);
3319 const char *
path = 0);
3326 const char *
path = 0);
3329 virtual void loadStart();
3330 virtual void loadFinished();
3334 void loadContentsSection();
3341 void setMatchesOTLDefinition(
int matches);
3343 virtual const char *getFileExtension(
int binary)
const = 0;
3344 virtual const char *getDataFileExtension(
int binary)
const;
3360 virtual void checkTimeDependencies(
int do_parms=1,
3366 virtual void checkContextOptionDependencies(
int do_parms);
3373 int haveSeenDataModification(
exint modification_id);
3383 virtual int propagateModification(
OP_Node *by_whom,
3390 OP_Cache * getCookCache() {
return &myCache; }
3392 static void cmd_locate(
CMD_Args &);
3394 virtual void saveFlagsForUndo();
3395 void saveForUndoLayout();
3397 static void saveForUndoDelete(
OP_NodeList &nodes);
3400 void clearDependency();
3413 bool dirtyForTimeChange(
fpreal t)
3415 if (isCookedTime(t))
3429 virtual void cloneFromProxyRefNode(
OP_Network *proxy );
3434 bool hasOpDependents()
3435 {
return !myOpDependents.isEmpty(); }
3436 virtual int hasProxyRefNodes()
const
3438 virtual void moveProxyRefNodes(
OP_Network * ) { }
3439 void clearOpReferences();
3440 virtual void rebuildOpDependents(
bool proxy_only );
3443 virtual int removeOpDependent(
3446 virtual int removeOpDependent(
3460 virtual void moveDependencies(
OP_Node *from_node );
3466 void notifyRenameDependents(
const UT_String &full_from );
3467 virtual void notifyRenameDependents(
const UT_String &full_from,
3474 void notifyRenameReferences(
const UT_String &full_from );
3475 virtual void notifyRenameReferences(
const UT_String &full_from,
3479 virtual void handleOpDependency(
int referenced_op_id,
3483 const char *old_fullpath,
3484 const char *old_cwd,
3485 const char *old_chan_name );
3486 virtual void buildParmDependency(
int parm_index );
3488 void addOpNameReference(
3492 void addChannelNameReference(
3504 void removeOpReference(
3507 void removeOpReference(
3526 bool changeOpPathRef(
UT_String &value_str,
3527 const char *new_fullpath,
3528 const char *old_fullpath,
3529 const char *old_cwd,
3530 const char *new_cwd );
3534 static bool getStringParmOpPath(
3537 void handleStringParmOpPathDependency(
3538 int parm_index,
int vi,
3539 const char *new_fullpath,
3540 const char *old_fullpath,
const char *old_cwd );
3543 void notifyNodeDeletion();
3547 virtual void nodeDeleted(
OP_Node *op,
int propagate=1);
3549 void startCookTimer(
const OP_Context &context);
3550 void stopCookTimer(
const OP_Context &context);
3552 virtual const char *getCookTimerLabel(
const OP_Context &context)
const;
3558 void addInputError(
unsigned input_idx);
3568 virtual bool isInputConnectedInsideSubnet(
int input_idx)
const;
3569 virtual bool isNamedInputConnectedInsideSubnet(
3573 virtual void nodeUnlocked() { ; }
3576 virtual void setUniqueId(
int id);
3577 void changeOpDependentUniqueId(
int old_id,
int new_id );
3578 void changeOpReferenceUniqueId(
int old_id,
int new_id );
3579 virtual void clearUniqueId();
3581 void setAllowBuildDependencies(
int yesno )
3582 { myAllowBuildDependencies = yesno; }
3583 int allowBuildDependencies()
const
3584 {
return myAllowBuildDependencies; }
3588 void evaluateAllParms(
fpreal t);
3595 bool collapse =
false,
3596 bool check_missing =
false,
3597 bool show_missing_only=
false);
3600 const char *stringparm,
3601 int framestart,
int frameend,
3604 bool show_only_missing,
3610 virtual void getDescriptiveParmName(
UT_String &str)
const;
3615 virtual void getDescriptiveName(
UT_String &str)
const;
3618 void dirtyDescriptiveNameCache();
3621 virtual bool canDestroyNode();
3627 virtual bool cookedDataUsesAllParameters()
const
3631 virtual bool cookedDataNeedsErrors()
const
3639 virtual bool cookDataForAnyOutput()
const
3644 bool getIsRunningInCreateScript()
const;
3650 virtual void refreshRepresentativeNode(
OP_Node &changed_child);
3654 virtual void setupConnectorsAfterLoad();
3661 bool isCookedTime(
fpreal t)
const
3663 return dataMicroNodeConst()
3664 .isEqualToLastUpdateTime(t);
3669 virtual void dumpMicroNodes(
3672 int indent_level)
const;
3677 int myLastGroupMask;
3680 int myParmLastGroupMask;
3689 void deleteInput(
int idx);
3693 virtual void doDeleteInput(
int idx);
3696 void updateErrorSeverity();
3699 virtual void onInputAllocated(
OP_Input* new_input,
int index) { }
3702 void checkConnectorsConsistency();
3709 void renameInput(
OP_Input* input,
int new_id);
3711 void notifyChannelOpDependents(
PRM_Parm * in_parm,
int vecid);
3717 void updateSpareParmTemplates(
3719 bool leavedefaultsunchanged)
override;
3721 bool doDebugConsistencyCheck();
3728 OP_ERROR saveGroupMemberships(std::ostream &os,
3730 const char *path_prefix);
3734 OP_ERROR saveNetworkBox(std::ostream &os,
3736 const char *path_prefix);
3743 void saveForUndoComment();
3744 void saveForUndoDelScript();
3747 const UT_BitArray &getGroups()
const {
return myGroups; }
3756 void setInterrupted();
3758 int findAncestor(
const OP_Node *node)
const;
3759 int findDataAncestor(
const OP_Node *node)
const;
3760 void clearRecursionBit()
const;
3762 void initializeExpressions()
const;
3764 void clearOutputs();
3768 static bool getMicroNodesFromRef(
3772 static void traverseInputsAddInputs(
3776 TraverseOptions opts,
3778 bool include_parmlist);
3781 int addOpDependent(
int op_id,
3786 void updateRenameDependent(
OP_Node *dependent,
3787 const char *old_cwd,
3790 void notifyInputOpDependents(
int input_i);
3792 void getExistingOpReferencesImpl(
3793 OP_NodeList &refs,
bool include_descendants)
const;
3794 void getExistingOpDependentsImpl(
3795 OP_NodeList &deps,
bool include_descendants)
const;
3797 void buildScriptOpDependencies();
3798 void changeScriptOpRef(
const char *new_fullpath,
3799 const char *old_path,
3800 const char *old_cwd );
3801 static void changeScriptCB(
UT_String &str,
3802 const char *token_start,
3803 const char *&ch,
void *userdata );
3817 char *childpref,
int childpreflen,
3825 bool internalSetGlobalParam(
const char *
param,
3829 bool internalSetPicked(
bool on_off,
3830 bool propagate_parent_event,
3836 virtual void removeInputFromMapping(
int idx);
3837 void removeOutputFromMapping(
int idx);
3840 OP_Output *getOrCreateOutput(
int array_index,
bool create,
3843 uint32 computeCompiledHash()
const;
3847 void addDeprecationWarningsIfAny();
3850 int getConnectorNextId()
const;
3852 bool computeCompiledStatus()
const;
3854 bool isOperatorThreadSafe()
const;
3856 void internalSyncDelayedOTL();
3862 virtual bool isSelectionOwnerType()
const
3869 static void addExtraInputs(
3874 static void addExtraInput(
OP_Node &
source,
int source_pi,
int source_vi,
3875 OP_Node &target,
int target_pi,
int target_vi
3878 static bool getMicroNodesFromRef(
3882 static bool getMicroNodesFromRef(
3883 OP_Node &op,
int parm_i,
int vec_i,
3895 virtual bool isUsingCurrentFrameForVexTransformContext()
const {
return true;}
3900 exint myLastErrorVersion;
3920 EventMicroNodesPtr myEventMicroNodes;
3932 int myScriptsBlockingDelCount;
3934 int myNextIdOverride;
3935 unsigned myActiveInputIndex;
3938 int myLegacyConnectingInputIndex;
3943 unsigned int myRenameConflict : 1,
3944 myCookedForRender : 1,
3945 myModifyWaiting : 1,
3946 myBuiltExplicitly : 1,
3947 myAllowBuildDependencies : 1,
3949 myRunningCreateScript : 1,
3950 myRunningDelScript : 1,
3951 myAlreadyRunDelScript : 1,
3952 myMatchesOTLDefinition : 1,
3953 myLoadCookedDataError : 1,
3954 myBuiltHashCode : 1,
3955 myIsProxyRefNode : 1,
3956 myInhibitInputConsolidation : 1,
3962 myLocalVarActive : 1,
3964 mySyncingDelayedOTL : 1;
3966 mutable bool myRecursionFlag;
3969 static int thePropagateLevel;
4010 bool myCachedDescriptiveNameDirty;
4015 bool myLoadedNamedInputs;
4022 int myChildErrorSeverityTimestamp;
4028 static int makeUniqueId(
OP_Node *node);
4030 static bool *theCheckConnectionConsistency;
4031 static int theUniqueId;
4032 static int theUniqueSize;
4033 static OP_Node **theUniqueNodes;
4034 static bool theDoingBulkNotification;
4046 friend class OP_UndoCreate;
4047 friend class OP_UndoDelete;
4048 friend class OP_UndoInput;
4049 friend class OP_UndoSpareParm;
4050 friend class OP_UndoUserData;
4052 friend class op_MicroNodeDirtied;
4070 static inline size_t
4079 ::memcpy(buffer, s.
c_str(), len);
4091 #define CAST_INSTANTIATE(PREFIX) \
4092 inline static PREFIX##_Node *CAST_##PREFIX##NODE(OP_Node *op) \
4094 return ((op) ? (op)->castTo##PREFIX##Node() : 0); \
4097 inline static const PREFIX##_Node *CAST_##PREFIX##NODE(const OP_Node *op) \
4099 return ((op) ? (op)->castTo##PREFIX##Node() : 0); \
4125 #undef CAST_INSTANTIATE
4128 #undef INSTANTIATE_FINDNODE_FUNCTIONS
4129 #undef INSTANTIATE_CASTNODE_FUNCTIONS
4130 #undef INSTANTIATE_FOR_ALL_NODE_TYPES
4143 bool into_subnets =
false,
4144 bool through_dots =
true,
4145 int output_idx = -1)
4147 node.
getOutputNodes(*
this, into_subnets, through_dots, output_idx);
4153 using Parent::rbegin;
4156 using Parent::operator();
4157 using Parent::entries;
4172 bool into_subnets =
false,
4173 bool through_dots =
true,
4174 int output_idx = -1)
4180 const_reverse_iterator
end()
const {
return Parent::rend(); }
4189 using Parent::operator();
4190 using Parent::entries;
4204 bool isValid()
const
4225 void setId(
int id) { myId =
id; }
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
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
virtual bool setColor(const UT_Color &color)
void adoptFromString(UT_String &str)
#define CAST_INSTANTIATE(PREFIX)
OP_API void OPgetUniqueCollections(const CH_ChannelList &channels, CH_CollectionList &collections)
virtual const VOP_CodeGenerator * getVopAutoCodeGenerator() const
GT_API const UT_StringHolder filename
const PRM_Parm * myParmRef
GLuint GLsizei const GLchar * label
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__)
virtual void checkChannelDependencies(CH_Channel *, CH_CHANGE_TYPE)
int64 getMemoryUsage(bool inclusive) const
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.
GLsizei const GLfloat * value
virtual void opChanged(OP_EventType type, void *dataptr=0)=0
const UT_StringHolder myTableName
const GLuint GLenum const void * binary
UT_LockedRawPtr< OP_NodeList, OP_Lock > OP_LockedNodeList
GLsizei const GLchar *const * path
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
UT_StringMap< UT_UniquePtr< PY_OpaqueObject > > OP_PythonObjectCache
virtual fpreal getY() const =0
virtual bool getHasTakeData() const
void reverse(I begin, I end)
virtual fpreal getX() const =0
Parameters for OP_Node::getInfoText()/OP_Node::getNodeSpecificInfoText()
OP_API const UT_StringHolder OP_USERDATA_BGIMAGES
const OP_DopParent * castToOpDopParent() const
ImageBuf OIIO_API min(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
std::pair< const OP_Node *, int > opNodeOutput
virtual OP_Network * getParentNetwork() const =0
Returns the network that is our parent.
**But if you need a result
GLdouble GLdouble GLdouble q
#define OP_INVALID_NODE_ID
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
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)
PRM_ParmList * createObsoleteParmList() override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
A utility class to do read-only operations on a subset of an existing string.
const char * getFullPath(UT_String &str) const
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.
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)
PXL_API const char * getName(const ColorSpace *space)
Return the name of the color space.
void resolveAndDeleteObsoleteParmList(PRM_ParmList *&obsolete_parms) override
OP_API const UT_StringHolder OP_USERDATA_OPMENUFILE
GLint GLint GLsizei GLint GLenum format
GLsizei GLsizei GLchar * source
#define INVALID_TABLE_NAME
OP_Network * getRootCompiledParent() const
Wrapper around hboost::intrusive_ptr.
GLdouble GLdouble GLint GLint order
virtual bool triggerParmCallback(PRM_Parm *parmptr, fpreal now, int value, void *data, const UT_Options *options=0)=0
#define SYS_NO_DISCARD_RESULT
DEP_MicroNode & parmMicroNode(int parm_idx, int vi)
SYS_FORCE_INLINE const char * c_str() const
SYS_FORCE_INLINE bool isTimeDependent() const
Flag accessors.
HUSD_API bool eval(VtValue &val, T &ret_val)
#define INSTANTIATE_FINDNODE_FUNCTIONS(PREFIX)
UT_ArrayMap< OP_ConnectorId, OP_Input * > OP_ConnectorInputMap
GLuint const GLchar * name
virtual void setItemExpose(bool expose)
virtual void buildOpDependencies()
GLboolean GLboolean GLboolean b
virtual bool getItemExpose() const
UT_ArrayMap< OP_ConnectorId, OP_Output * > OP_ConnectorOutputMap
reverse_iterator rend()
End reverse iterator.
virtual OP_OpTypeId getOpTypeID() const
virtual bool changeSpareParms(UT_IStream &ds, UT_String &errors)
OP_API void OPclearNodeToChannelLinks()
GT_API const UT_StringHolder version
void doGetFullPath(UT_WorkBuffer &str) const override
Compute the full path of the node.
virtual void rebuildParmDependency(int parmidx)=0
unsigned int OP_ItemTypeMask
**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
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
SIM_API const UT_StringHolder force
virtual void addExtraInput(OP_Node *op, OP_InterestType type)
virtual bool setItemName(const UT_String &name)=0
__hostdev__ constexpr T pi()
Pi constant taken from Boost to match old behaviour.
virtual void permissionError(const char *chname=0)
LeafData & operator=(const LeafData &)=delete
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
**If you just want to fire and args
OP_API const UT_StringHolder OP_USERDATA_WIRESTYLE
static OP_Node * lookupNode(int unique_id, bool include_proxy=false)
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.
GLubyte GLubyte GLubyte GLubyte w
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)
bool operator!=(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
int operator==(const opParmData &v) const
virtual void syncNodeVersion(const char *old_version, const char *current_version, bool *node_deleted)
Safe reference to an OP node.
Options class for use with OP_Node::saveCommand()
#define DEFAULT_COMP_HASH_VALUE
bool wasInterrupted(T *i, int percent=-1)
SYS_FORCE_INLINE PRM_ParmList * getParmList()
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 SYS_NO_DISCARD_RESULT UT_UniquePtr< PRM_ParmOwnerContext > pushAsPwd() const =0
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
virtual const PRM_Parm * traverseRef(int *sub_idx, fpreal time, int parm_idx, int vec_idx) const =0
PcpNodeRef_ChildrenIterator begin(const PcpNodeRef::child_const_range &r)
Support for range-based for loops for PcpNodeRef children ranges.