Package autodesk_toxik :: Module graph :: Class Graph
[frames] | no frames]

Class Graph

 object --+        
          |        
Boost.Python.instance --+    
              |    
        GraphRO --+
                  |
                 Graph

The Graph class corresponds to a composition version, also called composition graph. You use the Graph class wrapper to access graph internals.

If a version is opened in read-only mode, none of the objects it contains (node, sockets, etc.) can be used to write to/change the version.

Instances of class Graph (versions) cannot be created directly, using the class constructor. They must be created using the version management functions of class Composition.

Instance Methods
Output
findOutput(...)
Returns: The socket matching the argument socket ID in the composition version.
[Node]
getAllNodes(...)
Returns: A list of all the nodes in the composition version, regardless of the group level.
GroupNode
getGroup(...)
Returns: The topmost group node of the composition version.
Node
getNodeById(...)
Returns: The Node corresponding to the argument nodeId in the composition version.
[Node]
getNodesByTool(...)
Returns: A list of all the tool nodes (ToolNode) or super tool group nodes (GroupNode) matching the specified Tool or tool name in the composition version, regardless of the group level.
[GroupNode]
getOutputNodes(...)
Returns: The list of output nodes (GroupNode) in the composition version.
GroupNode
getPrimaryOutputNode(...)
Returns: The primary output node (GroupNode) of the composition version.
Input
getPrimaryOutputNodeInput(...)
Returns: The input socket (Input) of the primary output node of the composition version.
[Node]
getRenderedResults(...)
Returns: A list of rendered result nodes for the composition version.
List of Node.
getSelectedNodes(...)
Returns: The nodes from this composition that are selected in the Toxik UI.
[Node]
getToolNodes(...)
Returns: A list of all the tool nodes (ToolNode) or super tool group nodes (GroupNode) in the composition version, regardless of the group level.
 
relocateExternalDependencies(...)
Relocates certain types of external dependencies in the composition version.
 
revertToDefault(...)
Reverts the composition version to its default initial state; an empty graph with default settings and no external dependencies (paint strokes).
 
revertToGraph(...)
Reverts the composition version to the given Graph.
 
setComponents(...)
Sets the number of components in the images of the primary output node (if no outputName argument is specified) or the named output node.
 
setDepth(...)
Sets the bit depth of each channel of the image for the primary output node (if no outputName argument is specified) or the named output node.
 
setDescription(...)
Sets the description (comment) of the version.
 
setEnd(...)
Sets the end time index of the primary output node or the named output node.
 
setFileFormat(...)
Sets the file format to be used when rendering to files.
 
setFileFormatOptions(...)
Sets the xml file format options to be used when rendering to files.
 
setFileName(...)
Sets the file name pattern to be used when creating image files while rendeing.
 
setHeight(...)
Sets the height of the images produced by the primary output node (if no output name argument is specified), or the named output node.
 
setImageRatio(...)
Sets image ratio (width/height ratio taking the pixel ratio into account) as a (numerator, denominator) tuple (2 integers) for the primary output node (if outputName is unspecified) or a named output node.
 
setMarkIn(...)
Sets the composition version mark in frame index.
 
setMarkOut(...)
Sets the composition version mark out frame index.
 
setPixelRatio(...)
Sets pixel aspect ratio of the image for the primary output node (if no outputName argument is specified) or the named output node, as a (numerator, denominator) tuple.
 
setPrimaryOutputNode(...)
Sets the primary output node of the composition version to the given output node.
 
setRate(...)
Sets the frame rate of the primary output node (if no outputName argument is specified) or the named output node, as a (numerator, denominator) integer tuple.
 
setRenderEnabled(...)
Sets whether rendering is enabled on the primary output node or the named output node.
 
setRepeatMode(...)
Sets the composition version repeat mode.
 
setRole(...)
Sets the role of the composition version.
 
setSource(...)
Sets the source of the composition version.
 
setStart(...)
Sets the start time index of the primary output node or the named output node.
 
setWidth(...)
Sets the width of the images produced by the primary output node (if no output name argument is specified), or the named output node.
 
setWiretapClipName(...)
Sets the wiretap clip name pattern to use when rendering into a wiretap clip.
 
setWiretapEnabled(...)
Sets whether rendering into a wiretap clip is enabled on the primary output node or the named output node.
 
setWiretapPath(...)
Sets the wiretap path to use when rendering into a wiretap clip.

Inherited from GraphRO: __cmp__, __init__, __reduce__, getComponents, getComposition, getDepth, getDescription, getDuration, getEnd, getExternalDependencies, getFileFormat, getFileFormatOptions, getFileName, getHeight, getId, getImageRatio, getMarkIn, getMarkOut, getName, getPaintStrokesFolder, getPath, getPixelRatio, getRate, getRenderEnabled, getRepeatMode, getRole, getSource, getStart, getWidth, getWiretapClipName, getWiretapEnabled, getWiretapPath, isReadOnly

Inherited from Boost.Python.instance: __new__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

findOutput(...)

 
Parameters:
  • socketId (int)
Returns: Output
The socket matching the argument socket ID in the composition version.

getAllNodes(...)

 
Returns: [Node]
A list of all the nodes in the composition version, regardless of the group level.

getGroup(...)

 
Returns: GroupNode
The topmost group node of the composition version.

getNodeById(...)

 
Parameters:
  • nodeId (int)
Returns: Node
The Node corresponding to the argument nodeId in the composition version. If no such node exists, returns None.

getNodesByTool(...)

 
Parameters:
  • tool (Tool or str) - Tool or tool name.
Returns: [Node]
A list of all the tool nodes (ToolNode) or super tool group nodes (GroupNode) matching the specified Tool or tool name in the composition version, regardless of the group level.

getOutputNodes(...)

 
Returns: [GroupNode]
The list of output nodes (GroupNode) in the composition version.

getPrimaryOutputNode(...)

 
Returns: GroupNode
The primary output node (GroupNode) of the composition version.

getPrimaryOutputNodeInput(...)

 
Returns: Input
The input socket (Input) of the primary output node of the composition version.

getRenderedResults(...)

 
Returns: [Node]
A list of rendered result nodes for the composition version.

getSelectedNodes(...)

 
Returns: List of Node.
The nodes from this composition that are selected in the Toxik UI. The returned list is empty if no nodes are selected or if there's no Toxik UI.

getToolNodes(...)

 
Returns: [Node]
A list of all the tool nodes (ToolNode) or super tool group nodes (GroupNode) in the composition version, regardless of the group level. This is a subset of the list returned by getAllNodes().

relocateExternalDependencies(...)

 

Relocates certain types of external dependencies in the composition version.

For each external dependency files matching the specified types, the file path prefix is replaced with the first encountered substitution that matches.

Parameters:
  • substitution ([tuple] (old_path_prefix, new_path_prefix).) - An ordered list of tuple:
  • depTypes (int) - A combination of external dependency types (integer mask built from a binary OR of graph.ExternalDepType values) which defaults to graph.ExternalDepType.ALL_TYPES.

revertToGraph(...)

 

Reverts the composition version to the given Graph.

Parameters:

setComponents(...)

 

Sets the number of components in the images of the primary output node (if no outputName argument is specified) or the named output node.

Parameters:
  • outputName (str) - Optional argument specifying the output name.
  • nbComps (int)

setDepth(...)

 

Sets the bit depth of each channel of the image for the primary output node (if no outputName argument is specified) or the named output node.

Parameters:
  • outputName (str) - Optional argument specifying the output name.
  • depth (int)

setDescription(...)

 

Sets the description (comment) of the version.

Parameters:
  • desc (str) - Description.

setEnd(...)

 

Sets the end time index of the primary output node or the named output node.

Parameters:
  • outputName (str) - Optional argument specifying the output name.
  • index (int)

setFileFormat(...)

 

Sets the file format to be used when rendering to files.

Parameters:
  • outputName (str) - Optional argument specifying the output name.
  • name (str)

setFileFormatOptions(...)

 

Sets the xml file format options to be used when rendering to files.

Parameters:
  • outputName (str) - Optional argument specifying the output name.
  • options (str)

setFileName(...)

 

Sets the file name pattern to be used when creating image files while rendeing. The pattern can include substitution tokens.

Parameters:
  • outputName (str) - Optional argument specifying the output name.
  • pattern (str)

setHeight(...)

 

Sets the height of the images produced by the primary output node (if no output name argument is specified), or the named output node.

Parameters:
  • outputName (str) - Optional argument specifying the output name.
  • height (int)

setImageRatio(...)

 

Sets image ratio (width/height ratio taking the pixel ratio into account) as a (numerator, denominator) tuple (2 integers) for the primary output node (if outputName is unspecified) or a named output node.

Setting the image ratio changes the pixel aspect ratio given the current image size and the specified image ratio.

Parameters:
  • outputName (str) - Optional argument specifying the output name.
  • imageRatio (tuple) - (numerator, denominator) integer tuple that specifies the image ratio.

setMarkIn(...)

 

Sets the composition version mark in frame index.

Parameters:
  • frameIndex (int)

setMarkOut(...)

 

Sets the composition version mark out frame index.

Parameters:
  • frameIndex (int)

setPixelRatio(...)

 

Sets pixel aspect ratio of the image for the primary output node (if no outputName argument is specified) or the named output node, as a (numerator, denominator) tuple.

Parameters:
  • outputName (str) - Optional argument specifying the output name.
  • pixelRatio (tuple) - (numerator, denominator) integer tuple

setPrimaryOutputNode(...)

 

Sets the primary output node of the composition version to the given output node.

Parameters:

setRate(...)

 

Sets the frame rate of the primary output node (if no outputName argument is specified) or the named output node, as a (numerator, denominator) integer tuple.

Parameters:
  • outputName (str) - Optional argument specifying the output name.
  • rate (tuple) - (numerator, denominator) integer tuple representing the frame rate.

setRenderEnabled(...)

 

Sets whether rendering is enabled on the primary output node or the named output node.

Parameters:
  • outputName (str) - Optional argument specifying the output name.
  • renderEnabled (bool)

setRepeatMode(...)

 

Sets the composition version repeat mode.

Parameters:

setRole(...)

 

Sets the role of the composition version. The role is an arbitrary string, but is typically set to a value returned by one of the following functions, defined at module level:

Parameters:
  • role (str) - The composition role.

setSource(...)

 

Sets the source of the composition version.

Parameters:
  • source (str)

setStart(...)

 

Sets the start time index of the primary output node or the named output node.

Parameters:
  • outputName (str) - Optional argument specifying the output name.
  • index (int)

setWidth(...)

 

Sets the width of the images produced by the primary output node (if no output name argument is specified), or the named output node.

Parameters:
  • outputName (str) - Optional argument specifying the output name.
  • width (int)

setWiretapClipName(...)

 

Sets the wiretap clip name pattern to use when rendering into a wiretap clip. The pattern can include substitution tokens.

Parameters:
  • outputName (str) - Optional argument specifying the output name.
  • pattern (str)

setWiretapEnabled(...)

 

Sets whether rendering into a wiretap clip is enabled on the primary output node or the named output node.

Parameters:
  • outputName (str) - Optional argument specifying the output name.
  • enabled (bool)

setWiretapPath(...)

 

Sets the wiretap path to use when rendering into a wiretap clip.

Parameters:
  • outputName (str) - Optional argument specifying the output name.
  • path (str)