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 COP2_TABLE_NAME "Cop2"
249 #define COP2NET_TABLE_NAME "CopNet"
250 #define VOP_TABLE_NAME "Vop"
251 #define VOPNET_TABLE_NAME "VopNet"
252 #define DOP_TABLE_NAME "Dop"
253 #define TOP_TABLE_NAME "Top"
254 #define TOPNET_TABLE_NAME "TopNet"
255 #define LOP_TABLE_NAME "Lop"
258 #define MGR_TABLE_NAME "Manager"
259 #define DIR_TABLE_NAME "Director"
260 #define DATA_TABLE_NAME "Data"
264 #define INVALID_SCRIPT_NAME "node"
265 #define OBJ_SCRIPT_NAME "obj"
266 #define SOP_SCRIPT_NAME "sop"
267 #define CHOPNET_SCRIPT_NAME "ch"
268 #define CHOP_SCRIPT_NAME "chop"
269 #define ROP_SCRIPT_NAME "out"
270 #define SHOP_SCRIPT_NAME "shop"
271 #define COP2_SCRIPT_NAME "cop2"
272 #define COP2NET_SCRIPT_NAME "img"
273 #define VOP_SCRIPT_NAME "vop"
274 #define VOPNET_SCRIPT_NAME "vex"
275 #define DOP_SCRIPT_NAME "dop"
276 #define TOP_SCRIPT_NAME "top"
277 #define TOPNET_SCRIPT_NAME "tasks"
278 #define LOP_SCRIPT_NAME "lop"
281 #define MGR_SCRIPT_NAME "mgr"
282 #define DIR_SCRIPT_NAME "dir"
283 #define MAT_SCRIPT_NAME "mat"
284 #define DATA_SCRIPT_NAME "data"
287 #define INVALID_OPTYPE_NAME "NODE"
288 #define OBJ_OPTYPE_NAME "OBJ"
289 #define SOP_OPTYPE_NAME "SOP"
290 #define CHOPNET_OPTYPE_NAME "CHOPNET"
291 #define CHOP_OPTYPE_NAME "CHOP"
292 #define ROP_OPTYPE_NAME "ROP"
293 #define SHOP_OPTYPE_NAME "SHOP"
294 #define COP2_OPTYPE_NAME "COP2"
295 #define COP2NET_OPTYPE_NAME "IMG"
296 #define VOP_OPTYPE_NAME "VOP"
297 #define VOPNET_OPTYPE_NAME "VOPNET"
298 #define DOP_OPTYPE_NAME "DOP"
299 #define TOP_OPTYPE_NAME "TOP"
300 #define TOPNET_OPTYPE_NAME "TOPNET"
301 #define LOP_OPTYPE_NAME "LOP"
307 #define MGR_OPTYPE_NAME "MGR"
308 #define DIR_OPTYPE_NAME "DIR"
309 #define DATA_OPTYPE_NAME "DATA"
326 #define VOP_OUTPUT_NODE_NAME "output"
327 #define VOP_SUBNET_OUTPUT_NODE_NAME "suboutput"
328 #define VOP_SUBNET_INPUT_NODE_NAME "subinput"
329 #define VOP_COLLECT_NODE_NAME "collect"
333 #define SHOP_MANAGEMENT_OPTYPE "shopnet"
334 #define COP2_MANAGEMENT_OPTYPE "cop2net"
335 #define ROP_MANAGEMENT_OPTYPE "ropnet"
336 #define CHOP_MANAGEMENT_OPTYPE "chopnet"
337 #define SOP_MANAGEMENT_OPTYPE "sopnet"
338 #define OBJ_MANAGEMENT_OPTYPE "objnet"
339 #define VOP_MANAGEMENT_OPTYPE "vopnet"
340 #define DOP_MANAGEMENT_OPTYPE "dopnet"
341 #define TOP_MANAGEMENT_OPTYPE "topnet"
342 #define LOP_MANAGEMENT_OPTYPE "lopnet"
362 (
bool values_only_ =
false
363 ,
bool defaultstoo_ =
true
364 ,
bool docreate_ =
true
365 ,
bool doparms_ =
true
366 ,
bool doflags_ =
true
367 ,
bool dowires_ =
true
368 ,
bool dowiresout_ =
true
369 ,
bool frames_ =
false
370 ,
bool dogeneral_ =
false
371 ,
bool dochblock_ =
true
372 ,
bool dospareparms_ =
true
373 ,
bool omit_version_info_ =
false
375 : values_only(values_only_)
376 , defaultstoo(defaultstoo_)
377 , docreate(docreate_)
381 , dowiresout(dowiresout_)
383 , dogeneral(dogeneral_)
384 , dochblock(dochblock_)
385 , dospareparms(dospareparms_)
386 , omit_version_info(omit_version_info_)
421 return (myValue == v.
myValue &&
447 #define INSTANTIATE_FINDNODE_FUNCTIONS(PREFIX) \
448 PREFIX##_Node *find##PREFIX##Node(const char *path) const \
452 node = findNode(path); \
453 if (node) return node->castTo##PREFIX##Node(); \
456 #define INSTANTIATE_CASTNODE_FUNCTIONS(PREFIX) \
457 PREFIX##_Node *castTo##PREFIX##Node() const \
462 { const void *this_local = this; \
463 UT_ASSERT(this_local); \
464 if (!this_local) return 0; } \
465 if (getOpTypeID() == PREFIX##_OPTYPE_ID) \
467 return (PREFIX##_Node *) this; \
473 #define INSTANTIATE_FOR_ALL_NODE_TYPES(MACRO_FUNC) \
476 MACRO_FUNC(CHOPNET) \
481 MACRO_FUNC(COP2NET) \
502 static const OP_TypeInfo *getOpInfoFromTableName(
const char *name);
503 static const OP_TypeInfo *getOpInfoFromScriptDir(
const char *dir);
508 {
return myRootCompiledParent; }
517 bool getIsContainedBy(
const OP_Node *testparent)
const;
532 virtual const char *getOpType()
const;
591 bool setDelScript(
const char *str);
595 const UT_String &getComment()
const {
return myComment; }
596 bool setComment(
const char *str);
609 bool getColorDefault()
const;
610 bool setColorDefault(
bool usedefault);
623 fpreal getX()
const override {
return myPosX; }
624 fpreal getY()
const override {
return myPosY; }
629 void pickRequest(
int shift);
633 bool allow_rel_paths =
false,
634 bool ignore_node_names_env_var =
false);
635 static bool isValidOpName(
const char *
s,
636 bool allow_rel_paths =
false,
637 bool ignore_node_names_env_var =
false)
641 ignore_node_names_env_var);
643 static bool isValidOpName(
const UT_String &str,
644 bool allow_rel_paths =
false,
645 bool ignore_node_names_env_var =
false)
647 return isValidOpName(str.
c_str(),
649 ignore_node_names_env_var);
652 static bool forceValidOpName(
UT_String &name);
657 int findString(
const char *str,
bool fullword,
658 bool usewildcards)
const override;
660 bool fullword)
override;
667 bool notifyVarChange(
672 virtual int getNchildren()
const;
673 virtual OP_Node *getChild(
const char *name,
int *hint=0)
const;
676 bool include_hidden=
false)
const;
679 const char *optype=0,
680 int casesensitive = 0)
const;
683 const char *optype=0,
684 int casesensitive = 0)
const;
695 virtual void getPotentialChildErrorNodes(
OP_NodeList &nodes)
const;
698 static OP_Node *lookupNode(
int unique_id,
bool include_proxy=
false)
700 if( unique_id >= 0 && unique_id <= theUniqueId
701 && theUniqueNodes[unique_id] )
703 if( include_proxy || !theUniqueNodes[unique_id]
705 return theUniqueNodes[unique_id];
709 static int getNumUniqueIds()
710 {
return theUniqueId + 1; }
714 int getUniqueId()
const
715 {
return myUniqueId; }
717 {
return myUniqueId; }
722 bool expandGroupPattern(
const char *
pattern,
724 bool expandToFullPaths =
false);
728 bool patternContainsBundle(
const char *
pattern,
730 bool patternContainsGroup(
const char *
pattern,
733 virtual int isManager()
const;
737 virtual int isManagementNode()
const;
742 bool isEffectivelyAManagementNode()
const;
745 virtual bool isMaterialManager()
const;
755 virtual int isSubNetwork(
bool includemanagementops)
const;
756 virtual int isNetwork()
const;
757 virtual int isInSubNetwork()
const;
759 bool isProxyRefNode()
const
760 {
return myIsProxyRefNode; }
761 void setProxyRefNode(
bool f)
762 { myIsProxyRefNode =
f; }
765 virtual bool isOutputNode()
const;
767 virtual int whichOutputNode()
const;
772 int isNetworkWithKids()
const;
774 virtual int isVex()
const;
780 OP_Bundle * getParmBundle(
const char* parm_name,
int vector_index,
783 void markBundleRefsAsUnused();
784 void cleanUnusedBundleRefs();
785 void cleanAllBundleRefs();
787 static void getValueAsBundlePaths(
fpreal t,
792 static void getValueAsBundlePaths(
fpreal t,
803 virtual bool bundleChanged(
const OP_Bundle *bundle);
806 void touchBundleParm(
const char *name);
807 void touchBundleParm(
int parm_index);
810 virtual int getDandROpsEqual() {
return 1; }
813 virtual int updateDandROpsEqual(
int = 1) {
return 1; }
819 bool isInputAncestor(
const OP_Node *parent,
820 bool check_extra=
true)
const;
825 bool isParentAncestor(
const OP_Node *parent)
const;
838 virtual void getNodeSpecificInfoText(
OP_Context &context,
848 OP_Node *findNode(
const char *
path, OTLSyncMode syncmode = OTLSYNC_DOSYNC)
const;
860 virtual OP_PostIt *findPostItNote(
const char *const_path)
862 virtual OP_Dot *findDot(
const char *const_path)
876 SOP_Node *getSOPNode(
const char *
path,
int addextra = 0,
877 bool *got_by_flag=
nullptr)
const;
880 COP2_Node *getCOP2Node(
const char *
path,
int addextra = 0)
const;
884 DOP_Node *getDOPNode(
const char *
path,
int addextra = 0)
const;
885 ROP_Node *getROPNode(
const char *
path,
int addextra = 0)
const;
888 bool *got_by_flag=
nullptr)
const;
890 TOP_Node *getTOPNode(
const char *
path,
int addextra = 0)
const;
892 LOP_Node *getLOPNode(
const char *
path,
int addextra = 0)
const;
899 virtual void getPathWithSubnet(
UT_String &str)
const;
907 void completePath(
const char *prefixpath,
910 virtual CH_Channel *getTrackChannel(
const char *name);
913 const char *trackname,
927 void globNodes(
const char *pat,
UT_String *expand,
930 const char *prefix =
" ");
933 void globChannels(
const char *,
UT_String &expand,
935 const char *prefix =
" ")
const;
937 void globChannels(
const char *
pattern,
946 void globChanRefs(
const char *
pattern,
950 bool use_multi_match =
true);
967 void globNodeChannels(
const char *
pattern,
970 int *parm_start =
nullptr,
979 void globNodeChanRefs(
const char *
pattern,
982 int *parm_start =
nullptr,
985 bool use_multi_match =
true
991 virtual void globNetworkBoxes(
const char *pat,
UT_String *expand,
994 const char *prefix =
" ");
996 virtual void globPostIts(
const char *pat,
UT_String *expand,
999 const char *prefix =
" ");
1010 virtual bool opShouldHandleChange(
OP_EventType reason);
1015 virtual void referencedParmChanged(
int pi);
1021 virtual void forceRecook(
bool evensmartcache =
true);
1027 virtual void reloadExternalFiles();
1033 virtual unsigned needToCook(
OP_Context &context,
bool queryonly=
false);
1046 static bool parallelCook(
OP_Context &context,
1057 template <
typename F>
1058 void cookLockedExecute(
const F &functor);
1065 const UT_TaskState & taskState()
const {
return myTaskState; }
1072 void bumpVersionParm()
1074 dataMicroNode().bumpModVersion();
1075 if (hasIndepParmListMicroNode())
1076 parmListMicroNode().bumpModVersion();
1078 int cookParmsModified()
const
1079 {
return parmListMicroNodeConst()
1080 .isModVersionOutdated(); }
1087 virtual int getDataClass()
const;
1096 virtual OP_DataType getCookedDataType()
const = 0;
1098 virtual void deleteCookedData() = 0;
1100 virtual int saveCookedData(std::ostream &os,
OP_Context &,
1112 virtual int getRelativeCaptureTransform(
OP_Node &to,
1115 virtual int getRelativeCaptureTransform(
OP_Node &to,
1126 TRANSFORM_PRECONSTRAINT,
1127 TRANSFORM_PARENTBONE,
1130 TRANSFORM_PRERAWPARM,
1143 bool ok = getWorldTransform(m, ctx);
1150 bool ok = getIWorldTransform(m, ctx);
1157 bool ok = getTransform(mode, m, ctx);
1164 void addTransformError(
const OP_Node &node,
1165 const char *
label=0)
const;
1173 virtual const char *getInternalOpTable()
const
1178 virtual const char *inputLabel(
unsigned idx)
const;
1179 virtual const char *outputLabel(
unsigned idx)
const;
1184 const char *inputLabelNum(
unsigned idx)
const;
1185 const char *outputLabelNum(
unsigned idx)
const;
1189 virtual const char *inputConnectorLabel(
unsigned idx);
1192 virtual int isRefInput(
unsigned idx)
const;
1196 virtual int getAuxInput()
const;
1210 bool getLock()
const {
return flags().isLocked(); }
1212 bool getSoftLock()
const {
return flags().getSoftLocked();}
1213 void setSoftLock(
bool on_off)
1219 bool getHardLock()
const {
return flags().getHardLocked();}
1220 void setHardLock(
bool on_off)
1228 virtual OP_LockTypes setModelLock(OP_LockTypes state,
1229 void *modeler =
nullptr,
1230 bool allow_softlock_promotion =
false,
1238 int getNetworkLock(
bool relaxedlockcheck =
false,
1239 const OP_Node *inputNode=
nullptr)
const;
1244 bool setUnload(
bool on_off);
1245 bool getUnload()
const;
1248 virtual bool isLoaded()
const {
return true; }
1253 virtual bool unloadData();
1256 void takeActivateFlag(
uchar flag,
bool enable=
true,
1257 bool send_flag_event=
true);
1258 void takeDeactivateFlag(
uchar flag)
1259 { takeActivateFlag(flag,
false); }
1260 bool takeIsActiveFlag(
uchar flag)
const;
1261 void setHasTakeData(
bool onoff);
1263 bool canAccessFlag(
unsigned mask,
uchar flag)
const;
1271 bool propagate_parent_event =
true)
override;
1277 bool setEditPicked(
bool on_off,
1278 bool propagate_parent_event =
true);
1283 void setAutoscope(
bool on_off) { myAutoscope = on_off; }
1284 bool isAutoscope() {
return myAutoscope; }
1286 bool setCurrent(
bool on_off);
1287 bool setExpose(
bool on_off);
1288 bool setBypass(
bool on_off);
1289 bool setTemplate(
bool on_off);
1290 bool setFootprint(
bool on_off);
1291 bool setXray(
bool on_off);
1292 bool setDisplay(
bool on_off);
1293 bool setRender(
bool on_off);
1294 bool setHighlight(
bool on_off);
1295 bool setModified(
bool on_off);
1296 bool setSaveBypass(
bool on_off);
1297 bool setSaveData(
bool on_off);
1299 virtual bool setPickable(
bool on_off)
1301 virtual bool setAudio(
bool on_off)
1303 virtual bool setExport(
bool on_off)
1305 virtual bool setDebug(
bool on_off)
1307 virtual bool setDisplayOrigin(
bool on_off_unchanged)
1313 void userSetTemplate(
bool onoff);
1318 void userSetSelectableTemplate(
bool onoff);
1322 virtual void setFlag(
char tag,
int8 val);
1323 virtual int8 getFlag(
char tag)
const;
1326 {
return flags().getPicked(); }
1327 virtual bool getEditPicked()
const
1329 bool getCurrent()
const;
1330 bool getDisplay()
const {
return flags().getDisplay(); }
1331 bool getRender()
const {
return flags().getRender(); }
1332 bool getHighlight()
const {
return flags().getHighlight();}
1333 bool getBypass()
const {
return flags().getBypass(); }
1334 bool getTemplate()
const {
return flags().getTemplate(); }
1335 bool getFootprint()
const {
return flags().getFootprint(); }
1336 bool getXray()
const {
return flags().getXray(); }
1337 bool getExpose()
const {
return flags().getExpose(); }
1338 bool getModified()
const {
return flags().getModified(); }
1339 bool getSaveBypass()
const{
return flags().getSaveBypass(); }
1340 bool getSaveData()
const {
return flags().getSaveData(); }
1342 {
return flags().getHasTakeData(); }
1343 virtual bool getPickable()
1345 virtual bool getAudio()
const
1347 virtual bool getExport()
const
1349 virtual bool getDebug()
const
1351 virtual bool getDisplayOrigin()
const
1354 {
return getExpose(); }
1356 { setExpose(expose); }
1359 bool getDisplayDescriptiveName()
const
1360 {
return flags().getDisplayDescriptiveName();}
1361 bool setDisplayDescriptiveName(
bool state);
1362 bool getDisplayComment()
const
1364 bool setDisplayComment(
bool state);
1365 int8 getOutputForView()
const
1366 {
return flags().getOutputForView(); }
1367 int8 setOutputForView(
int8 output);
1369 OP_Node *getPickableSelfOrParent();
1374 bool setCompress(
bool on_off);
1375 bool getCompress()
const;
1379 void setCurrentAndPicked();
1387 virtual bool setVisible(
bool onoff);
1388 virtual bool getVisible()
const;
1395 virtual void getSaveFlagsString(
UT_String &cmd,
1397 bool save_to_hip)
const;
1398 virtual void getPreParmSaveFlagsString(
UT_String &cmd )
const;
1399 virtual void getPostParmSaveFlagsString(
UT_String &cmd )
const;
1404 {
return myEventValue.hasOpInterest(data, m); }
1409 { myEventValue.addOpInterest(data, m); }
1413 { myEventValue.removeOpInterest(data, m); }
1415 int isBeingDeleted()
const
1416 {
return myBeingDeleted; }
1417 void setNodeBeingDeleted(
int beingdeleted);
1421 bool setInhibitInputConsolidation(
bool value);
1434 virtual unsigned minInputs()
const;
1437 virtual unsigned maxInputs()
const;
1441 virtual unsigned getNumVisibleInputs()
const;
1451 virtual unsigned orderedInputs()
const;
1455 virtual unsigned maxOutputs()
const;
1459 virtual unsigned getNumVisibleOutputs()
const;
1462 bool hasUnorderedInputs()
const;
1472 virtual unsigned nInputs()
const;
1479 unsigned nConnectedInputs(
bool check_subnet_inside=
true)
const;
1481 unsigned getActiveInputIndex()
const
1482 {
return myActiveInputIndex; }
1483 void setActiveInputIndex(
unsigned idx);
1492 OP_Node *getInputFollowingOutputs(
int input,
1497 int getConnectedInputIndex(
int startAt = -1)
const;
1500 int getNthConnectedInput(
int n)
const;
1504 virtual void getParallelInputs(
OP_Context &context,
1508 void forceClearInput(
int idx);
1512 unsigned outputIdx = 0);
1515 virtual OP_ERROR setIndirectInput(
unsigned idx,
1519 virtual OP_ERROR setInputReference(
unsigned idx,
const char *
label,
1520 int keeppos,
unsigned outputIdx = 0);
1524 int whichInputIs(
const OP_Node *who)
const;
1537 int whichOutputIs(
const OP_Node* target_node,
1538 int input_on_target_node)
const;
1543 int whichOutputIsFollowingIndirect(
1545 int input_on_target_node)
const;
1550 int whichInputIs(
const OP_Node* source_node,
1554 void consolidateInputs();
1555 virtual void clearUnreferencedInputs();
1556 virtual bool allowConsolidatingInput(
int idx);
1562 virtual OP_Input *getInputReference(
unsigned idx,
bool grow);
1566 virtual OP_Input *getInputReferenceConst(
unsigned idx)
const;
1568 virtual int doDeleteRewire()
const {
return 1; }
1572 virtual void moveInput(
int srcidx,
int dstidx,
1573 bool forcesubnet =
false);
1575 unsigned outputIdx);
1576 OP_ERROR insertIndirectInput(
unsigned idx,
1581 virtual UT_Options getInputDataDefault(
int idx)
const
1586 virtual int getInputEditorInputs();
1588 virtual bool allowInputEditorInputParm();
1590 virtual bool allowInputEditorInputDelete();
1593 virtual bool getInputEditorInputLabel(
UT_String &
label,
int idx);
1596 dataMicroNodeConst()
const
1597 {
return myDataMicroNode; }
1601 dataMicroNodeConst());
1607 parmListMicroNodeConst()
const
1608 {
return dataMicroNodeConst(); }
1612 parmListMicroNodeConst());
1615 bool hasIndepParmListMicroNode()
const
1617 return (&parmListMicroNodeConst()
1618 != &dataMicroNodeConst());
1622 {
return myFlagMicroNode; }
1637 if (!myEventMicroNodes)
1639 return bool(myEventMicroNodes[e]);
1645 virtual void getOwnedMicroNodes(
1650 void propagateDirtyMicroNode(
1654 bool send_root_event);
1663 void addExtraInput(
OP_Node &op,
int parm_i,
int vec_i);
1683 static void addExtraInputToEvalChannel(
1687 addExtraInputToEvalChannel(
1691 static void addExtraInputToEvalChannel(
1693 OP_Node &op,
int parm_i,
int vec_i)
1695 addExtraInputToEvalChannel(
1699 static void addExtraInputToEvalChannel(
1704 target = getEvalChannelMicroNode(thread);
1708 static void addExtraInputToEvalChannel(
1713 target = getEvalChannelMicroNode(thread);
1723 static void addExtraInput(
1726 static void addExtraInput(
1729 static void addExtraInput(
1734 static void addMultiparmInterests(
const OP_InterestRef &target_ref,
1741 void getExtraInputNodes(
1743 bool remove_duplicates =
true,
1744 bool data_interest =
true,
1745 bool parm_interest =
true,
1746 bool flag_interest =
true,
1747 bool include_parmlist =
true,
1748 bool follow_simulation_inputs =
false)
const;
1749 void getExtraOutputNodes(
1751 bool remove_duplicates =
true,
1752 bool data_interest =
true,
1753 bool parm_interest =
true,
1754 bool flag_interest =
true)
const;
1756 int getNumExtraInputs()
const;
1758 void dumpExtraInputs(
1761 int indent_level = 0)
const;
1765 static void addExprOpDependency(
const char *arg_str,
1768 static void addExprOpDependency1From2(
const char *arg_str1,
1769 const char *arg_str2,
1772 static void addExprOpParmDependency(
const char *arg_str,
1776 static void changeExprOpRef(
const char *arg_str,
1778 const char *new_fullpath,
1779 const char *old_fullpath,
1780 const char *old_cwd);
1782 static void changeExprOpRef1From2(
const char *arg_str1,
1783 const char *arg_str2,
1786 const char *new_fullpath,
1787 const char *old_fullpath,
1788 const char *old_cwd);
1790 static void changeExprOpParmRef(
const char *arg_str,
1792 const char *new_fullpath,
1793 const char *old_fullpath,
1794 const char *old_cwd,
1795 const char *chan_name,
1796 const char *old_chan_name);
1798 void addGenericOpNameReference(
const UT_String &oppath );
1799 void addGenericOpNameReference(
const PRM_RefId &ref_id,
1801 void addGenericOpInputReference(
const PRM_RefId &ref_id,
1804 static void moveAndUpdateDependencies(
1810 bool getParmBaseNodePath(
1823 void decrementOpReference(
int node_id);
1825 virtual void dumpDependencies(std::ostream &os);
1826 void dumpOpDependents(
OP_Node *
ref,
int brief,
1829 &getOpDependents()
const {
return myOpDependents; }
1833 int countReferences(
int op_id);
1838 bool recurse)
const;
1845 bool include_descendants)
const;
1850 bool include_descendants)
const;
1857 bool include_descendants)
const;
1860 void getParmsThatReference(
const char *channame,
1864 virtual void inputConnectChanged(
int which);
1868 unsigned nOutputEntries()
const;
1872 int nOutputItems(
int output_idx = -1)
const;
1875 bool hasAnyOutputNodes(
bool through_dots =
true,
1876 int output_idx = -1)
const;
1881 bool into_subnets =
false,
1882 bool through_dots =
true,
1883 int output_idx = -1)
const;
1886 OP_Node *getFirstOutputNode(
bool through_dots =
true,
1887 int output_idx = -1)
const;
1902 virtual void fillInfoTreeNodeSpecific(
UT_InfoTree &tree,
1908 virtual bool fillInfoTreeChildSpecific(
UT_InfoTree &tree,
1927 virtual void unlockInput(
unsigned idx);
1929 virtual void unlockInputs();
1934 int getCookCount()
const {
return myCookCount; }
1935 void triggerOutputChanged();
1937 void triggerUIChanged(
1941 virtual int cookedInputIndex()
const {
return -1; }
1956 virtual OP_Node *getPassThroughNode(
1958 bool mark_used =
false);
1960 bool setMinimumCacheSize(
int min_size);
1963 {
return dataMicroNodeConst().modVersion(); }
1967 virtual bool handleTimeChange(
fpreal ) {
return false; }
1971 bool isTimeDependent(
const OP_Context &context);
1975 virtual bool isDiveable()
const;
1994 virtual void getExtraNodesForCopyOrDelete(
OP_NodeList &extras)
const;
2000 virtual bool runCreateScript();
2003 void updateParmsToMatchCurrentUnits();
2007 bool getDelaySyncOTL()
const
2008 {
return myDelaySyncOTL; }
2011 void setDelaySyncOTL(
bool isdelayed);
2014 bool shouldDelaySyncOTL()
const;
2017 void syncDelayedOTL()
2019 if (!getDelaySyncOTL())
return;
2020 internalSyncDelayedOTL();
2025 virtual void matchOTLDefinition();
2028 virtual void unmatchOTLDefinition();
2032 virtual void handleOTLIndexFileCleared();
2037 {
return mySyncErrors; }
2040 {
return mySyncErrorLevel; }
2046 bool isAnyAncestorBeingSynced()
const;
2049 int getMatchesOTLDefinition()
const;
2052 static void propagateMatchOTLDefinitionToAncestors(
OP_Node *node,
2057 int getCanDeviateFromOTLDefinition()
const;
2058 void setAllChildAssetPermissions(
int permission);
2061 void computeAllChildAssetPermissions();
2064 bool getIsEditableAssetSubNode()
const;
2067 void turnOffAllChildExports();
2070 bool haveLicenseToAccessContents(
2071 OP_Node* opt_specific_child =
nullptr)
const;
2072 bool haveLicenseToAccessParentContents()
const;
2073 bool haveAncestorWithoutFullLicense(
bool ignore_self)
const;
2076 OP_Node *getFirstExecLicenseOnlyAncestor(
2077 bool ignore_self =
true)
const;
2079 OP_Node *getLastExecLicenseOnlyAncestor(
2080 bool ignore_self =
true)
const;
2082 bool isCompiled()
const;
2085 void saveWires(std::ostream &os,
const char *name,
2087 void saveOutputWires(std::ostream &os,
const char *name,
2089 virtual void saveIntrinsicCommand(std::ostream &os,
2093 virtual OP_ERROR saveCommand(std::ostream &os,
2097 const char *netboxname,
2114 void saveParameterFlags(std::ostream &os,
const char *name,
2115 const char *command,
2116 bool (
PRM_Parm::*flag_method)(
int)
const,
2117 bool defaultstoo,
bool reverse,
2120 void saveUserDataCommand(
2121 std::ostream &os,
const char *node_name,
2122 bool omit_version =
false);
2130 virtual RampError rampCommand(
bool remove,
fpreal pos,
float rgba[4]);
2131 RampError rampCommand(
bool remove,
fpreal pos,
float rgba[4],
2137 const char *
path=0);
2139 const char *name = 0,
int command = 0);
2150 {
return myUserData; }
2152 OP_ERROR saveUserData(std::ostream &os,
const char *
path);
2153 void clearUserData(
bool save_undo);
2157 static const char *internalUserDataPrefix() {
return "sidefx::"; }
2168 template<
typename T>
2181 bool hasBlindData(
const char *key)
const;
2185 bool deleteBlindData(
const char *key);
2192 OP_ERROR saveDataBlocksPacket(std::ostream &os,
2193 const char *path_prefix,
2196 bool clearDataBlocks();
2202 virtual int deleteNodeData(
void *);
2203 void propagateNodeDataDeleted();
2210 void setCachedPythonObject(
2213 bool deleteCachedPythonObject(
const UT_StringRef &key);
2214 void clearCachedPythonObjects();
2218 {
return myCachedPythonObjects; }
2222 void saveOverrides(std::ostream &os);
2223 void saveOverrides(std::ostream &os,
OP_Node *root,
2226 void saveChildOverrides(std::ostream &os,
OP_Node *root,
2232 const char *parm_name,
2233 int vec_idx)
override;
2235 int vec_idx)
const override;
2238 virtual void removeOverrideDestination(
OP_Node * ) {}
2239 virtual void removeOverrideDestination(
OP_Node * ,
2245 std::ostream *err)
const override;
2256 void addPythonNodeError(
const PY_Result &py_result);
2258 void saveInputs(std::ostream &os,
bool compile_basic);
2260 bool named =
false);
2261 void saveNamedInputs(std::ostream &os,
bool compile_basic);
2262 void saveNamedOutputs(std::ostream &os);
2267 void getEditableInputDataKeys(
int idx,
2271 bool setEditableInputData(
int idx,
2274 void saveEditableInputData(std::ostream &os)
const;
2281 bool setEditableInputString(
int idx,
2296 virtual void saveDialogScriptExtraInfo(std::ostream &os);
2312 int &op_id,
fpreal &op_time,
2314 static int findOpFramePair(
const char *
path,
int &op_id,
2318 static void buildXformOrder(
int trs,
int xyz,
2321 static const UT_XformOrder& buildXformOrder(
int trs,
int xyz );
2344 fpreal pivot_rz,
bool inverse =
false);
2352 fpreal pivot_rz,
bool inverse =
false);
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 px,
float py,
float pz,
2360 static void buildXform(
int trs,
int xyz,
2361 double tx,
double ty,
double tz,
2362 double rx,
double ry,
double rz,
2363 double sx,
double sy,
double sz,
2364 double px,
double py,
double pz,
2366 static void buildXform(
int trs,
int xyz,
2367 float tx,
float ty,
float tz,
2368 float rx,
float ry,
float rz,
2369 float sx,
float sy,
float sz,
2372 static void buildXform(
int trs,
int xyz,
2373 double tx,
double ty,
double tz,
2374 double rx,
double ry,
double rz,
2375 double sx,
double sy,
double sz,
2378 static void buildXform(
int trs,
int xyz,
2379 float tx,
float ty,
float tz,
2380 float rx,
float ry,
float rz,
2381 float sx,
float sy,
float sz,
2382 float s_xy,
float s_xz,
float s_yz,
2383 float px,
float py,
float pz,
2385 static void buildXform(
int trs,
int xyz,
2386 double tx,
double ty,
double tz,
2387 double rx,
double ry,
double rz,
2388 double sx,
double sy,
double sz,
2389 double s_xy,
double s_xz,
double s_yz,
2390 double px,
double py,
double pz,
2392 static void buildXform(
int trs,
int xyz,
2393 float tx,
float ty,
float tz,
2394 float rx,
float ry,
float rz,
2395 float sx,
float sy,
float sz,
2396 float s_xy,
float s_xz,
float s_yz,
2399 static void buildXform(
int trs,
int xyz,
2400 double tx,
double ty,
double tz,
2401 double rx,
double ry,
double rz,
2402 double sx,
double sy,
double sz,
2403 double s_xy,
double s_xz,
double s_yz,
2406 static void buildXform(
2407 const UT_Matrix4F::FullTransformModel &parms,
2409 static void buildXform(
2410 const UT_Matrix4D::FullTransformModel &parms,
2412 static void buildXform(
int trs,
2413 float tx,
float ty,
float rz,
2414 float sx,
float sy,
float px,
float py,
2416 static void buildXform(
int trs,
2417 double tx,
double ty,
double rz,
2418 double sx,
double sy,
double px,
double py,
2420 static void buildXform(
int trs,
2421 float tx,
float ty,
float rz,
2422 float sx,
float sy,
float s_xy,
2425 static void buildXform(
int trs,
2426 double tx,
double ty,
double rz,
2427 double sx,
double sy,
double s_xy,
2428 double px,
double py,
2431 virtual int getTranslateParmIndex();
2435 void resolveInputReferences();
2437 static void clearAllPendingUndoFlags();
2441 void saveForUndoInput();
2452 void blockModify(
int on_off,
int propagate = 1);
2454 int isBlockModify()
const;
2455 bool isModifyWaiting()
const;
2456 virtual void propagateEndBlockModify();
2466 void getCookInfo(
UT_String &info)
const;
2476 virtual int isCookingRender()
const {
return 0; }
2477 virtual void setCookingRender(
int val);
2479 virtual void clearInterrupted()
2480 { clearInterruptedImpl(
true); }
2482 {
return flags().getInterrupted(); }
2487 void setRenameConflict()
2488 { myRenameConflict = 1; }
2489 void setRunningCreateScript(
int onoff);
2495 virtual void getInputRes(
int input,
fpreal t,
2502 int group_mask = 1);
2504 virtual int getNumInputsToHash();
2505 virtual OP_Node *getInputToHash(
int i);
2507 void clearHashCodeFlags();
2508 bool isHashCodeBuilt()
const {
return myBuiltHashCode;}
2509 void builtHashCode(
bool b =
true) { myBuiltHashCode =
b; }
2516 void setCreatorState(
const char *s)
2517 { myCreatorState.harden(s); }
2518 const UT_String &getCreatorState()
const {
return myCreatorState; }
2519 void builtExplicitly(
int yn) { myBuiltExplicitly = yn; }
2520 int wasBuiltExplicitly()
const{
return myBuiltExplicitly; }
2522 bool matchesState(
const char *state)
const;
2530 virtual void changeParmTemplate(
PRM_Template *new_template);
2533 virtual void ensureInputsAndOutputsAreValid();
2537 void connectToInputNode(
OP_Node &inputnode,
int input_idx,
2553 static void buildQuadricXform(
UT_Matrix4 &mat,
2554 float tx,
float ty,
float tz,
2555 float sx,
float sy,
float sz,
2557 float rx = 0.0
f,
float ry = 0.0
f,
2561 double tx,
double ty,
double tz,
2562 double sx,
double sy,
double sz,
2564 double rx = 0.0,
double ry = 0.0,
2568 int theMenuSize,
int (*doAdd)(
OP_Node *) = 0,
2569 int startItem = 0,
const PRM_Parm *parm = 0,
2570 int showSubnets = 1,
int expandSubnets = 1,
2571 bool recurse =
false);
2576 static void buildPreDefRulesMenu(
PRM_Name *menu,
2588 static int getNameSerialIndex();
2591 virtual void setMapping(
int idx,
int type,
const char *
label = 0);
2592 virtual int getMapping(
int idx,
const char *&
label)
const;
2600 bool hasComment()
const;
2601 bool hasParmsNotAtFactoryDefault()
const;
2602 bool hasAnimatedParms()
const;
2603 bool hasChopOverriddenParms()
const;
2633 TRAVERSE_DEFAULT = 0x0000,
2634 TRAVERSE_INTO_SUBNETS = 0x0001,
2635 TRAVERSE_REF_INPUTS = 0x0002,
2636 TRAVERSE_ONLY_USED_INPUTS = 0x0004,
2637 TRAVERSE_PASSTHROUGH_INPUTS = 0x0008,
2638 TRAVERSE_EXTRA_INPUTS = 0x0010,
2639 TRAVERSE_SIMULATION_INPUTS = 0x0020,
2640 TRAVERSE_COOKED_INPUT_INDEX_INPUTS = 0x0040,
2642 bool traverseInputs(
bool (*callback)(
OP_Node &,
void *),
2644 TraverseOptions opts,
2647 bool traverseInputs(
bool (*callback)(
const OP_Node &,
void*),
2649 TraverseOptions opts,
2661 bool traverseChildren(
bool (*callback)(
OP_Node &,
void*),
2663 bool recurse_into_subnets);
2667 bool isCooking(
bool include_ancestors)
const;
2671 virtual bool usesFootprint()
const {
return false; }
2675 bool from_children_too =
true,
2676 bool collapse =
false,
2677 bool check_missing =
false,
2678 bool show_missing_only =
false);
2679 virtual bool getSaveWithVopnets();
2680 virtual void runDelScript();
2683 virtual void preDelete() { }
2687 virtual DOP_Parent *castToDOPParent() {
return 0; }
2688 virtual const DOP_Parent *castToDOPParent()
const {
return 0; }
2702 *getVopAutoCodeGenerator()
const{
return 0; }
2705 virtual void buildVopCodeGenerator() {}
2713 bool create_if_needed=
false)
2723 virtual int beginVopCodeGeneratorUpdate() {
return 0; }
2724 virtual void endVopCodeGeneratorUpdate(
int update_level) {}
2734 int end_parm = INT_MAX,
2735 bool use_parmvop_tag=
true
2737 int buildVexCommandWithDependencies(
OP_Node *owner,
2743 int end_parm = INT_MAX,
2744 bool use_parmvop_tag=
true
2755 static PRM_Name theVexClearParmName;
2766 virtual bool hasVexShaderParameter(
const char *parm_name);
2776 virtual bool getScriptMaterialInfo(
UT_String & mat_info,
2784 virtual const char *getHDASubType()
2789 bool setChannelAlias(
PRM_Parm &parm,
int subindex,
2790 const char *alias_name);
2792 void disconnectAllInputsOutputs(
bool keepSelected,
2793 bool forceDisconnectOutputs =
false);
2795 void disconnectAllInputs();
2796 void disconnectAllOutputs();
2799 virtual void notifyParmRenameDependents(
2803 void writeChannel(
CH_Channel *channel, std::ostream &os,
2804 const char *name,
bool frames);
2805 void writeAllChannels(std::ostream &os,
const char *name,
2806 bool frames,
bool dochblock,
2817 const UT_Options *options =
nullptr)
override;
2820 int64 getExtraInputMemoryUsage()
const;
2821 static void printOpMemoryUsageStats(std::ostream &os);
2826 virtual void unscopeChannels(
bool recurse);
2831 virtual void undisplayChannels(
bool recurse);
2836 virtual void unpinChannels(
bool recurse);
2841 virtual void setChannelScope(
const char *
pattern,
2870 bool relative_references =
true)
override;
2872 void clearVersionUserData();
2873 void updateVersionUserData();
2883 void syncNodeVersionIfNeeded(
2885 const char *from_version =
nullptr,
2886 bool update_node_version =
false);
2892 const char *old_version,
2893 const char *current_version,
2894 bool *node_deleted)
override;
2902 bool setGlobalFloatParam(
const char *
param,
2905 bool setGlobalStringParam(
const char *
param,
2906 const char *strvalue,
2911 void beginPropagateModification();
2912 void endPropagateModification();
2915 virtual void getActiveOperatorsDefinedByOTL(
2922 static bool getDoingBulkNotification();
2923 static bool isDirectorDoingBulkNotification();
2928 virtual bool hasDifferentMultiInputs()
const;
2931 virtual bool canCreateNewOpType()
const;
2932 static bool createNewOpType
2935 const char *typeName=
nullptr,
2936 const char *typeLabel=
nullptr,
2937 const char *otlFile=
nullptr,
2938 const char *metaSource=
nullptr,
2939 const char *comment=
nullptr,
2941 const char *newName=
nullptr,
2942 int minimumInputs=-1,
2943 int maximumInputs=-1,
2944 bool ignore_external_references=
false,
2945 bool compress_contents=
false,
2947 int *newNodeId=
nullptr,
2948 bool compile_contents =
false,
2949 bool change_node_type =
true,
2950 bool create_backup =
true);
2953 virtual void setMaterialIconFilename(
const char * ) {}
2955 virtual bool getMaterialIconAllowRegenerateFlag() {
return true; }
2956 virtual void setMaterialIconAllowRegenerateFlag(
bool) {}
2963 static void startBulkNotifications(
2966 static void endBulkNotifications(
2973 virtual bool willAutoconvertInputType(
int input_idx);
2979 virtual bool getIsInputVisibleDefault(
int idx);
2983 bool verifyTemplatesWithParameters()
const;
2988 OP_Input *getNamedInputReferenceConst(
2992 bool mark_used=
false)
const;
2996 virtual int getInputFromName(
const UT_String &in)
const;
2997 virtual int getOutputFromName(
const UT_String &out)
const;
2998 virtual void getInputName(
UT_String &in,
int idx)
const;
2999 virtual void getOutputName(
UT_String &out,
int idx)
const;
3003 int getInputFromUniqueName(
3005 int getOutputFromUniqueName(
3010 void getUniqueInputName(
3012 bool getUniqueInputNameConst(
3016 bool getUniqueOutputNameConst(
3024 virtual OP_ERROR setNamedIndirectInput(
3027 virtual OP_ERROR setNamedInputReference(
3029 const char *
label,
int,
3040 virtual void onCreated() { }
3042 virtual bool isOrderedInput(
const OP_ConnectorId& input_name)
const;
3050 virtual bool willAutoconvertNamedInputType(
3059 unsigned getInputsArraySize()
3060 {
return myInputs.entries(); }
3063 {
return (getInputsArraySize() > idx) ? 1 : 0; }
3071 bool setLocalVarActive(
bool f)
3073 bool old = myLocalVarActive;
3074 myLocalVarActive =
f;
3079 bool isLocalVarActive()
const
3080 {
return myLocalVarActive; }
3087 void recomputeCompiledHash();
3091 void clearCompiledHash()
3097 { sendEvent(type,
data); }
3099 virtual bool scopedChannelsDirty();
3103 virtual bool getActiveLayerContribution(
const UT_String &track_name,
3109 virtual bool resolveExport(
const PRM_Parm* p,
int subindex,
3115 virtual bool addOrMoveVisualizerToOutput(
int outputidx)
3122 int vec_idx)
const override;
3124 OP_Bundle * getParmBundle(
const char* parm_name,
int vector_index,
3126 const char *
filter,
bool subnet_inclusion);
3130 static const UT_Color &getGlobalDefaultColor();
3136 static fpreal getFlagWidth();
3138 static fpreal getNodeHeight();
3141 static fpreal getNodeButtonWidth();
3143 static fpreal getConnectorHeight();
3150 static bool canDestroyNodes(
OP_Network *src_net,
3164 virtual void getDefaultState(
UT_String &default_state_name);
3184 void clearInputContextOptionDepIfSafe(
3189 virtual bool hasTransformTracks()
const {
return false; }
3211 void resolveUnresolvedLoadedInputs();
3215 void finishedLoadingParentNetwork();
3219 static void bumpNameSerialIndex();
3223 void beginScriptBlockingDel()
3224 { myScriptsBlockingDelCount += 1; }
3225 void endScriptBlockingDel()
3226 { myScriptsBlockingDelCount -= 1; }
3229 void setLegacyConnectingInputIndex(
int index)
3230 { myLegacyConnectingInputIndex =
index; }
3234 virtual void clearAndDestroy();
3237 virtual void clearCache();
3239 void clearInterruptedImpl(
bool allow_recook);
3254 virtual void doOverridePreCook() { }
3255 virtual void doOverridePostCook() { }
3260 int getSourceCount()
const;
3261 virtual int bumpSourceCount(
int d);
3268 virtual OP_ERROR saveIntrinsic(std::ostream &os,
3271 const char *path_prefix =
"",
3273 OP_ERROR saveUserDataPacket(std::ostream &os,
3274 const char *path_prefix,
3277 bool loadIntrinsicParentUneditable(
UT_IStream &is,
3278 const char *
path=0);
3280 virtual bool loadPacket(
UT_IStream &is,
short class_id,
3281 short sig,
const char *
path=0);
3282 virtual bool loadPacket(
UT_IStream &is,
const char *token,
3283 const char *
path=0);
3286 const char *
path = 0);
3293 const char *
path = 0);
3296 virtual void loadStart();
3297 virtual void loadFinished();
3301 void loadContentsSection();
3308 void setMatchesOTLDefinition(
int matches);
3310 virtual const char *getFileExtension(
int binary)
const = 0;
3311 virtual const char *getDataFileExtension(
int binary)
const;
3327 virtual void checkTimeDependencies(
int do_parms=1,
3333 virtual void checkContextOptionDependencies(
int do_parms);
3340 int haveSeenDataModification(
exint modification_id);
3350 virtual int propagateModification(
OP_Node *by_whom,
3357 OP_Cache * getCookCache() {
return &myCache; }
3359 static void cmd_locate(
CMD_Args &);
3361 virtual void saveFlagsForUndo();
3362 void saveForUndoLayout();
3364 static void saveForUndoDelete(
OP_NodeList &nodes);
3367 void clearDependency();
3380 bool dirtyForTimeChange(
fpreal t)
3382 if (isCookedTime(t))
3396 virtual void cloneFromProxyRefNode(
OP_Network *proxy );
3401 bool hasOpDependents()
3402 {
return !myOpDependents.isEmpty(); }
3403 virtual int hasProxyRefNodes()
const
3405 virtual void moveProxyRefNodes(
OP_Network * ) { }
3406 void clearOpReferences();
3407 virtual void rebuildOpDependents(
bool proxy_only );
3410 virtual int removeOpDependent(
3413 virtual int removeOpDependent(
3427 virtual void moveDependencies(
OP_Node *from_node );
3433 void notifyRenameDependents(
const UT_String &full_from );
3434 virtual void notifyRenameDependents(
const UT_String &full_from,
3441 void notifyRenameReferences(
const UT_String &full_from );
3442 virtual void notifyRenameReferences(
const UT_String &full_from,
3446 virtual void handleOpDependency(
int referenced_op_id,
3450 const char *old_fullpath,
3451 const char *old_cwd,
3452 const char *old_chan_name );
3453 virtual void buildParmDependency(
int parm_index );
3455 void addOpNameReference(
3459 void addChannelNameReference(
3471 void removeOpReference(
3474 void removeOpReference(
3493 bool changeOpPathRef(
UT_String &value_str,
3494 const char *new_fullpath,
3495 const char *old_fullpath,
3496 const char *old_cwd,
3497 const char *new_cwd );
3501 static bool getStringParmOpPath(
3504 void handleStringParmOpPathDependency(
3505 int parm_index,
int vi,
3506 const char *new_fullpath,
3507 const char *old_fullpath,
const char *old_cwd );
3510 void notifyNodeDeletion();
3514 virtual void nodeDeleted(
OP_Node *op,
int propagate=1);
3516 void startCookTimer(
const OP_Context &context);
3517 void stopCookTimer(
const OP_Context &context);
3519 virtual const char *getCookTimerLabel(
const OP_Context &context)
const;
3525 void addInputError(
unsigned input_idx);
3535 virtual bool isInputConnectedInsideSubnet(
int input_idx)
const;
3536 virtual bool isNamedInputConnectedInsideSubnet(
3540 virtual void nodeUnlocked() { ; }
3543 virtual void setUniqueId(
int id);
3544 void changeOpDependentUniqueId(
int old_id,
int new_id );
3545 void changeOpReferenceUniqueId(
int old_id,
int new_id );
3546 virtual void clearUniqueId();
3548 void setAllowBuildDependencies(
int yesno )
3549 { myAllowBuildDependencies = yesno; }
3550 int allowBuildDependencies()
const
3551 {
return myAllowBuildDependencies; }
3555 void evaluateAllParms(
fpreal t);
3562 bool collapse =
false,
3563 bool check_missing =
false,
3564 bool show_missing_only=
false);
3567 const char *stringparm,
3568 int framestart,
int frameend,
3571 bool show_only_missing,
3577 virtual void getDescriptiveParmName(
UT_String &str)
const;
3582 virtual void getDescriptiveName(
UT_String &str)
const;
3585 void dirtyDescriptiveNameCache();
3588 virtual bool canDestroyNode();
3594 virtual bool cookedDataUsesAllParameters()
const
3598 virtual bool cookedDataNeedsErrors()
const
3606 virtual bool cookDataForAnyOutput()
const
3611 bool getIsRunningInCreateScript()
const;
3617 virtual void refreshRepresentativeNode(
OP_Node &changed_child);
3621 virtual void setupConnectorsAfterLoad();
3628 bool isCookedTime(
fpreal t)
const
3630 return dataMicroNodeConst()
3631 .isEqualToLastUpdateTime(t);
3636 virtual void dumpMicroNodes(
3639 int indent_level)
const;
3644 int myLastGroupMask;
3647 int myParmLastGroupMask;
3656 void deleteInput(
int idx);
3660 virtual void doDeleteInput(
int idx);
3663 void updateErrorSeverity();
3666 virtual void onInputAllocated(
OP_Input* new_input,
int index) { }
3669 void checkConnectorsConsistency();
3676 void renameInput(
OP_Input* input,
int new_id);
3678 void notifyChannelOpDependents(
PRM_Parm * in_parm,
int vecid);
3684 void updateSpareParmTemplates(
3686 bool leavedefaultsunchanged)
override;
3688 bool doDebugConsistencyCheck();
3695 OP_ERROR saveGroupMemberships(std::ostream &os,
3697 const char *path_prefix);
3701 OP_ERROR saveNetworkBox(std::ostream &os,
3703 const char *path_prefix);
3710 void saveForUndoComment();
3711 void saveForUndoDelScript();
3714 const UT_BitArray &getGroups()
const {
return myGroups; }
3723 void setInterrupted();
3725 int findAncestor(
const OP_Node *node)
const;
3726 int findDataAncestor(
const OP_Node *node)
const;
3727 void clearRecursionBit()
const;
3729 void initializeExpressions()
const;
3731 void clearOutputs();
3735 static bool getMicroNodesFromRef(
3739 static void traverseInputsAddInputs(
3743 TraverseOptions opts,
3745 bool include_parmlist);
3748 int addOpDependent(
int op_id,
3753 void updateRenameDependent(
OP_Node *dependent,
3754 const char *old_cwd,
3757 void notifyInputOpDependents(
int input_i);
3759 void getExistingOpReferencesImpl(
3760 OP_NodeList &refs,
bool include_descendants)
const;
3761 void getExistingOpDependentsImpl(
3762 OP_NodeList &deps,
bool include_descendants)
const;
3764 void buildScriptOpDependencies();
3765 void changeScriptOpRef(
const char *new_fullpath,
3766 const char *old_path,
3767 const char *old_cwd );
3768 static void changeScriptCB(
UT_String &str,
3769 const char *token_start,
3770 const char *&ch,
void *userdata );
3784 char *childpref,
int childpreflen,
3792 bool internalSetGlobalParam(
const char *
param,
3796 bool internalSetPicked(
bool on_off,
3797 bool propagate_parent_event,
3803 virtual void removeInputFromMapping(
int idx);
3804 void removeOutputFromMapping(
int idx);
3807 OP_Output *getOrCreateOutput(
int array_index,
bool create,
3810 uint32 computeCompiledHash()
const;
3814 void addDeprecationWarningsIfAny();
3817 int getConnectorNextId()
const;
3819 bool computeCompiledStatus()
const;
3821 bool isOperatorThreadSafe()
const;
3823 void internalSyncDelayedOTL();
3829 virtual bool isSelectionOwnerType()
const
3836 static void addExtraInputs(
3841 static void addExtraInput(
OP_Node &
source,
int source_pi,
int source_vi,
3842 OP_Node &target,
int target_pi,
int target_vi
3845 static bool getMicroNodesFromRef(
3849 static bool getMicroNodesFromRef(
3850 OP_Node &op,
int parm_i,
int vec_i,
3862 virtual bool isUsingCurrentFrameForVexTransformContext()
const {
return true;}
3867 exint myLastErrorVersion;
3887 EventMicroNodesPtr myEventMicroNodes;
3899 int myScriptsBlockingDelCount;
3901 int myNextIdOverride;
3902 unsigned myActiveInputIndex;
3905 int myLegacyConnectingInputIndex;
3910 unsigned int myRenameConflict : 1,
3911 myCookedForRender : 1,
3912 myModifyWaiting : 1,
3913 myBuiltExplicitly : 1,
3914 myAllowBuildDependencies : 1,
3916 myRunningCreateScript : 1,
3917 myRunningDelScript : 1,
3918 myAlreadyRunDelScript : 1,
3919 myMatchesOTLDefinition : 1,
3920 myLoadCookedDataError : 1,
3921 myBuiltHashCode : 1,
3922 myIsProxyRefNode : 1,
3923 myInhibitInputConsolidation : 1,
3929 myLocalVarActive : 1,
3931 mySyncingDelayedOTL : 1;
3933 mutable bool myRecursionFlag;
3936 static int thePropagateLevel;
3977 bool myCachedDescriptiveNameDirty;
3982 bool myLoadedNamedInputs;
3989 int myChildErrorSeverityTimestamp;
3992 static int makeUniqueId(
OP_Node *node);
3994 static bool *theCheckConnectionConsistency;
3995 static int theUniqueId;
3996 static int theUniqueSize;
3997 static OP_Node **theUniqueNodes;
3998 static bool theDoingBulkNotification;
4009 friend class OP_UndoCreate;
4010 friend class OP_UndoDelete;
4011 friend class OP_UndoInput;
4012 friend class OP_UndoSpareParm;
4013 friend class OP_UndoUserData;
4015 friend class op_MicroNodeDirtied;
4033 static inline size_t
4042 ::memcpy(buffer, s.
c_str(), len);
4054 #define CAST_INSTANTIATE(PREFIX) \
4055 inline static PREFIX##_Node *CAST_##PREFIX##NODE(OP_Node *op) \
4057 return ((op) ? (op)->castTo##PREFIX##Node() : 0); \
4060 inline static const PREFIX##_Node *CAST_##PREFIX##NODE(const OP_Node *op) \
4062 return ((op) ? (op)->castTo##PREFIX##Node() : 0); \
4087 #undef CAST_INSTANTIATE
4090 #undef INSTANTIATE_FINDNODE_FUNCTIONS
4091 #undef INSTANTIATE_CASTNODE_FUNCTIONS
4092 #undef INSTANTIATE_FOR_ALL_NODE_TYPES
4105 bool into_subnets =
false,
4106 bool through_dots =
true,
4107 int output_idx = -1)
4109 node.
getOutputNodes(*
this, into_subnets, through_dots, output_idx);
4115 using Parent::rbegin;
4118 using Parent::operator();
4119 using Parent::entries;
4134 bool into_subnets =
false,
4135 bool through_dots =
true,
4136 int output_idx = -1)
4142 const_reverse_iterator
end()
const {
return Parent::rend(); }
4151 using Parent::operator();
4152 using Parent::entries;
4166 bool isValid()
const
4187 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
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
**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)
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.
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.