![]() |
PFTrack Documentation | Python Macro API |
This is the generic base class for manipulating nodes in the tree. Node type specific classes inherit from this base class and are described later.
string getID()
- returns a unique handle to the node.
string getName()
- return the name of the node.
void setName(string)
- sets the name of the node to the specified value.
string getType()
- returns the node type.
float[2] getPosition()
- returns a tuple of 2 floats for the x and y position of this node in the tree.
void setPosition(float x, float y)
- sets the x and y position of this node in the tree to the given values.
int getSelected()
- returns 1 if the node is selected in the tree, 0 otherwise.
int getNumInputs()
- returns the number of input connections this node has.
int getNumInputLinks([int])
- returns the number of nodes linked to the specified input connection. Currently this function will always return 0 or 1. If not specified, the parameter defaults to zero.
PyLink getInputLink([int connection], [int link])
- returns a Python object for manipulating the link at the the specified input connection and link. If not specified both parameters default to zero. Currently link should always be zero, but the argument is present in this function just in case a node ever supports multiple inputs to a given connector and for symmetry with getOutputLink.
int getNumOutputs()
- returns the number of output connections this node has.
int getNumOutputLinks([int])
- returns the number of nodes linked to the specified output connection. If not specified, the parameter defaults to zero.
PyLink getOutputLink([int connection], [int link])
- returns a Python object for manipulating the link at the the specified output connection and link. If not specified both parameters default to zero.