12 #ifndef __OP_Utils_h__
13 #define __OP_Utils_h__
35 bool checktoplevelnode,
38 bool checktoplevelnode,
61 const char *context_name);
68 bool include_me =
true);
70 bool include_me =
true);
110 static inline void evalOpParm(
113 { v = node->
evalInt(parmname, 0, time);
116 static inline void evalOpParm(
117 bool &v,
const OP_Node *node,
const char *parmname,
fpreal time,
119 { v = node->
evalInt(parmname, 0, time);
122 static inline void evalOpParm(
125 { v = node->
evalFloat(parmname, 0, time);
128 static inline void evalOpParm(
136 static inline void evalOpParm(
146 static inline void evalOpParm(
159 static inline void evalOpParm(
162 {
for (
int r = 0;
r < 2;
r++)
164 for (
int c = 0;
c < 2;
c++)
171 static inline void evalOpParm(
174 {
for (
int r = 0;
r < 3;
r++)
176 for (
int c = 0;
c < 3;
c++)
183 static inline void evalOpParm(
186 {
for (
int r = 0;
r < 4;
r++)
188 for (
int c = 0;
c < 4;
c++)
196 static void inline evalOpParm(
199 { v.
x() = node->
evalInt(parmname, 0, time);
200 v.
y() = node->
evalInt(parmname, 1, time);
204 static void inline evalOpParm(
207 { v.
x() = node->
evalInt(parmname, 0, time);
208 v.
y() = node->
evalInt(parmname, 1, time);
209 v.
z() = node->
evalInt(parmname, 2, time);
214 static void inline evalOpParm(
217 { v.
x() = node->
evalInt(parmname, 0, time);
218 v.
y() = node->
evalInt(parmname, 1, time);
219 v.
z() = node->
evalInt(parmname, 2, time);
220 v.
w() = node->
evalInt(parmname, 3, time);
226 static void inline evalOpParm(
232 static void inline evalOpParmRaw(
238 static void inline evalOpParm(
247 static void inline evalOpParm(
251 v = node->
evalData(parmname, 0, time);
256 static void inline evalOpParmInst(
264 static void inline evalOpParmInst(
265 bool &v,
const OP_Node *node,
const char *parmname,
272 static void inline evalOpParmInst(
280 static void inline evalOpParmInst(
290 static void inline evalOpParmInst(
302 static void inline evalOpParmInst(
317 static void inline evalOpParmInst(
321 {
for (
int r = 0;
r < 2;
r++)
323 for (
int c = 0;
c < 2;
c++)
330 static void inline evalOpParmInst(
334 {
for (
int r = 0;
r < 3;
r++)
336 for (
int c = 0;
c < 3;
c++)
343 static void inline evalOpParmInst(
347 {
for (
int r = 0;
r < 4;
r++)
349 for (
int c = 0;
c < 4;
c++)
357 static void inline evalOpParmInst(
367 static void inline evalOpParmInst(
379 static void inline evalOpParmInst(
394 static void inline evalOpParmInst(
402 static void inline evalOpParmInst(
413 static void inline evalOpParmInst(
438 virtual void onNotifyOPPythonResult(
PY_Result const &
result,
char const * script_source,
char const * script_path) = 0;
void adoptFromString(UT_String &str)
OP_API void OPmarkRootNodes(UT_BitArray &roots, const OP_NodeList &nodes, bool assume_picked)
GLuint const GLchar * name
OP_API bool OPconvertOrWarnExternalReferences(OP_Node *node, bool checktoplevelnode, UT_WorkBuffer &err)
OP_API OP_Node * OPfindOpInput(OP_Node *op, const char *find_op_type, bool include_me=true)
OP_API void OPaddVopSubnetMask(const UT_StringRef &name)
GT_API const UT_StringHolder time
void addExplicitInput(DEP_MicroNode &inp, bool check_dup)
Methods for manipulating explicit edges.
SYS_FORCE_INLINE T * SYSconst_cast(const T *foo)
GLuint GLfloat GLfloat GLfloat x1
fpreal evalFloat(int pi, int vi, fpreal t) const
OP_API bool OPconvertOrWarnExternalOverrides(OP_Node *node, bool checktoplevelnode, UT_WorkBuffer &err)
GLuint GLdouble GLdouble GLint GLint order
OP_API bool OPisStandInShaderParm(const PRM_Template &parm)
PRM_Parm & getParm(int i)
OP_API bool OPmatchesShaderContextTag(const PRM_Template &parm, const char *context_name)
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
void evalString(UT_String &val, int pi, int vi, fpreal t) const
OP_API void OPgetVopSubnetMask(OP_Node *node, UT_String &vopnetmask)
PRM_DataItemHandle evalDataInst(const UT_StringRef &name, const int *inst, int vi, fpreal t, int nestlevel=1) const
OP_API void OPtopologicalSort(UT_IntArray &order, const OP_NodeList &nodes, const UT_BitArray *roots=nullptr)
bool hasParm(const char *name) const
OP_API bool OPhasShaderContextTag(const PRM_Template *list, int start=0, int end=-1)
OP_API bool OPisPotentialShaderParm(const PRM_Template &parm)
OP_API void notifyPythonResultClients(PY_Result const &result, char const *script_source, char const *script_path)
fpreal evalFloatInst(const UT_StringRef &name, const int *inst, int vi, fpreal t, int nestlevel=1) const
PRM_DataItemHandle evalData(int pi, int vi, fpreal t) const
OP_API bool OPcheckForVopnetDefinedNodes(OP_Node *node, UT_WorkBuffer &err)
void evalStringRaw(UT_String &val, int pi, int vi, fpreal t) const
OP_API void OPcreateStickyNoteAboutCachedCode(OP_Network *subnet)
void evalStringInst(const UT_StringRef &name, const int *inst, UT_String &val, int vi, fpreal t, int nestlevel=1) const
OP_API bool OPisLegacyShaderParm(const PRM_Template &parm, OP_Node *owner)
std::weak_ptr< T > UT_WeakPtr
Utility class for containing a color ramp.
GLdouble GLdouble GLdouble r
GLuint GLfloat GLfloat GLfloat GLfloat y1
OP_API void OPwarnBadRefs(UT_WorkBuffer &msg, const UT_StringArray &badrefs)
UT_WeakPtr< PythonResultClient > WPtr
void updateRampFromMultiParm(fpreal t, const PRM_Parm &m, UT_Ramp &ramp, bool *time_dep=NULL, DEP_MicroNode *depnode=NULL) const
OP_API void registerPythonResultClient(PythonResultClient::WPtr result_client)
exint evalInt(int pi, int vi, fpreal t) const
exint evalIntInst(const UT_StringRef &name, const int *inst, int vi, fpreal t, int nestlevel=1) const
PRM_Parm * getParmPtrInst(const UT_StringRef &parm_name, const int *instance, int nest_level)
SYS_FORCE_INLINE PRM_ParmList * getParmList()
OP_API void OPgetItemBounds(fpreal &x1, fpreal &y1, fpreal &x2, fpreal &y2, const OP_NetworkBoxItemList &items)
OP_API bool OPcheckForVopnetsUsedOutside(OP_Node *node, OP_NodeList *badvopnets)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle