Scripting Interface |
The node JavaScript global object. More...
Public Slots | |
Node Data | |
String | root () |
Returns the name of the Top level in the Node View, which is "Top". More... | |
bool | isGroup (String &node) |
Returns a true or false value indicating if the node is a group. More... | |
String | getName (String &node) |
Returns the name of a node. More... | |
String | type (String node) |
Returns the node type. These are all of the built-in node types available from the Harmony node like: READ, COMPOSITE, PEG, QUADMAP, SHADOW, etc. More... | |
int | numberOfSubNodes (String &parent) |
Returns an integer that indicates the number of nodes contained in a group. More... | |
QScriptValue | subNodes (String &parentGroup) |
Returns an array of sub nodes. More... | |
bool | addCompositeToGroup (String node) |
Return the value of the "Add Composite To Group" attribute of the peg-node. This method is obsolete. More... | |
String | subNode (String &parent, int iSubNode) |
Returns the path of a node in a group. Nodes are counted starting with zero. More... | |
String | subNodeByName (String &parent, String name) |
Returns the full path of a child node belonging to a parent group. More... | |
String | parentNode (String &node) |
Returns the path of the parent level of a node contained in a group. More... | |
String | noNode () |
Returns the node path to an invalid node. More... | |
bool | equals (String node1, String node2) |
Returns true or false to indicate if a node path is equal to another. Used to compare node paths. More... | |
String | getTextAttr (String node, double atFrame, String attrName) |
Returns the value(s) of the node selected attribute(s). More... | |
Attribute * | getAttr (String node, double atFrame, String attrName) |
Returns the Attribute of the given node. The attribute value is for the given frame. More... | |
QList< Attribute * > | getAttrList (String node, double atFrame, String attrName=String::null) |
Returns a list of Attribute objects of the given node. More... | |
StringList | getAllAttrNames (String node) |
Returns a list of the names of all of the Attribute objects of the given node. More... | |
StringList | getAllAttrKeywords (String node) |
Returns a list of the keywords of all of the Attribute objects of the given node. More... | |
String | linkedColumn (String node, String attrName) |
Returns the name of the column that an attribute is linked to. If the attribute is not linked to a column, the method returns the null string. More... | |
virtual int | coordX (String node) |
Returns an integer indicating the X position of a node in the Node View. More... | |
virtual int | coordY (String node) |
Returns an integer indicating the Y position of a node in the Node View. More... | |
virtual int | coordZ (String node) |
Returns an integer indicating the Z position of a node in the Node View. More... | |
virtual int | width (String node) |
Returns the width of a given node. More... | |
virtual int | height (String node) |
Returns the height of a given node. More... | |
virtual bool | setCoord (String node, int x, int y) |
Set the position of a node in the Node View. More... | |
virtual bool | setCoord (String node, int x, int y, int z) |
Set the position of a node in the Node View. More... | |
int | numberOfInputPorts (String node) |
The number of input ports on the node. More... | |
bool | isLinked (String node, int iPort) |
Returns true or false to indicate if a port is connected to another node. More... | |
String | srcNode (String node, int iPort) |
Returns the path for the node that the port is linked to. More... | |
String | flatSrcNode (String node, int iPort) |
If the Source node is a Group, this method returns the path of the node inside the Group node that is the source. If the source is not inside a group, the flatSrcNode() method behaves like the srcNode() method. More... | |
QScriptValue | srcNodeInfo (String &node, int iPort) |
Returns the source node path, the output port number and the link ID for this source node that this destination node is connected to. More... | |
int | numberOfOutputPorts (String node) |
The number of output ports on a node. More... | |
int | numberOfOutputLinks (String node, int iPort) |
The number of nodes actually linked from the output ports. More... | |
String | dstNode (String sourceNode, int iPort, int iLink) |
Returns the path of the destination node linked to by the output port on the source node. More... | |
QScriptValue | dstNodeInfo (String &sourceNode, int iPort, int iLink) |
Returns the path and addition information of the destination node linked to the source node. More... | |
bool | groupAtNetworkBuilding (String node) |
Returns true if the peg's groupAtNetworkBuilding() attribute is true. More... | |
Node Editing | |
String | add (String parentGroup, String name, String type, int x, int y, int z) |
Add a node to the Node View. More... | |
String | getGroupInputModule (String parentGroup, String name, int x, int y, int z) |
Returns existing or add a group multi port in node. More... | |
String | getGroupOutputModule (String parentGroup, String name, int x, int y, int z) |
Returns existing or add a group multi port out node. More... | |
bool | deleteNode (String nodePath, bool deleteTimedValues=false, bool deleteElements=false) |
Delete a single node. Optionally, delete all columns and element associated to that node. The column and element would only be removed when no other nodes refer to them. More... | |
String | createGroup (String nodes, String groupName) |
Create a group from the selection of nodes. The list of nodes is a string where the nodes are separated by commas. The actual name of each node in the list of nodes must include the full path of that node. More... | |
String | moveToGroup (String node, String groupName) |
Move the specified node within the specified group. More... | |
bool | explodeGroup (String groupName) |
Explode a group into its parent group. This method is identical to the "Explode Selected Group" from the Node View. More... | |
bool | rename (String node, String newName) |
Changes the name of a node. More... | |
bool | createDynamicAttr (String node, String type, String attrName, String displayName, bool linkable) |
Create a new attribute for the given node. More... | |
bool | removeDynamicAttr (String node, String attrName) |
Remove a dynamic attribute for the given node. More... | |
bool | setTextAttr (String node, String attrName, int atFrame, String attrValue) |
Change the value of an attribute in a node. More... | |
bool | linkAttr (String node, String attrName, String columnName) |
Link an attribute to a function column in the Xsheet View. More... | |
bool | unlinkAttr (String node, String attrName) |
Unlink an attribute from a function column. More... | |
bool | link (String srcNode, int srcPort, String dstNode, int dstPort) |
Link a port on a node to a port on another node. More... | |
bool | link (String srcNode, int srcPort, String dstNode, int dstPort, bool mayAddOutputPort, bool mayAddInputPort) |
Link a port of a node to a port of another node. This version of the method allows connecting to a group node, or setup the proper connection order. More... | |
bool | unlink (String dstNode, int inPort) |
Unlink a port on one node from the port on another node. More... | |
bool | setEnable (String node, bool flag) |
Setters and getters for the enable/disable property of a node. More... | |
bool | getEnable (String node) |
Returns whether a node is enabled or not. More... | |
bool | setLocked (String node, bool lock) |
Setters and getters for the lock/unlock property of a node. More... | |
bool | getLocked (String node) |
Returns the lock flag. More... | |
bool | setTimelineTag (String node, bool tag) |
Set the timeline tag flag of the node. More... | |
bool | getTimelineTag (String node) |
Returns the timeline tag flag. More... | |
StringList | getTimelineTagList (String node=QNTR("Top"), StringList list=StringList()) |
Returns a list of timeline tag flags. More... | |
bool | setColor (String node, ColorRGBA *color) |
Set the node colour. More... | |
bool | resetColor (String node) |
Reset the node colour. More... | |
ColorRGBA * | getColor (String node) |
Returns the node colour. More... | |
bool | setAsGlobalDisplay (String node) |
Change the global display used in the application. The node must be the full path of a display node. More... | |
bool | setGlobalToDisplayAll () |
Change the global display used by the application to "Display All" pseudo-display. More... | |
bool | setAsDefaultCamera (String node) |
Setters and getters for the default camera. More... | |
String | getDefaultCamera () |
Returns the name of the default camera. More... | |
StringList | getCameras () |
Returns a list of all cameras within the scene. More... | |
int | getMaxVersionNumber (String node) |
Returns the number of versions of the node available. More... | |
int | getVersion (String node) |
Returns the current version of the node. More... | |
void | setVersion (String node, int version) |
Set the version of the node to use. More... | |
StringList | getNodes (StringList &types) |
Returns a collection of node paths for nodes of specified types. More... | |
QObject * | getMatrix (String node, int frame) |
Returns the model matrix of a node. More... | |
QObject * | getPivot (String node, int frame) |
Returns the pivot of the node. More... | |
ColorOverride * | getColorOverride (String node) |
Returns the ColorOverride object for the color override node. More... | |
int | getElementId (String nodeName) |
Returns the Element Id of the node. Has to be an element node, identified with type :: READ. More... | |
void | explodeElementSymbolsInGroups (String element, bool disableElement, bool clearExposure, String &prefix=String()) |
Create a group for each exposure of the element where there is a symbol and will put the content of the symbol in that group. More... | |
bool | setShowTimelineThumbnails (String node, bool bShow) |
Set the show/hide timeline thumbnails on drawing layers. More... | |
bool | getShowTimelineThumbnails (String node) |
Returns the show/hide timeline thumbnail flags on drawing layers. More... | |
The node JavaScript global object.
Nodes are synonymous with Filter, IO, Move and Group in the Node View. With node methods, retrieve values from nodes, effects and composite. Add, link or set their attributes. Nodes can have identical names, so, their full path is needed to identify a them. The full path always starts with the root group name which is Top
. Then, the other parent group names follow it separated by a "/". e.g. "Top/MyFirstGroup/MySecondGroup/MyNodeName"
. The nomenclature is a bit confusing, but node name methods use the path as the node name most of the time. The parentNode
method from this class adds the Composite node in the parent group of the selected nodes. The link
method, in a loop, connects all selected nodes to the new Composite node. The setCoord() method positions a new node in the Node View. The syntax for a node paths is: "Top/Group_Name/Node_Name"
.
|
slot |
Add a node to the Node View.
For an example usage of add, see the above Detailed Description.
parentGroup | : The path of the parent node into which you want to add this node. |
name | : The name of the node you will add. |
type | : The type of node you will add. The node types are like: READ, COMPOSITE, PEG, QUADMAP, SHADOW, etc. |
x | : The X position of the node in the Node View. |
y | : The Y position of the node in the Node View. |
z | : The Z position of the node in the Node View. This property is important when two nodes overlap. |
|
slot |
Return the value of the "Add Composite To Group" attribute of the peg-node. This method is obsolete.
node | : The path of the node. |
|
virtualslot |
Returns an integer indicating the X position of a node in the Node View.
The example below takes the path of a group node, uses coordX to retrieve it's X coordinate in the Node View, then moves it to the right by 50 units.
node | : The path of the node. |
|
virtualslot |
Returns an integer indicating the Y position of a node in the Node View.
The example below takes the path of a group node, uses coordY to retrieve it's Y coordinate in the Node View, then moves it to the down by 50 units.
node | : The path of the node. |
|
virtualslot |
Returns an integer indicating the Z position of a node in the Node View.
The example below takes the path of a group node and then shifts its position 50 units to the right, and down. It also moves its position in the z-axis to the back.
node | : The path of the node. |
|
slot |
Create a new attribute for the given node.
The example below enables the boolean value of a given attribute. If the attribute does not exist, it creates it and sets it to true.
node | : The name of the node. |
type | : Type of attribute to create. |
attrName | : The name of the attribute. |
displayName | : The name of the attribute as it will appear in the UI. |
linkable | : Linkable status. |
|
slot |
Create a group from the selection of nodes. The list of nodes is a string where the nodes are separated by commas. The actual name of each node in the list of nodes must include the full path of that node.
The parent of the group is implicitly specified. It will be the same as the parent of the first node in the list. The following example creates a group from the currently selected nodes, and verifies that all of the selected nodes were added.
nodes | : This is a comma delimited list of names of nodes. e.g. (node0,node1,node2) |
groupName | : The name of the group to create. |
|
slot |
Delete a single node. Optionally, delete all columns and element associated to that node. The column and element would only be removed when no other nodes refer to them.
The following example deletes the currently selected node.
nodePath | : The path of the node. |
deleteTimedValues | : A boolean that indicates if the columns referenced by that node shall be removed if they are no longer in use. |
deleteElements | : A boolean that indicates if the element should also be removed, if they are no longer in use. |
|
slot |
Returns the path of the destination node linked to by the output port on the source node.
The following example returns a list of all of the destination nodes of the node passed in the parameter.
sourceNode | : The path of the node. |
iPort | : The port number on which you want to find the connected node. This value is between 0 and the results of the numberOfOutputPorts() method, minus one. |
iLink | : The link number whose destination node you want to find. This value is between 0 and the results of the numberOfOutputLinks() method, minus one. |
|
slot |
Returns the path and addition information of the destination node linked to the source node.
The example below shows the relationship between dstNodeInfo and srcNode.
sourceNode | : The path of the source node. |
iPort | : The output port number on which you want to find the connected node. This value is between 0 and the results of the numberOfOutputPorts() method, minus one. |
iLink | : The link number whose destination node you want to find. This value is between 0 and the results of the numberOfOutputLinks() method, minus one. |
|
slot |
Returns true or false to indicate if a node path is equal to another. Used to compare node paths.
The example below deconstructs and then rebuilds a node path using subNodeByName, then compares the original to the rebuilt path. This example will print true. exNode is the full name of a node, such as "Top/MyGroup/MyNode".
node1 | : The path of the first node. |
node2 | : The path of the second node. |
|
slot |
Create a group for each exposure of the element where there is a symbol and will put the content of the symbol in that group.
If disable element is TRUE, will disable the element afterwards. If clearExposure is TRUE, will clear the exposures where there were symbols afterwards. Will use prefix as the prefix for the generated group names.
A symbol combines animation, artwork or layers into a single object that you can control in one layer.
The example below executes explodeElementSymbolsInGroup for the currently selected drawing node, and positions the newly created node groups to the left of the original node.
element | : Element node path. |
disableElement | : True to disable the exploded element. |
clearExposure | : True to clear the exposure. |
prefix | : Add a prefix to the symbols. |
|
slot |
Explode a group into its parent group. This method is identical to the "Explode Selected Group" from the Node View.
The following example creates a group then explodes the group if it was successful.
groupName | : The name of the node. |
|
slot |
If the Source node is a Group, this method returns the path of the node inside the Group node that is the source. If the source is not inside a group, the flatSrcNode() method behaves like the srcNode() method.
The example below prints the source inside the group, and the source outisde the group of the currently selected node if it is in a group and has a source.
node | : The path of the node. |
iPort | : The port number on the destination node whose source node you want to find. This value is between 0 and the results of the numberOfInputPorts() method, minus one. |
|
slot |
|
slot |
|
slot |
Returns the Attribute of the given node. The attribute value is for the given frame.
The example below gets the attribute with the corresponding name and returns it's type.
This is just a simple helper function, see createDynamicAttr() or removeDynamicAttr() for a more complex example using getAttr().
node | : The path of the node. |
atFrame | : The frame number at which the attribute value is extracted. This parameter isn't used if the value isn't animated (a local value). |
attrName | : The name of the attribute. Access a child attribute by concatenating the parent attribute name with the child name separated by a dot ('.'). |
|
slot |
Returns a list of Attribute objects of the given node.
This example returns a list of all the attributes of a node, including all the sub attributes.
node | : The path of the node. |
atFrame | : The frame number at which the attribute value is extracted. This parameter isn't used if the value isn't animated (a local value). |
attrName | : The name of the attribute or an empty string for all top level attributes. Access a child attribute by concatenating the parent attribute name with the child name separated by a dot ('.'). |
|
slot |
Returns a list of all cameras within the scene.
The example below changes the default camera if a second camera exists.
|
slot |
Returns the node colour.
The example below takes two nodes as parameters, changes the colour of the first node to the colour of the second node, then resets the second node's colour.
node | : The name of the node. |
|
slot |
Returns the ColorOverride object for the color override node.
If the selected node is a color override node, returns the ColorOverride object. See the ColorOverride class for more information about ColorOverride objects.
node | : The name of the node. |
|
slot |
Returns the name of the default camera.
The example below halves the field of view of the current camera view.
|
slot |
Returns the Element Id of the node. Has to be an element node, identified with type :: READ.
Returns -1 on fail. The example below uses the Element Ids of all the selected nodes (stored in a variable named allNodes) to recolour all of the drawings selected.
nodeName | : The name of the node. |
|
slot |
|
slot |
Returns existing or add a group multi port in node.
Add a multi port in node inside the selected group. There can only be a single such node per group. If there is already such type of node in the group, it will return it. It returns NULL if it cannot add such node. You cannot add this type of node in the top group of a scene. The following example creates a group from the currently selected nodes, then returns the input and output modules in an object.
parentGroup | : The path to the parent group into which you want to add this node. |
name | : The name of the node you will add. |
x | : The X position of the node in the Node View. |
y | : The Y position of the node in the Node View. |
z | : The Z position of the node in the Node View. This property is important when two nodes overlap. |
|
slot |
Returns existing or add a group multi port out node.
Add a multi port out node inside the selected group. There can only be a single such node per group, so, if there is already such node, it returns it. It returns NULL if it cannot add such node. You cannot add this type of node in the top group of a scene. The following example creates a group from the currently selected nodes, then returns the input and output modules in an object.
parentGroup | : The path of the parent group into which you want to add this node. |
name | : The name of the node you will add. |
x | : The X position of the node in the Node View. |
y | : The Y position of the node in the Node View. |
z | : The Z position of the node in the Node View. This property is important when two nodes overlap. |
|
slot |
|
slot |
Returns the model matrix of a node.
node | : The name of the node. |
frame | : Is the int that specifies the frame number. |
|
slot |
Returns the number of versions of the node available.
The example below sets current version number of a node to the maximum version number.
node | : The name of the node. |
|
slot |
Returns the name of a node.
node | : The path of the node. |
|
slot |
Returns a collection of node paths for nodes of specified types.
Example usage:
|
slot |
Returns the pivot of the node.
The example below uses the pivot of a node to extract the rotation, position and scale of the node from it's model matrix.
node | : The name of the node. |
frame | : Is the int that specifies the frame number. |
|
slot |
Returns the show/hide timeline thumbnail flags on drawing layers.
node | : The name of the node. |
|
slot |
Returns the value(s) of the node selected attribute(s).
The example below adds the current palette path to the currently selected colour override node.
node | : The path of the node. |
atFrame | : The frame number from which you want to extract the attribute value. If the value is static, you must still pass a value. You can, for example, pass 1 to take the value at the first frame. |
attrName | : The attribute whose value you want. |
For example, use the attribute PALETTES.NUMBER to return the number of palettes in the colour override node palette list. Or, use the attribute PALETTES.x to return the palette at index x from the colour override node palette list. In this case, x is a number between 0 and the number of palettes in the list, minus one. If x is not given (argument is "PALETTES") or x is not valid (< 0 or out of range) then 0 is assumed.
|
slot |
Returns the timeline tag flag.
If a timeline tag is set to true, it will be shown when "View Tagged Layers" is selected.
node | : The name of the node. |
|
slot |
Returns a list of timeline tag flags.
node | : The name of the top node. |
list | : The list of nodes to retrieve timeline tag flags. |
|
slot |
Returns the current version of the node.
The node may have multiple versions if their rendering output have changed over time.
node | : The name of the node. |
|
slot |
Returns true if the peg's groupAtNetworkBuilding() attribute is true.
node.getAttr
("MyPeg", 1.0, "GROUP_AT_NETWORK_BUILDING").boolValue()); node | : The path of the node. |
|
virtualslot |
Returns the height of a given node.
This height parameter is useful for computing the position of nodes in the Node View. It uses the same unit system as the coordX() and coordY() methods. The example below takes 2 nodes as parameters and moves them one on top of the other in the node view.
node | : The path of the node. |
|
slot |
Returns a true or false value indicating if the node is a group.
The example below uses isGroup to confirm that the node is a group node before printing some information about it.
node | : The path of the node. |
|
slot |
Returns true or false to indicate if a port is connected to another node.
The example below inserts a new Peg node inbetween the selected node and it's parent. The new node's parent is the original parent of the selected node, and the new parent of the selected note is the created peg.
node | : The path of the node. |
iPort | : The number of the port whose link status you want to check. This value is between 0 and the results of the numberOfInputPorts() method, minus one. |
|
slot |
Link a port on a node to a port on another node.
For another example usage of link, see the above Detailed Description.
srcNode | : The path of the node whose output port you want to link to a destination node. |
srcPort | : The port that you want to link to the input port on the destination node. This value is between 0 and the results of the numberOfOutputPorts() method, minus one. |
dstNode | : The path of the node whose input port you want to link to the source node. |
dstPort | : The port on the destination node that you want to link to the output port from the source node. This value is between 0 and the results of the numberOfInputPorts() method, minus one. |
|
slot |
Link a port of a node to a port of another node. This version of the method allows connecting to a group node, or setup the proper connection order.
srcNode | : The path of the node whose output port you want to link to a destination node. |
srcPort | : The port that you want to link to the input port on the destination node. This value is between 0 and the results of the numberOfOutputPorts() method, minus one. |
dstNode | : The path of the node whose input port you want to link to the source node. |
dstPort | : The port on the destination node that you want to link to the output port from the source node. This value is between 0 and the results of the numberOfInputPorts() method, minus one. |
mayAddOutputPort | : used by group multiport nodes - automatically create a new output port for these nodes. |
mayAddInputPort | : used by group multiport and composite - automatically create input ports for these nodes. |
|
slot |
Link an attribute to a function column in the Xsheet View.
The example below links the attributes of a camera peg to two columns to create a camera pan.
node | : The name of the node. |
attrName | : The name of the attribute. |
columnName | : The name of the column that you want to link to the attribute. |
|
slot |
Returns the name of the column that an attribute is linked to. If the attribute is not linked to a column, the method returns the null string.
node | : The path of the node. |
attrName | : The attribute you want to check to see if it is linked to a column. |
|
slot |
Move the specified node within the specified group.
This method is equivalent to the drag and drop of a node to a group from the timeline. If an element node is moved into a group, a composite node will automatically be created to connect the element node.
node | : The path to the node to group. |
groupName | : The path of the target group. |
|
slot |
Returns the node path to an invalid node.
Methods that returns a node path will return this value if an error occurred.
|
slot |
The number of input ports on the node.
The example below uses numberOfInputPorts to get the path to the source node of the parameter. exNode is the full name of a node, such as "Top/MyGroup/MyNode".
node | : The path of the node. |
|
slot |
The number of nodes actually linked from the output ports.
For an example use of numberOfOutputLinks see link().
node | : The path of the node. |
iPort | : The port number on which you want to locate the node that is connected to it. This value is between 0 and the results of the numberOfInputPorts() method, minus one. |
|
slot |
The number of output ports on a node.
The following example returns a list of all of the destination nodes of the node passed in the parameter.
node | : The path of the node. |
|
slot |
Returns an integer that indicates the number of nodes contained in a group.
The example below prints all of the sub nodes of a node if the node's type is GROUP. exNode is the full name of a node, such as "Top/MyGroup".
Sample output of the above example to the Message Log view:
The node Top/MyGroup has 2 sub nodes.
Top/MyGroup/MyNode1
Top/MyGroup/MyNode2
parent | : The path of the parent node. |
|
slot |
Returns the path of the parent level of a node contained in a group.
The parent of a node is the parent group that the node is currently in. If the node is not in a group, it's parent is "Top".
The example below uses the path to the parent of a node to explode the group it is in. exNode is the full name of a node, such as "Top/MyGroup/MyNode".
node | : The path of the node. |
|
slot |
Remove a dynamic attribute for the given node.
The example below attempts to remove the dynamic attribbute for the given node and attribute name. It will do nothing if that attribute does not exist.
node | : The name of the node. |
attrName | : The name of the attribute. |
|
slot |
|
slot |
Reset the node colour.
The example below takes two nodes as parameters, changes the colour of the first node to the colour of the second node, then resets the second node's colour.
node | : The name of the node. |
|
slot |
Returns the name of the Top level in the Node View, which is "Top".
|
slot |
Setters and getters for the default camera.
Set the default camera in the scene. Returns whether successful or not.
The example below changes the camera if a second camera exists.
node | : The name of the camera. |
|
slot |
Change the global display used in the application. The node must be the full path of a display node.
The example below sets the global display to the node in the parameter. If that node is not a display node, it sets the global display to "Display All".
node | : The full path of a display node. |
|
slot |
Set the node colour.
The example below changes the colour of a node to solid red.
node | : The name of the node. |
color | : The new colour set for the node. This must be a ColorRGBA object. |
|
virtualslot |
Set the position of a node in the Node View.
The example below takes the path of a group node and then shifts its position 50 units to the right, and down in the node view.
node | : The path of the node. |
x | : The X position of the node in the Node View. |
y | : The Y position of the node in the Node View. |
|
virtualslot |
Set the position of a node in the Node View.
The example below takes the path of a group node and then shifts its position 50 units to the right, and down in the node view. It also moves the group node's position in the z-axis to the back.
node | : The path of the node. |
x | : The X position of the node in the Node View. |
y | : The Y position of the node in the Node View. |
z | : The Z position of the node in the Node View. |
|
slot |
Setters and getters for the enable/disable property of a node.
Set the enable flag of the node.
The following example disables a node if it is currently enabled.
node | : The name of the node. |
flag | : If true, enable the node. |
|
slot |
Change the global display used by the application to "Display All" pseudo-display.
The example below sets the global display to the node in the parameter. If that node is not a display node, it sets the global display to "Display All".
|
slot |
|
slot |
Set the show/hide timeline thumbnails on drawing layers.
node | : The name of the node. |
bShow | : True to show thumbnails. |
|
slot |
Change the value of an attribute in a node.
Additions specific to the Colour Override node:
Use the attribute PALETTES.CLEAR to clear the palette list in the colour override node.
Use the attribute PALETTES.ADD to add a palette to the palette list of the colour override node. Attemping to add a palette that already exists will cause setTextAttr to do nothing.
Use the attribute PALETTES.REMOVE to remove a palette from the palette list of the colour override node.
The example below adds the current palette path to the currently selected colour override node.
node | : The name of the node. |
attrName | : The name of the attribute whose value you want to change. |
atFrame | : The frame number at which you set the value. |
attrValue | : The new value of the attribute. |
|
slot |
Set the timeline tag flag of the node.
If a timeline tag is set to true, it will be shown when "View Tagged Layers" is selected.
node | : The name of the node. |
tag | : New tag state of the node. |
|
slot |
Set the version of the node to use.
The example below sets current version number of a node to the maximum version number.
node | : The name of the node. |
version | : The new version of the node. |
|
slot |
Returns the path for the node that the port is linked to.
The example below uses numberOfInputPorts to get the path to the source node of the parameter. exNode is the full name of a node, such as "Top/MyGroup/MyNode".
node | : The path of the node. |
iPort | : The port number on the destination node whose source node you want to find. This value is between 0 and the results of the numberOfInputPorts() method, minus one. |
|
slot |
Returns the source node path, the output port number and the link ID for this source node that this destination node is connected to.
The example below shows the relationship between srcNodeInfo and dstNode.
node | : The path of the source node. |
iPort | : the port number of which you want to locate the node that is connected to it. This value is between 0 and the result of numberOfInputPorts() method, minus one. This method is similar to srcNode(), however, it returns an object that contains 3 properties: |
node - the path of the source node this destination node is linked to. This is the same value as the value returned by srcNode().
port - this is the output port number in the source node that this destination node is connected to.
link - this is the link number in the output port of the source node for this connection.
|
slot |
Returns the path of a node in a group. Nodes are counted starting with zero.
The example below prints all of the sub nodes of a node if the node's type is GROUP. exNode is the full name of a node, such as "Top/MyGroup".
Sample output of the above example to the Message Log view:
The node Top/MyGroup has 2 sub nodes.
Top/MyGroup/MyNode1
Top/MyGroup/MyNode2
parent | : The path of the parent node. |
iSubNode | : An integer representing the numerical value of the node. This value must be between 0 and the numberOfSubNodes() method, minus one, for that point. |
|
slot |
Returns the full path of a child node belonging to a parent group.
The existence of the parent group is validated as well as the existence of the child node in that parent. Use this method instead of manually concatenating the full path name of child nodes. The example below deconstructs and then rebuilds a node path using subNodeByName. exNode is the full name of a node, such as "Top/MyGroup/MyNode".
parent | : Fully qualified path of the parent group. |
name | : The actual node name suffix. This one is only the short name, not the full path of the node. |
|
slot |
Returns an array of sub nodes.
The example below prints an array of a node's subnodes if the node's type is GROUP. exNode is the full name of a node, such as "Top/MyGroup".
Sample output of the above example to the Message Log view:
The node Top/MyGroup has 2 sub nodes.
Top/MyGroup/MyNode1,Top/MyGroup/MyNode2
parentGroup | : The path of the parent node. |
|
slot |
Returns the node type. These are all of the built-in node types available from the Harmony node like: READ, COMPOSITE, PEG, QUADMAP, SHADOW, etc.
The example below prints all of the sub nodes of a node if the node's type is GROUP. exNode is the full name of a node, such as "Top/MyGroup".
Sample output of the above example to the Message Log view:
The node Top/MyGroup has 2 sub nodes.
Top/MyGroup/MyNode1
Top/MyGroup/MyNode2
Other example uses of type can be found in getTextAttr(), setTextAttr(), explodeElementSymbolsInGroups().
node | : The path of the node. |
|
slot |
Unlink a port on one node from the port on another node.
The example below inserts a new Peg node inbetween the selected node and it's parent. After unlinking the original node from it's original parent, the original parent is linked to the new node, and the new node becomes the parent of the original node.
dstNode | : The path of the node whose input port you want to unlink from the source node. |
inPort | : The input port that you want to unlink. This value is between 0 and the results of the numberOfInputPorts() method, minus one. |
|
slot |
Unlink an attribute from a function column.
The example below removes a camera pan by unlinking it from the column. It would undo the example shown for linkAttr() and linkedColumn().
node | : The name of the node. |
attrName | : The name of the attribute that you want to unlink. |
|
virtualslot |
Returns the width of a given node.
This width parameter is useful for computing the position of nodes in the Node View. It uses the same unit system as the coordX() and coordY() methods. The example below takes 2 nodes as parameters and moves them side by side in the node view.
node | : The path of the node. |