Media module.
This module exposes functionality that deals with external files: file
archiving and restoring, import and rendering (i.e. creating new
media).
str
|
importFiles(compositionPath,
files,
fileFormatOptions='',
pixelRatio=(0, 1),
rate=(0, 1),
depth=0,
startTime=None,
source='File',
unpremultiplyState=False,
unpreBgColor=None,
motionVectorInfo=None)
Imports the specified files into a composition. |
|
|
|
GroupNode
|
createImportNode(groupNode,
files,
name='',
fileFormatOptions='',
pixelRatio=(0, 1),
rate=(0, 1),
depth=0,
unpremultiplyState=False,
unpreBgColor=None,
motionVectorInfo=None)
Creates an "Image Import" node into the given group node
from the specified files and returns it. |
|
|
|
GroupNode
|
importToOutputNoFiles(groupNode,
files,
importName,
outputName,
start,
end,
width,
height,
pixelRatio,
rate,
depth,
comps,
comment='',
fileFormatOptions='',
unpremultiplyState=False,
unpreBgColor=None)
Creates an "Image Import" and an "Output" node
into the given group node from the specified files. |
|
|
|
|
archive(filePath,
components,
includeLinkedComps=False,
includeVersions=True,
externalDepTypes=0,
compress=False,
progressCallback=None)
Archives the specified components in a file specified by
filePath. |
|
|
[str]
|
restore(filePath,
destPath='',
externalDepTypes=autodesk_toxik.graph.ExternalDepType.ALL_TYPES,
externalDepRelocationCallback=None,
dbConflictCallback=None,
externalDepConflictCallback=None,
restoreErrorCallback=None,
xmlFileErrorCallback=None,
progressCallback=None)
Restores an archive from filePath. |
|
|
|
|
cacheOutputSocket(outputSocket,
start=None,
end=None,
resolutions=[0],
turnOnIR=False,
callback=None)
Caches the image results at the specified output socket. |
|
|
|
|
cache(compPath,
outputs=None,
rendered=False,
start=None,
end=None,
resolutions=[0],
turnOnIR=False,
callback=None)
Caches the primary version of the composition specified by
compPath. |
|
|
|
|
cacheVersion(version,
outputs=None,
rendered=False,
start=None,
end=None,
resolutions=[0],
turnOnIR=True,
callback=None)
Caches the given composition version. |
|
|
str
|
getLutXmlOptions(type,
gammaR=None,
gammaG=None,
gammaB=None)
Returns:
The XML str corresponding to the LUT type specified and
the gamma values when required. |
|
|
str
|
getCineonXmlOptions(mode,
gammaR=None,
gammaG=None,
gammaB=None,
cineonRefR=None,
cineonRefG=None,
cineonRefB=None,
linearRefR=None,
linearRefG=None,
linearRefB=None)
Returns:
The XML str corresponding to the Cineon LUT type
specified and the values when required. |
|
|
str
|
getRGBAChannelAssignmentsXmlOptions(nbChannels,
r=None,
g=None,
b=None,
a=None)
Returns:
The XML string representation of the specified RGBA channel
assignments, used in file import options. |
|
|
str
|
|
tuple
|
convertFrameCountToTimecodeDigits(frameCount,
frameRate,
nonDropRequested=False)
Returns:
A tuple of four numbers representing respectively hours,
minutes, seconds and frames. |
|
|
int
|
|
tuple
|
|
dict
|
getSupportedFormats(accessMode=autodesk_toxik.media.FormatAccessMode.ANY)
Gets the image file formats supported by Toxik in the specified
access mode. |
|
|
|
|
isFileExtensionSupported(ext,
accessMode=autodesk_toxik.media.FormatAccessMode.ANY)
Indicates whether the specified image file extension is supported by
Toxik in the specified access mode. |
|
|
str
|
getFullChannelName(view,
subChannel)
Concatenates the given channel view name and sub-channel name to get
the full channel name in a multi-channel image file |
|
|
|
ImageFormat
|
|
|
|
|
tuple
|
|
tuple
|
getImportNodeStartEnd(importNode)
Gets the start and end frames of images imported by the given
Image Import node (the end frame is exclusive). |
|
|
tuple
|
|
|
|
setImportNodeTimeParams(importNode,
markIn,
markOut,
timeOffset,
repeatMode,
lockDuration)
Sets the time parameters on the given Image Import node. |
|
|
|
|
archiveProject(...)
Archives a specified project to the specified archive file. |
|
|
|
|
archiveUser(...)
Archives a specified user to the specified archive file. |
|
|
bool
|
canImport(...)
Returns:
True if the specified file can be imported in Toxik. |
|
|
str
|
getChannelGroupAssignmentXmlOptions(...)
Returns:
The XML string representation of channel assignments based on a
channel group defined in the Toxik project settings, used in file
import options. |
|
|
str
|
getChannelViewAssignmentXmlOptions(...)
Returns:
The XML string representation of channel assignments based on a
channel view (the string before the last dot in an input channel
name), used in file import options. |
|
|
{str:[str]}
|
getImageFileChannels(...)
Returns:
The name of all the channels present into the given multi-channel
image file sequence classified by channel views. |
|
|
str
|
getImportCompositionName(...)
Returns:
The composition name that Toxik would import the given files or file
sequence into. |
|
|
str
|
getImportFolder(...)
Returns:
The name under which a new composition would be imported. |
|
|
dict
|
getSequences(...)
Returns:
A dict with sequence names as keys and sequence paths as
values. |
|
|
[str]
|
listArchiveContents(...)
Returns:
The contents of the specified archive file (a list of
strings). |
|
|
tuple
|
normalizePixelRatio(...)
Takes a pixel ratio as a float and normalizes it to a
known format based on the given width and height. |
|
|