![]() |
Houdini Development Toolkit - Version 6.5Side Effects Software Inc. 2004 |
The OP_Parameters class exists to handle the parameters associated with every OP_Node. It manages and evaluates the channels associated with the node. It also performs the task of error handling.
The OP_Network is a subclass of the OP_Node. It is a container class for a network of OP_Nodes. It is important to remember that an OP_Network is also itself an OP_Node. This means it is possible to have a network of networks.
The OP_Director is a special network. It is the root node of all networks and provides access to other important classes such as the CH_Manager (for managing channels) and the CMD_Manager (for handling Houdini commands). The global function OPgetDirector() can be used to get the root of the hierarchy at any time.
In Houdini, the OP_Director is the root of the node tree. Under the director are managers (Object, Composite Network, Shader, and Output Drivers). Each manager contains a network of nodes. The object manager contains networks of OBJ_Node nodes which are in turn networks which contain SOP_Node nodes. The output driver manager contains a list of ROP_Node nodes.
The Houdini Development Toolkit allows you to add custom nodes of any type (except a director).
nInputs()Returns the number of inputs which are being used for this operator.
getInput(int index)Returns the node which is connected at the input specified.
getFullPath()Creates the full Houdini path for this node.
getNchildren()Returns the number of nodes contained in this network
getChild(int index) getChild(const char *)Returns the child specified. You can specify the child either by its index or by its name.
getDisplayNodePtr() getRenderNodePtr() getCurrentNodePtr()Returns a pointer to the display, render or current node of a network.
evalInt(...) evalFloat(...) evalString(...)These are defined in OP_Parameters.h. They evaluate parameters and do all the channel evaluation and string expansion. The parameters to the function specify which parameter to evaluate. The first parameter to the function determines which element in the template list is to be evaluated. You can specify this as an integer index (which can be difficult to keep track of), as a string (which is slow to look up), or as a cached string lookup. The cached string lookup is passed the string and a reference to an integer. The first time the parameter is evaluated, the index will be computed and stuffed into the integer reference. After that, the index will be used for fast evaluation.
Usually, these functions are embedded into in-line functions for easier comprehension in the sub-class code.
See also Parameters for Operators.
enableParm(int, int on_off) enableParm(const char *, int on_off)These can be used to enable or disable parameters in the user interface.
getCwd()Returns the current working directory. This is the network or node which is currently active. This is usually the result of an opcf command in the textport.
getCommandManager()This gives you access to the command manager. Through the command manager, you can find out about animation information. The command manager is also used to execute houdini commands. See also The Command Interface.