HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OP_Utils.h File Reference
#include "OP_API.h"
#include "OP_Node.h"
#include <UT/UT_Matrix2.h>
#include <UT/UT_Matrix3.h>
#include <UT/UT_Matrix4.h>
#include <UT/UT_Ramp.h>
#include <UT/UT_Vector2.h>
#include <UT/UT_Vector3.h>
#include <UT/UT_Vector4.h>
#include <UT/UT_WeakPtr.h>
+ Include dependency graph for OP_Utils.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  OP_Utils::PythonResultClient
 

Namespaces

 OP_Utils
 

Functions

OP_API void OPwarnBadRefs (UT_WorkBuffer &msg, const UT_StringArray &badrefs)
 
OP_API bool OPconvertOrWarnExternalReferences (OP_Node *node, bool checktoplevelnode, UT_WorkBuffer &err)
 
OP_API bool OPconvertOrWarnExternalOverrides (OP_Node *node, bool checktoplevelnode, UT_WorkBuffer &err)
 
OP_API bool OPcheckForVopnetDefinedNodes (OP_Node *node, UT_WorkBuffer &err)
 
OP_API void OPgetVopSubnetMask (OP_Node *node, UT_String &vopnetmask)
 
OP_API void OPaddVopSubnetMask (const UT_StringRef &name)
 
OP_API OP_NodeOPfindOpInput (OP_Node *op, const char *find_op_type, bool include_me=true)
 
OP_API OP_NodeOPfindOpInput (OP_Node *op, const char **find_op_types, bool include_me=true)
 
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)
 
OP_API void OPcreateStickyNoteAboutCachedCode (OP_Network *subnet)
 
OP_API void OPtopologicalSort (UT_IntArray &order, const OP_NodeList &nodes, const UT_BitArray *roots=nullptr)
 
OP_API void OPmarkRootNodes (UT_BitArray &roots, const OP_NodeList &nodes, bool assume_picked)
 
OP_API void OP_Utils::registerPythonResultClient (PythonResultClient::WPtr result_client)
 
OP_API void OP_Utils::notifyPythonResultClients (PY_Result const &result, char const *script_source, char const *script_path)
 
OP_API bool OPisPotentialShaderParm (const PRM_Template &parm)
 
OP_API bool OPisStandInShaderParm (const PRM_Template &parm)
 
OP_API bool OPmatchesShaderContextTag (const PRM_Template &parm, const char *context_name)
 
OP_API bool OPisLegacyShaderParm (const PRM_Template &parm, OP_Node *owner)
 
OP_API bool OPhasShaderContextTag (const PRM_Template *list, int start=0, int end=-1)
 

Function Documentation

OP_API void OPaddVopSubnetMask ( const UT_StringRef name)

Adds a new vopnet mask string to the list of known vopnet context types. This list is used to generate a VopNet Mask value when creating an HDA from an existing subnet VOP.

OP_API bool OPcheckForVopnetDefinedNodes ( OP_Node node,
UT_WorkBuffer err 
)

Looks for any nodes inside the specified operator that are defined by VOP Networks outside the provided node. REtrns true if no such nodes are found. Otherwise it puts an error message in the err buffer and returns false.

OP_API bool OPcheckForVopnetsUsedOutside ( OP_Node node,
OP_NodeList badvopnets 
)

Looks for any VOP Networks inside the specified node which define operator types that are instantiated outside the node. If it returns false, the badvopnets array will be filled with the VOP Networks that are used outside the root node.

OP_API bool OPconvertOrWarnExternalOverrides ( OP_Node node,
bool  checktoplevelnode,
UT_WorkBuffer err 
)
OP_API bool OPconvertOrWarnExternalReferences ( OP_Node node,
bool  checktoplevelnode,
UT_WorkBuffer err 
)
OP_API void OPcreateStickyNoteAboutCachedCode ( OP_Network subnet)

Creates a sticky note about the lack of vops inside synced HDAs, since the children have been removed because the subnet is using cached code.

OP_API OP_Node* OPfindOpInput ( OP_Node op,
const char *  find_op_type,
bool  include_me = true 
)
OP_API OP_Node* OPfindOpInput ( OP_Node op,
const char **  find_op_types,
bool  include_me = true 
)
OP_API void OPgetItemBounds ( fpreal x1,
fpreal y1,
fpreal x2,
fpreal y2,
const OP_NetworkBoxItemList items 
)

Returns coordinates specifying the smallest possible bounding box around the items in 'items'. Takes each item's height and width into consideration.

OP_API void OPgetVopSubnetMask ( OP_Node node,
UT_String vopnetmask 
)
OP_API bool OPhasShaderContextTag ( const PRM_Template list,
int  start = 0,
int  end = -1 
)

Functions for testing whether a node parameter is used as a shader parameter, when the node represents a shader. Some node parameters may belong to only certain contexts (eg, surface shader), while other ones may be just true spare parameters that are not shader parameters at all.

OP_API bool OPisLegacyShaderParm ( const PRM_Template parm,
OP_Node owner 
)

Functions for testing whether a node parameter is used as a shader parameter, when the node represents a shader. Some node parameters may belong to only certain contexts (eg, surface shader), while other ones may be just true spare parameters that are not shader parameters at all.

OP_API bool OPisPotentialShaderParm ( const PRM_Template parm)

Functions for testing whether a node parameter is used as a shader parameter, when the node represents a shader. Some node parameters may belong to only certain contexts (eg, surface shader), while other ones may be just true spare parameters that are not shader parameters at all.

OP_API bool OPisStandInShaderParm ( const PRM_Template parm)

Functions for testing whether a node parameter is used as a shader parameter, when the node represents a shader. Some node parameters may belong to only certain contexts (eg, surface shader), while other ones may be just true spare parameters that are not shader parameters at all.

OP_API void OPmarkRootNodes ( UT_BitArray roots,
const OP_NodeList nodes,
bool  assume_picked 
)

Given a set of nodes return a bit array indicating the nodes which are roots WITHIN THE SET. If assume_picked is true, then it's assumed that the node is in the set if and only if it's in the set.

OP_API bool OPmatchesShaderContextTag ( const PRM_Template parm,
const char *  context_name 
)

Functions for testing whether a node parameter is used as a shader parameter, when the node represents a shader. Some node parameters may belong to only certain contexts (eg, surface shader), while other ones may be just true spare parameters that are not shader parameters at all.

OP_API void OPtopologicalSort ( UT_IntArray order,
const OP_NodeList nodes,
const UT_BitArray roots = nullptr 
)

Given a set of unique nodes, compute a topological ordering using only the connectivity amongst the given nodes. If the roots are not known, then it will be internally computed using OPmarkNodeRoots(only_picked=false). Otherwise, the nodes will only be sorted by traversing from the given root nodes.

OP_API void OPwarnBadRefs ( UT_WorkBuffer msg,
const UT_StringArray badrefs 
)