Manages versions, provides a proxy API on an opened version, and
encapsulates the composition meta-data.
A Composition instance cannot be created using its constructor; it
must be obtained from one of the following factory functions: getComp,
openComp or createComp.
In Toxik, a composition is not opened, so there is no read-only versus
read-write distinction to make on a composition: all compositions are
editable, i.e. read-write. Composition versions (Graph
class) are the entities that are opened, so correspondingly read-only and
read-write open modes must be specified when opening a version.
If a version is held opened by the composition, the following
functions are available to access and modify it. If no version is held
opened by the composition, these functions will raise an exception.
They are identical in name and semantics to those in the Graph
class:
|
|
|
|
|
__init__(...)
Raises an exception This class cannot be instantiated from Python |
|
|
|
|
|
|
|
closeVersion(...)
If a version is held opened by the composition, it is closed. |
|
|
|
Graph
|
|
|
Graph
|
createAndOpenVersion(...)
Creates a new version from the working version or the version
specified by fromVersionName and opens it in the given mode. |
|
|
|
|
|
|
|
createVersion(...)
Creates a new version from the working version or the version
specified by fromVersionName. |
|
|
str
|
evaluateNextVersionName(...)
Returns:
The name of the next version that would be generated from the version
given as argument, using the project version naming convention. |
|
|
|
Output
|
findOutput(...)
Returns:
The socket matching the argument socket ID in the opened composition
version. |
|
|
[Node]
|
getAllNodes(...)
Returns:
A list of all the nodes in
the opened composition version, regardless of the group level. |
|
|
int
|
getComponents(...)
Returns:
The number of components in the images of the primary output node (if
no outputName argument is specified) or of the named output
node. |
|
|
int
|
getDepth(...)
Returns:
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. |
|
|
str
|
getDescription(...)
Returns:
The description (comment) of the composition. |
|
|
int
|
getDuration(...)
Returns:
Number of frames (int) in the primary output node or the
named output node. |
|
|
int
|
getEnd(...)
Returns:
The end time index of the primary output node or the named output
node. |
|
|
[str]
|
getExternalDependencies(...)
Returns:
The external dependencies of all versions as a list of
absolute paths (str) to the external files. |
|
|
str
|
getFileFormat(...)
Returns:
The name of the image file format that will be used to produce images
when rendering (e.g.: exr, tga, ...) |
|
|
str
|
getFileFormatOptions(...)
Returns:
File format options (in the form of an XML string) for the file
format specified with 'getFileFormat' |
|
|
str
|
getFileName(...)
Returns:
File format options (in the form of an XML string) for the file
format specified with 'getFileFormat' |
|
|
|
GroupNode
|
getGroup(...)
Returns:
The topmost group node of the opened version. |
|
|
int
|
getHeight(...)
Returns:
Height of the images produced by the primary output node (if no
output name argument is specified), or the named output node. |
|
|
str
|
getId(...)
Returns:
The composition uuid string. |
|
|
tuple
|
getImageRatio(...)
Returns:
The image ratio (width/height ratio taking the pixel ratio into
account) as a (numerator, denominator)
tuple (2 integers) for the primary output node or a
named output node. |
|
|
|
Graph
|
getLatestVersion(...)
Returns:
The latest version (an object of type Graph)
opened in the specified mode (read-write by default). |
|
|
str
|
|
int
|
getMarkIn(...)
Returns:
The opened composition version mark in. |
|
|
int
|
getMarkOut(...)
Returns:
The opened composition version mark out. |
|
|
str
|
getName(...)
Returns:
The name of the composition. |
|
|
int
|
|
|
Node
|
getNodeById(...)
Returns:
The Node corresponding to the argument nodeId in
the opened 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 opened composition version, regardless of the group
level. |
|
|
|
|
getOpenVersion(...)
If a version is held opened by the composition, return it (object of
type Graph). |
|
|
[GroupNode]
|
|
str
|
getPaintStrokesFolder(...)
Returns:
The absolute path (str) to the folder containing paint
strokes files for the opened composition version. |
|
|
str
|
getPath(...)
Returns:
The path of the composition. |
|
|
tuple
|
getPixelRatio(...)
Returns:
The 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. |
|
|
|
GroupNode
|
|
|
Input
|
|
|
Graph
|
getPrimaryVersion(...)
Returns:
The primary version (an object of type Graph)
opened in the specified mode (read-write by default). |
|
|
str
|
|
tuple
|
getRate(...)
Returns:
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. |
|
|
bool
|
getRenderEnabled(...)
Returns:
True if rendering is enabled on the primary output node
or the named output node. |
|
|
[Node]
|
|
|
RepeatMode
|
getRepeatMode(...)
Returns:
The opened composition version repeat mode as a module-level RepeatMode class enumeration member. |
|
|
str
|
getRole(...)
Returns:
The role (str) of the opened composition version. |
|
|
|
List of Node.
|
getSelectedNodes(...)
Returns:
The nodes from the opened composition version that are selected in
the Toxik UI. |
|
|
str
|
getSource(...)
Returns:
The source of the opened composition version. |
|
|
int
|
getStart(...)
Returns:
The start time index of the primary output node or the named output
node. |
|
|
[Node]
|
getToolNodes(...)
Returns:
A list of all the tool nodes (ToolNode) or super tool group nodes (GroupNode) in the opened composition version,
regardless of the group level. |
|
|
|
Graph
|
getVersion(...)
Given a version name string, returns the version (an object of type
Graph) opened in the specified mode (read-write by
default). |
|
|
str
|
getVersionFolder(...)
Returns:
The absolute path (str) to the folder containing version
files for this composition. |
|
|
[str]
|
|
int
|
getVersionNumber(...)
Returns:
The version number associated with a named version. |
|
|
int
|
getWidth(...)
Returns:
Width of the images produced by the primary output node (if no
outputName argument is specified), or the named output node. |
|
|
str
|
|
bool
|
getWiretapEnabled(...)
Returns:
Boolean indicating whether rendering will export to wiretap. |
|
|
str
|
getWiretapPath(...)
Returns:
Path where the wiretap clip will be created when rendering. |
|
|
|
Graph
|
getWorkingVersion(...)
Returns:
The working version (an object of type Graph)
opened in the specified mode (read-write by default). |
|
|
|
|
openVersion(...)
Opens and returns the version given by the argument name in the
specified mode (read-write by default). |
|
|
|
|
|
|
|
|
|
|
|
|
|
revertToDefault(...)
Reverts the opened composition version to its default initial state;
an empty graph with default settings and no external dependencies
(paint strokes). |
|
|
|
|
|
|
|
|
|
|
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 composition. |
|
|
|
|
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. |
|
|
|
|
|
|
|
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 opened composition version mark in frame index. |
|
|
|
|
setMarkOut(...)
Sets the opened 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 opened composition version to the
given output node. |
|
|
|
|
setPrimaryVersion(...)
Sets the primary version to be the one with the argument name. |
|
|
|
|
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 opened composition version repeat mode. |
|
|
|
|
setRole(...)
Sets the role of the opened composition version. |
|
|
|
|
setSource(...)
Sets the source of the opened 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 Boost.Python.instance:
__new__
Inherited from object:
__delattr__,
__format__,
__getattribute__,
__hash__,
__reduce_ex__,
__repr__,
__setattr__,
__sizeof__,
__str__,
__subclasshook__
|