hiero.core reference

hiero.core method and class details

class hiero.core.Annotation

Bases: core.Hiero.Python.SubTrackItem

Class for objects that can hold multiple stroke and/or text elements to provide annotation functionality.

Annotation is derived from SubTrackItem and thus Annotation objects can be placed and trimmed on VideoTrack

subtracks. Strokes and/or text can be added to an annotation by creating AnnotationStroke and/or AnnotationText

objects and using addElement().

addElement

self.addElement() -> Adds the specified AnnotationElement, which should be an instance of an AnnotationElement sub-class, i.e. either

an AnnotationStroke or an AnnotationText object.

@return: If there was no error, returns the added element.

addToNukeScript(script, offset=0, inputs=0, cliptype=None)
elements

self.elements() -> returns a tuple with all of the elements contained in this annotation.

@return: tuple of hiero.core.Element sub-class objects

toString

self.toString() -> returns a description of the object. Equivalent to str(object).

@return: string

class hiero.core.AnnotationElement

Bases: Shiboken.Object

Base class for types of elements that may be added to an Annotation.

This class shold not be used directly and AnnotationElement objects should not be created.

color

self.color() -> returns a tuple containing the color for this annotation element in the form (red, green, blue, alpha),

with the components represented as floating point values in the range [0, 1].

@return: tuple of (red, green, blue, alpha)

isNull
setColor

self.setColor() -> None

Sets the color and alpha of the element.

Each component must be a floating point value in the range [0, 1].

@param red: The new red component.

@param green: The new green component.

@param blue: The new blue component.

@param alpha: The new alpha component.

toString

self.toString() -> string

Returns a description of the object. Equivalent to str(object).

@return: A string describing the object.

class hiero.core.AnnotationStroke

Bases: core.Hiero.Python.AnnotationElement

A class, derived from AnnotationElement, storing a set of 2d points to represent a single stroke

within an annotation.

isNull
lineWidth
points

self.points -> Returns a variable tuple containing the 2d points forming the stroke. Each point is

represented as a 2 component tuple, with the x and y components of the point as floating point values.

@return: tuple of 2 component tuples, each of the form (x, y)

setLineWidth
setPoints

self.setPoints -> Sets the points that make up this stroke, replacing any points the stroke already had.

The points must be specified as a list (not tuple) of 2d points, each point being a 2 component tuple of

floats or integers, e.g. [(100, 200), (123.456, 300)].

toString

self.toString() -> returns a description of the object. Equivalent to str(object).

@return: string

class hiero.core.AnnotationText

Bases: core.Hiero.Python.AnnotationElement

A class, derived from AnnotationElement, storing a single item of text within an annotation.

class HorizontalJustification

Bases: object

name
class AnnotationText.VerticalJustification

Bases: object

name
AnnotationText.box

self.box -> Returns a tuple containing the position and size of the text box, as floating point values.

The position is that of the box’s lower left corner.

@return: The text box position and size in the form (x, y, width, height)

AnnotationText.fontPath

self.fontPath() -> string

Returns the current font path for this annotation text object.

@return: A string containing the current font path.

AnnotationText.fontSize
AnnotationText.horizontalJustification

self.horizontalJustification

Returns the horizontal justification of the text.

@return: One of eHLeft, eHCenter, eHRight, eHJustify.

AnnotationText.isNull
AnnotationText.rotation

self.rotation -> float

Returns the rotation angle of the text, as a floating point value in degrees.

@return: The text’s rotation angle.

AnnotationText.setBox

self.setBox(x, y, width, height) -> None

Sets the text box for this annotation text object.

The text box determines the position and layout of the text (the layout also being affected

by the alignment). The size of the text box does not affect the size of the glyphs that make up

the text, that’s determined by the font size - see setFontSize() and fontSize().

@param x: The new x-component of the bottom left corner of the text box, before any rotation.

@param y: The new y-component of the bottom left corner of the text box, before any rotation.

@param width: The new width of the text box.

@param height: The new height of the text box.

AnnotationText.setFontPath

self.setFontPath() -> None

Sets the path to the file from which to load the font for use with this annotation text object.

AnnotationText.setFontSize
AnnotationText.setHorizontalJustification

self.setHorizontalJustification -> None

Set the horizontal justification of the text.

@param justify: One of eHLeft, eHCenter, eHRight, eHJustify.

AnnotationText.setRotation

self.setRotation -> None

Sets the rotation angle of the text, with a floating point value, replacing the previous angle.

@param rotation: The new rotation angle, in degrees.

AnnotationText.setText

self.setText() -> None

Sets the text for this annotation text object.

@param text: The new text string.

AnnotationText.setVerticalJustification

self.setVerticalJustification -> None

Set the vertical justificaiton of the text.

@param justify: One of eVBaseline, eVTop, eVCenter, eVBottom.

AnnotationText.text

self.text() -> string

@return: A string containing the current text for this annotation text object.

AnnotationText.toString

self.toString() -> returns a description of the object. Equivalent to str(object).

@return: string

AnnotationText.verticalJustification

self.verticalJustification

Returns the vertical justification of the text.

@return: One of eVBaseline, eVTop, eVCenter, eVBottom.

class hiero.core.ApplicationSettings

Bases: Shiboken.Object

Helper object to set and get application settings.

boolValue

self.boolValue(key, defaultValue) -> returns the previously stored value as True or False, named by the key parameter, or the defaultValue parameter

self.boolValue(key) -> returns the previously stored value as True or False, named by the key parameter, or the default value as configured (if configured) by the Hiero code. Use this method if you’re looking up a value used by Hiero internally.

Note: use self.value(key, defaultValue) if you just want to retrieve a string setting

@param key: string name of the value to retrieve

@param defaultValue: the value to return if this setting hasn’t been saved before. Does not save the value to the default.

@return: string

setBoolValue

self.setBoolValue(key, value) -> saves the value as True or False with the application’s settings using the key

@param key: string name of the value to retrieve

@param value: the bool (True or False) value to save.

setValue(name, value)

self.setValue(key, value) -> saves the value with the application’s settings using the key

@param key: string name of the value to save

@param value: the value to store

value(name, defaultValue=None)

self.value(key, defaultValue=None) -> returns the previously stored string value named by the key parameter, or the defaultValue parameter

@param key: string name of the value to retrieve @param defaultValue: the value to return if this setting hasn’t been saved before. Does not save the value to the default @return: string, unless the defaultValue is set, in which case, the return value will be the same type as the defaultValue (string, int or bool)

class hiero.core.AudioTrack

Bases: core.Hiero.Python.TrackBase

Object for manipulating audio tracks.

addTag

self.addTag(tag) -> adds a tag to the audio track item.

@param tag: the Tag to add to the audio track

@return: Tag object

addTrackItem

self.addTrackItem(clip, audioChannel, position) -> if the first parameter is a Clip object, the second and third parameters must be specified and this method creates a new track item with the specified audio channel and adds it to this audio track at the given position.

If the first parameter is a TrackItem, then this method just adds the track item specified.

This method will cut or delete track items that overlap with the one being added.

This method can only be called if the track has already been added to a Sequence.

@param clip: a Clip object or a TrackItem object, to add to this audio track.@param audioChannel: int; audio channel that will be associated with the track item. Do not specify if clip is a TrackItem.@param position: int; insert position. Do not specify if clip is a TrackItem.@return: TrackItem object

clone(*args, **kwargs)

self.clone() -> returns a deep copy of this object.

@return: AudioTrack object

WARNING - DEPRECATED ( clone ): This method is deprecated and will not be present in future versions of the Python API. This method has been replaced by copy().

copy

self.copy() -> returns a deep copy of this object.

@return: AudioTrack object

createTrackItem

self.createTrackItem(name) -> creates a new track item.

@param name: the name of the new track item

@return: TrackItem object

items

self.items() -> returns a tuple with all of the track items contained by this track.

@return: tuple of TrackItem objects

parent

self.parent() -> returns the sequence that contains this track.

@return: Sequence object

removeTag

self.removeTag(tag) -> removes the tag from the audio track.

@param tag: Tag object

toString

self.toString() -> returns a description of the object. Equivalent to str(object).

@return: string

trackIndex
class hiero.core.BackgroundRenderObserver

Bases: Shiboken.Object

Observer of background renders.

isNull
onFrameRenderCancelled
onFrameRenderError
onFrameRenderInProgress
onFrameRenderQueued
onFrameRendered
onRenderQueued
class hiero.core.Bin

Bases: Shiboken.Object

Container object for BinItem objects (wrapping Clip and Sequence objects) and other Bin objects.

class ItemType

Bases: object

name
Bin.addItem

self.addItem(object) -> adds the item to the bin object.

@param object: Bin, BinItem, or Tag object, to be added as a sub item of the bin object@return: Added object

Bin.bins

self.bins() -> returns a tuple with all of the sub bins contained by this object.

@return: tuple of Bin objects

Bin.clips

self.clips() -> returns a tuple with all of the BinItem’s containing clips contained by this bin.

@return: tuple of BinItem objects

Bin.color

self.color() -> Get the bin display color, or an invalid QColor if not set.

@return: PySide2.QtGui.QColor

Bin.createClip(*args, **knobs)

self.createClip(path, **knobs) -> Construct a clip from a path and optional knob values, and add it to the bin.

@path: path to use, may contain expressions

@knobs: keyword args for specifying additional knobs to set

@return: the created Clip

Bin.displayColor

self.displayColor() -> Returns the bin’s color if one is set, otherwise returns the preference color associated with this bin.

@return: PySide2.QtGui.QColor

Bin.importFolder

self.importFolder(path) -> imports the media in the path into this bin (needs a project).

@param path: path to the media to import

@return Bin: returns the bin created for imported media

Bin.importSequence

self.importSequence(filename, timeBase=None, frameRate=None, dropFrame=False) -> imports the sequence stored in filename into this bin (needs a project). If the timebase/frame rate for the sequence isnot specified, the project defaults will be used.

@param filename: path to the file to import the sequence from

@param timeBase: optional argument of type TimeBase specifying the timebase for the created sequence

@param frameRate: optional float argument specifying the frame rate for the created sequence

@return: Sequence the created sequence

Bin.isNull

self.isNull() -> returns True if the object is invalid.

@return: True or False

Bin.items

self.items(typeFilter) -> returns a tuple with all of the objects contained by this bin, filtered by the typeFilter argument, if supplied.

@param typeFilter: combination of Bin.ItemType flags

@return: tuple of BinItem objects

Bin.name

self.name() -> returns the name of the bin.

@return: True or False

Bin.numChildren

self.numChildren() -> returns the number of child objects contained by this bin.

@return: int

Bin.parentBin

self.parentBin() -> returns the bin that contains this object.

@return: Bin object

Bin.project

self.project() -> returns the Project object that this is attached to, or None if the object is not attached to a project.

@return: Project object

Bin.reconnectMedia

self.reconnectMedia(path) -> For any Clips or Sequences in the bin, reconnects media found in the specified path.

@param path: path containing media to reconnect to

Bin.removeItem

self.removeItem(object) -> removes the item from the bin object. If the object is not a child item of the bin object, throws an exception.

@param object: Bin, BinItem, or Tag object to be removed as a sub item of the bin object

Bin.sequences

self.sequences() -> returns a tuple with all of the BinItem’s containing sequences contained by this bin.

@return: tuple of BinItem objects

Bin.setColor

self.setColor(color) -> Set the bin display color.

@param color: the color to set, as a PySide2.QtGui.QColor, a string (e.g. ‘#ff0000’) or an integer containing the RGB components (e.g. 0x11aa33).

Bin.toString

self.toString() -> returns a description of the object. Equivalent to str(object).

@return: string

class hiero.core.BinItem

Bases: Shiboken.Object

Generic object wrapper with shared functionality for sequences and clips.

activeItem

self.activeItem() -> returns the item contained by this bin item.

@return: Clip or Sequence object

activeVersion

self.activeVersion() -> gets the currently active Version object of the bin item.

@return: Version object

addSnapshot

self.addSnapshot(comment) -> adds a new snapshot for the object, with a comment.

self.addSnapshot(sequence, comment) -> adds a new snapshot for the object, using the sequence as the new snapshot, setting the comment.

@param comment: a comment string to set on the snapshot

@param sequence: a Sequence object to create the Snapshot from

@return: Snapshot object

addVersion

self.addVersion(version) -> adds the version parameter to the bin item.

@param version: Version object for the new version

@param position: position at which the new Version must be inserted, if -1 then insert at end@return: Version object

clone(*args, **kwargs)

self.clone() -> returns a deep copy of this object.

@return: BinItem object

WARNING - DEPRECATED ( clone ): This method is deprecated and will not be present in future versions of the Python API. This method has been replaced by copy().

color

self.color() -> Get the bin item display color, or an invalid QColor if not set.

@return: PySide2.QtGui.QColor

copy

self.copy() -> returns a deep copy of this object.

@return: BinItem object

createClipVersion(*args, **knobs)

self.createClipVersion(position, path, **knobs) -> Construct a clip from a path and optional knob values, and add it as a new version. Raises RuntimeError if creating the clip fails or the path already exists as a version.

@position: position at which the new Version must be inserted, if -1 then insert at end

@path: path to use, may contain expressions

@knobs: keyword args for specifying additional knobs to set

@return: the created Version

displayColor

self.displayColor() -> Returns the item’s color if one is set, otherwise returns the preference color associated with this item type.

@return: PySide2.QtGui.QColor

hasVersion

self.hasVersion(index) -> checks if a given version exists and is valid.

@param index: index of the version to check for

@return: True or False

isClipVersion

self.isClipVersion(index) -> checks if a given clip belongs to this BinItem as a version.

@param clip: Clip to look for

@return: True or False

isNull

self.isNull() -> returns True if the object contains a invalid Sequence or Clip object.

@return: True or False

items

self.items() -> returns a tuple containing all of the different versions of this object.

@return: tuple of Version objects

maxVersion

self.maxVersion() -> finds the maximum (last) version and sets it as the active version on this bin item and any linked TrackItems. Offline versions and hidden versions will be ignored during the search.

@return: Version object

minVersion

self.minVersion() -> finds the minimum (first) version and sets it as the active version on this bin item and any linked TrackItems. Offline versions and hidden versions will be ignored during the search.

@return: Version object

name

self.name() -> returns the name of the item.

@return: string

nextVersion

self.nextVersion() -> finds the next version and sets it as the active version on this bin item and any linked TrackItems. Offline versions and hidden versions will be ignored during the search.

@return: Version object

numSnapshots

self.numSnapshots() -> returns the number of snapshots that this bin item has.

@return: int

numVersions

self.numVersions() -> returns the number of versions for this bin item.

@return: int

parentBin

self.parentBin() -> returns the bin object that contains this bin item.

@return: Bin object

prevVersion

self.prevVersion() -> finds the previous version and sets it as the active version on this bin item and any linked TrackItems. Offline versions and hidden versions will be ignored during the search.

@return: Version object

project

self.project() -> returns the Project object that this object is attached to, or None if the object is not attached to a project.

@return: heiro.core.Project object

removeVersion

self.removeVersion(version) -> remove a version from the BinItem. The version must not currently be in use in the project.

@param version: Version object to be removed

restoreToSnapshot

self.restoreToSnapshot(index) -> adds a new snapshot for the object, with a comment.

@param index: index of the Snapshot to restore from. Generates an exception if the index is out of range

setActiveVersion

self.setActiveVersion(version) -> sets the active version to the version parameter.

@return: Version object

setActiveVersionIndex(*args, **kwargs)

self.setActiveVersionIndex(version) -> sets the currently active version by index.

@param index: index of the version to make active

@return: Version object

WARNING - DEPRECATED ( setActiveVersionIndex ): This method is deprecated and will not be present in future versions of the Python API. Version indices are no longer unique identifiers and should not be used as such. Please use BinItem.setActiveVersion() instead.

setColor

self.setColor(color) -> Set the bin item display color.

@param color: the color to set, as a PySide2.QtGui.QColor, a string (e.g. ‘#ff0000’) or an integer containing the RGB components (e.g. 0x11aa33).

setName

self.setName(name) -> set the name of the item.

snapshots

self.snapshots() -> returns a tuple of all of the snapshots contained by this object.

@return: tuple of Snapshot objects

toString

self.toString() -> returns a description of the object. Equivalent to str(object).

@return: string

version

self.version(index) -> gets a Version object for the version of the bin item specified by the index.

@param index: index of the version to get

@return: Version object

versionDown(*args, **kwargs)

self.versionDown() -> decrements the current/active version and returns the newly active Version object of the bin item.

@return: Version object

WARNING - DEPRECATED ( versionDown ): This method is deprecated and will not be present in future versions of the Python API. Only available versions can now be obtained from BinItem. To find new versions, please use hiero.core.VersionScanner. To obtain the next version, please use BinItem.prevVersion().

versionMaxAvailable(*args, **kwargs)

self.versionMaxAvailable() -> finds the highest version that is currently loaded and does not have missing or offline media and sets it as the active version on this bin item.

@return: Version object

WARNING - DEPRECATED ( versionMaxAvailable ): This method is deprecated and will not be present in future versions of the Python API. Only available versions can now be obtained from BinItem. This method has been replaced by BinItem.maxVersion().

versionMinAvailable(*args, **kwargs)

self.versionMinAvailable() -> finds the lowest version that is currently loaded and does not have missing or offline media and sets it as the active version on this bin item.

@return: Version object

WARNING - DEPRECATED ( versionMinAvailable ): This method is deprecated and will not be present in future versions of the Python API. Only available versions can now be obtained from BinItem. This method has been replaced by BinItem.minVersion().

versionNextAvailable(*args, **kwargs)

self.versionNextAvailable() -> finds the next (higher) version that is currently loaded and does not have missing or offline media and sets it as the active version on this bin item.

@return: Version object

WARNING - DEPRECATED ( versionNextAvailable ): This method is deprecated and will not be present in future versions of the Python API. Only available versions can now be obtained from BinItem. This method has been replaced by BinItem.nextVersion().

versionPrevAvailable(*args, **kwargs)

self.versionPrevAvailable() -> finds the prev (lower) version that is currently loaded and does not have missing or offline media and sets it as the active version on this bin item.

@return: Version object

WARNING - DEPRECATED ( versionPrevAvailable ): This method is deprecated and will not be present in future versions of the Python API. Only available versions can now be obtained from BinItem. This method has been replaced by BinItem.prevVersion().

versionUp(*args, **kwargs)

self.versionUp() -> increments the current/active version and returns the newly active Version object of the bin item.

@return: Version object

WARNING - DEPRECATED ( versionUp ): This method is deprecated and will not be present in future versions of the Python API. Only available versions can now be obtained from BinItem. To find new versions, please use hiero.core.VersionScanner. To obtain the next version, please use BinItem.nextVersion().

class hiero.core.Clip

Bases: core.Hiero.Python.SequenceBase

Object representing a clip.

Initialisation:

Clip(mediaSource)

Clip(mediaSource, first, last)

mediaSource may be a MediaSource object or a string containing the media path. If first and last are given, the Clip only plays frames within this range.

class LocalisationPolicy

Bases: object

name
class Clip.LocalizationPolicy

Bases: object

name
Clip.addAnnotationsToNukeScript(script, firstFrame, trimmed, trimStart=None, trimEnd=None)

Add the annotations inside a clip to a Nuke script. This is separated from Clip.addToNukeScript() so it’s easier to control where in the script the annotations are placed. The parameters are used to determine the frame range for the annotations.

Clip.addTag

self.addTag() -> adds the tag to the set of tags attached to the Clip.@param tag: the tag object to add

@return: Tag object

Clip.addTagToRange

self.addTagToRange(tag, inTime, outTime) -> adds the tag to the specified range of the Clip.@param tag: the tag object to add

@param inTime: from - time to add tag

@param outTime: to - time to add tag

@return: Tag object

Clip.addToNukeScript(script, additionalNodes=None, additionalNodesCallback=None, firstFrame=None, trimmed=True, trimStart=None, trimEnd=None, colourTransform=None, metadataNode=None, includeMetadataNode=True, nodeLabel=None, enabled=True, includeEffects=True, beforeBehaviour=None, afterBehaviour=None, project=None, readNodes={})

addToNukeScript(self, script, trimmed=True, trimStart=None, trimEnd=None)

Add a Read node to the Nuke script for each media sequence/file used in this clip. If there is no media, nothing is added.

@param script: Nuke script object to add nodes @param additionalNodes: List of nodes to be added post read @param additionalNodesCallback: callback to allow custom additional node per item function([Clip|TrackItem|Track|Sequence]) @param firstFrame: Custom offset to move start frame of clip @param trimmed: If True, a TimeClip node will be added to trim the range output by the Read node. The range defaults to the clip’s soft trim range. If soft trims are not enabled on the clip, the range defaults to the clip range. The range can be overridden by passing trimStart and/or trimEnd values. @param trimStart: Override the trim range start with this value. @param trimEnd: Override the trim range end with this value. @param colourTransform: if specified, is set as the color transform for the clip @param metadataNode: node containing metadata to be inserted into the script @param includeMetadataNode: specifies whether a metadata node should be added to the script @param nodeLabel: optional label for the Read node @param enabled: enabled status of the read node. True by default @param includeEffects: if True, soft effects in the clip are included @param beforeBehaviour: What to do for frames before the first ([hold|loop|bounce|black]) @param afterBehaviour: What to do for frames after the last ([hold|loop|bounce|black])

Clip.clone(*args, **kwargs)

self.clone() -> returns a deep copy of this object.

@return: Clip object

WARNING - DEPRECATED ( clone ): This method is deprecated and will not be present in future versions of the Python API. This method has been replaced by copy().

Clip.copy

self.copy() -> returns a deep copy of this object.

@return: Clip object

Clip.entityReference

self.entityReference() -> returns this clip’s asset management system entity reference.

@return: string

Clip.getAvailableOcioColourTransforms

self.getAvailableOcioColourTransforms() -> returns colour transform for the source media.

@return: string

Clip.getReadInfo(firstFrame=None)

Get information (filename and start at value) for any Read Node in this clip.

@param firstFrame: Custom offset to move start frame of clip

Clip.guid
Clip.hasError

self.hasError() -> check if the clip is in error state

Clip.hasMultipleViews

self.hasMultipleViews() -> returns true if the Clip has multiple views available for display given the current settings of the project it belongs to.

@return: bool

Clip.isLocalised

self.isLocalised() -> returns whether the clip is completely localised.

[DEPRECATION WARNING] function will be removed in Nuke 12 use ‘isLocalized’ instead.

@return: bool

Clip.isLocalizationOutdated

self.isLocalizationOutdated() -> Returns whether the source media has changed.

@return: bool

Clip.isLocalized

self.isLocalized() -> returns whether the clip is completely localized.

@return: bool

Clip.isNull

self.isNull() -> returns False if this is a valid Clip object, True otherwise.

@return: True or False

Clip.localisationPolicy

self.localisationPolicy() -> returns the localisation policy of the clip.

[DEPRECATION WARNING] function will be removed in Nuke 12 use ‘localizationPolicy’ instead.

@return: LocalisationPolicy

Clip.localisationProgress

self.localisationProgress() -> returns the localisation progress of the clip, where 0 is totally non-localised and 1 is completely localised.

[DEPRECATION WARNING] function will be removed in Nuke 12 use ‘localizationProgress’ instead.

@return: double

Clip.localizationPolicy

self.localizationPolicy() -> returns the localization policy of the clip.

@return: LocalizationPolicy

Clip.localizationPriority

self.localizationPriority() -> returns localization priority value which determines the order in which files are localized

@return: int

Clip.localizationProgress

self.localizationProgress() -> returns the localization progress of the clip, where 0 is totally non-localized and 1 is completely localized.

@return: double

Clip.mediaSource

self.mediaSource() -> returns the clip’s media source.

@return: MediaSource object

Clip.metadata

self.isNull() -> returns a copy of the clip’s metadata.

@return: hiero.core.Metadata object

Clip.numAudioTracks

self.numAudioTracks() -> returns number of audio tracks contained by this clip.

@return: int

Clip.numVideoTracks

self.numVideoTracks() -> returns number of video tracks contained by this clip.

@return: int

Clip.readNode

self.readNode() -> returns the Read node representing the Clip’s media

@return: nuke.Node

Clip.reconnectMedia

self.reconnectMedia(path) -> Reconnect the Clip with media found in the specified path.

@param path: path containing media to reconnect to

Clip.refresh

self.refresh() -> updates the clip if the source media has changed.

Clip.removeTag

self.removeTag(tag) -> removes the tag from the clip.

@param tag: Tag object

Clip.rescan

self.rescan() -> updates the clip and rescan the frame range if the source media has changed.

Clip.setCameraColourTransform

self.setCameraColourTransform(colourTransform) -> sets the camera colour transform for the source media.

@param colourTransform: Colour transform name

Clip.setEntityReference

self.setEntityReference(location) -> set this clip’s (asset management system) entity reference.

@param location: Asset management system’s string identifier for the entity.

Clip.setFrameRange

self.setFrameRange() -> Sets the clip frame range to the specified values.

Clip.setLocalisationPolicy

self.setLocalisationPolicy() -> sets the localisation policy to the clip.

[DEPRECATION WARNING] function will be removed in Nuke 12 use ‘setLocalizationPolicy’ instead.

@param localisationPolicy: localisation policy to apply to the clip

Clip.setLocalizationPolicy

self.setLocalizationPolicy( policy ) -> sets the localization policy to the clip.

@param policy: localization policy to apply to the clip

Clip.setLocalizationPriority

self.setLocalizationPriority( priority ) -> sets localization priority value which determines the order in which files are localized

@param: priority int

Clip.setSourceMediaColourTransform

self.setSourceMediaColourTransform(colourTransform) -> sets the input colour transform for the source media.

@param colourTransform: Colour transform name

Clip.sourceIn

self.sourceIn() -> returns the source in value for the clip.

@return: frame

Clip.sourceMediaColourTransform

self.sourceMediaColourTransform() -> returns colour transform for the source media.

@return: string

Clip.sourceOut

self.sourceOut() -> returns the source out value for the clip.

@return: frame

Clip.subTrackItems
Clip.views

self.views() -> get the list of views available for the clip. If it uses a path with %v/%V, this will return all the views for which media exists. If the source media contains multiple named views, it will return those (note this does not work for mov files). Otherwise returns an empty list.

return: list(str)

class hiero.core.ConformRule

Bases: Shiboken.Object

Represents a conform rule used by Hiero to make decisions when conforming. Can be derived from in order to make new conform rules.

class Type

Bases: object

name
ConformRule.activate

self.activate() -> adds this conform rule to the list of conform rules. Conform operations done after this call will use the rule.

ConformRule.appliesToTrackItems

self.appliesToTrackItems() -> should return True if this conform rule applies to track items.

@return: True or False; default implementation returns True

ConformRule.compare

self.compare(media, candidateMedia) -> should compare media against candidateMedia, and return True if they match, according to this conform rule.

The metadata contains the following keys which can be used for creating matching rules: Conformer.kUmid == ‘umid’ Conformer.kName == ‘name’ Conformer.kTapeName == ‘tapeName’ Conformer.kUrl == ‘url’ Conformer.kAudioChannels == ‘audioChannels’ Conformer.kDuration == ‘duration’ Conformer.kFramerate == ‘framerate’ Conformer.kFramerateIsNtsc == ‘framerateIsNtsc’ Conformer.kSamplerate == ‘samplerate’ Conformer.kMediaType == ‘mediaType’ Conformer.kMasterMediaType == ‘masterMediaType’ Conformer.kStartTime == ‘startTime’ Conformer.kTimecode == ‘timecode’ Conformer.kWidth == ‘width’ Conformer.kHeight == 'height'@return: True for a match, False otherwise; default implementation returns False

ConformRule.conformType

self.conformType() -> Get the conform types for which this rule can be used. The default is kConform.

@return: one of the constants kConform, kReconnect, kConformAndReconnect

ConformRule.deactivate

self.deactivate() -> removes this conform rule from the list of conform rules. Conform operations done after this call will not use the rule.

ConformRule.isNull

self.name() -> should return True if the conform rule is invalid.

@return: True for invalid, False otherwise

ConformRule.name

self.name() -> returns the name of the conform rule (which was passed to the object in it’s initializer).

@return: string

ConformRule.toString

self.toString() -> returns a description of the object. Equivalent to str(object).

@return: string

class hiero.core.Conformer

Bases: Shiboken.Object

Provides and interface for querying and setting the conform options, such as file pattern filters and active rules.

These options mirror those found in the conforming dialog box in the UI.

excludeNonOverlappingTimecode

self.excludeNonOverlappingTimecode() -> returns the state of the exclude non-overlapping timecode flag.

@return: True when media which does not have timecode overlapping track items is excluded from matching.

excludePatterns

self.excludePatterns() -> returns the list of file patterns that are excluded from source media searches.

By default this is empty.

@return: A list containing the file patterns excluded from source media searches.

includeAlreadyMatched

self.includeAlreadyMatched() -> returns the state of re-conform media flag.

@return: True when the tracks that already have media attached will be re-conformed.

includePatterns

self.includePatterns() -> returns the list of file patterns that are included in source media searches.

By default this is ‘*’, which includes all file types.

@return: A list containing the file patterns included in source media searches.

nativeRuleFiltering

self.nativeRuleFiltering() -> returns a dictionary with the names of the native conforming rules and whether they are enabled for conforming.

By changing the state of the flags for the rules and submitting the dictionary back to the Conformer the rules can be filterd out.

@return: A dictionary containing the enabled flag for each native rule, keyed by the rule name.

nativeRuleNames

self.nativeRuleNames() -> returns the list of names for the native rules.

This can be used to set rule filtering.

@return: A list containing the names for all of the conform rules built-in to Hiero.

pythonRuleFiltering

self.pythonRuleFiltering() -> returns a dictionary with the names of the Python conforming rules and whether they are enabled for conforming.

By changing the state of the flags for the rules and submitting the dictionary back to the Conformer the rules can be filterd out.

@return: A dictionary containing the enabled flag for each Python rule, keyed by the rule name.

pythonRuleNames

self.pythonRuleNames() -> returns the list of names for the registered Python rules.

This can be used to set rule filtering.

@return: A list containing the names for all of the conform rules that have been added through the Python API.

setExcludeNonOverlappingTimecode

self.setExcludeNonOverlappingTimecode( flag ) -> controls whether matching is done on media which does not have timecode which overlaps the track item.

setExcludePatterns

self.setExcludePatterns( filepatterns ) -> sets the list of file patterns to exclude from source media searches.

setIncludeAlreadyMatched

self.setIncludeAlreadyMatched( flag ) -> controls whether to re-connect tracks that already have media matched to them.

setIncludePatterns

self.setIncludePatterns( filepatterns ) -> sets the list of file patterns to include in source media searches.

setNativeRuleFiltering

self.setNativeRuleFiltering( ruleFiltering ) -> uses a dictionary keyed on the names of the native conforming rules to set whether each rule is enabled for conforming.

setPythonRuleFiltering

self.setPythonRuleFiltering( ruleFiltering ) -> uses a dictionary keyed on the names of the Python conforming rules to set whether each rule is enabled for conforming.

setUseBestTimecodeMatch

self.setUseBestTimecodeMatch( flag ) -> controls whether to accept the best timecode match if no rules match.

useBestTimecodeMatch

self.useBestTimecodeMatch() -> returns the state of the use best timecode match flag.

@return: True when the best timecode match will be accepted if no rules match.

class hiero.core.DataCollection

Bases: Shiboken.Object

Storage objects for key/value pairs. Generally used to store metadata.

dict

self.dict() -> returns a dictionary of key/value pairs. Can be used to iterate over the items in this collection.

@return: dict

hasKey

self.hasKey(key) -> returns True if the collection has a value for the key.

@param key: the key to look up

@return: True or False

keys

self.keys() -> returns keys in the collection.

@return: list of strings which are keys in the collection

readOnly

self.readOnly(key) -> returns True if the collection can be modified.

@return: True or False

setValue

self.setValue(key) -> sets the value of the key stored in this collection.

@param key: the key to look up

@param value: value to assign to key

toString

self.toString() -> returns a formatted list of the key/value pairs currently set on this object. Equivalent to str(object).

@return: string

value

self.value(key) -> returns the value of the key stored in this collection. Throws an exception if the key does not exist.

@param key: the key to look up

@return: string

class hiero.core.EffectTrackItem

Bases: core.Hiero.Python.SubTrackItem

Class representing an effect on a sequence. EffectTrackItem is derived from SubTrackItem and thus EffectTrackItem objects can be placed and trimmed on VideoTrack subtracks.

The effect’s node can be accessed with effect.node(), which can then be manipulated through the nuke Node API.To create effects, it is recommended you use the VideoTrack.createEffect() method.

Usage:

EffectTrackItem(effectType)

EffectTrackItem(effectType, timelineIn, timelineOut)

addToNukeScript(script, offset=0, inputs=1, cliptype=None, startHandle=0, endHandle=0, addLifetime=True)
clone

self.clone() -> returns a deep copy of this object but, unlike copy(), this clones the underlying Nuke node so that the knobs are shared.

copy
declone

self.declone() -> Declones the effect item. Has no effect if the item is not a clone.

isRetimeEffect()

Check if an EffectTrackItem applies a retime. Currently this only applies to TimeWarp effects.

isValid

self.isValid() -> Returns true if the effect item is in a valid state and position and false otherwise.

name()

self.name() -> Get the name of the effect’s node.

@return: string

node

self.node() -> Node

Get the node used to apply the effect.

@return: The effect node.

setName(name)

self.setName() -> Set the name of the effect’s node.

toString
class hiero.core.ExportStructure2

Bases: core.Hiero.Python.IExportStructure

ExportStructure2 is the implementation of the datastructure used to represent the export tree, each node within the tree is represented by an ExportStructureElement. Although this matches how the export presets are viewed in the UI, when it comes running an export, or persisting the structure, it is flattened into a list of paths and task presets.

exportRootPath()

Returns the exportRootPath, the root of the export into which the export structure is built

findElementsByPath(path)

Find the elements matching path. Returns a list.

flatten()

Return the hierarchy as a list of (path, preset) tuples

restore(sequence)

Restore the hierarchy from a list of (path, preset) tuples

rootElement()

Return the root element in this hierarchy. The root element is not included in the path generation

setExportRootPath(rootPath)

Set the exportRootPath, the root of the export into which the export structure is built

class hiero.core.ExportStructureElement(name, isFolder)

Bases: core.Hiero.Python.IExportStructureElement

ExportStructureElement represents a node within the export structure

addChild(child)

Add a child to this Element

addPathChangedCallback(callback)

Add a callback to be notified when the path of this element has changed, callbacks should take the arguments (oldPath, newPath).

child(index)

Return a child by index

childCount()

Return the number of children

childIndex(element)

Given a child element, identify and return the index of the child within the children array. Returns -1 if child not found.

children()

Return a list of children

clearChildren()

Clear all the children

createChildFolder(path)
createChildFromPreset(path, preset)

Create a child element from a path and existing preset

createChildTask(path)
findElementsByPath(path)

Search recursively through the element tree finding elements which match path. Returns a list.

fromXml(xml)

Build Child Elements from XML data

isLeaf()

Returns True if node is flagged as leaf and may not accept children

name()

Return the name of this Element

parent()

Return the parent element of this Element

path()

Return the path of this Element

pathChanged(oldPath)

Notify children and any observers that the element’s path has changed.

preset()

Return the preset assigned to this Element. May be None

removeChild(child)

Remove a child from this Element

setName(name)

Set the name of this element.

setPreset(preset)

Set the preset assigned to this Element. May be None

setPresetType(identifier)

setPresetType(self, identifier) @param identifier : Unique identifier from the Task which is used to associate the preset type

toXml()

Serialize Element and children to XML

class hiero.core.FlipbookManager

Bases: Shiboken.Object

Object for Flipbook manager

createClip

self.createClip(filepath) -> creates and return a flipbook clip for the defined filepath.

@return: Clip

createEffectItem

self.createEffectItem(effectType, timelineIn, timelineOut) -> creates and return a flipbook Soft Effect with defiend effectType,

covering the specified timeline in and out range.

@return: EffectTrackItem

createSequence

self.createSequence(framerate, outputformat) -> creates and returns a flipbook sequence with the defined framerate and ouput formar.

@return: Sequence

setWorkingSpace

self.setWorkingSpace(workingSpace) -> sets the colorspace to use as the working space.

@return: None

updateOCIOConfig

self.updateOCIOConfig(ocioConfigPath) -> updates the flipbook OCIO setting with the defined ocio config filename.

@return: None

class hiero.core.FolderTask(initDict)

Bases: hiero.core.FnExporterBase.TaskBase

Task which just creates an empty folder.

class hiero.core.FolderTaskPreset(name, properties)

Bases: hiero.core.FnExporterBase.TaskPresetBase

Preset which can be used for creating an empty folder.

class hiero.core.Format

Bases: Shiboken.Object

Object containing width, height, pixel aspect, and name of a Clip/Sequence format.

Initialisation:

Format(width, height, pixel_aspect, name)

Format(formatStr)

@param: width - the format’s width in pixels (integer)

@param: height - the format’s height in pixels (integer)

@param: pixel_aspect - the format’s pixel aspect ratio (float)

@param: name - the display name of the format (string)

@param: formatStr - the string representation of the format in the form returned by str(format)

Examples: F = Format(2048, F = Format(

addToNukeScript(script=None, resize='width', black_outside=True)

self.addToNukeScript(self, script, to_type) -> adds a Reformat node matching this Format to the specified script and returns the nuke node object. @param script: Nuke script object to add nodes to, or None to just generate and return the node. @param resize: Type of resize (use constants from nuke.ReformatNode, default is kResizeWidth). @parm black_outside: Value for the black_outside knob. @return: hiero.core.nuke.ReformatNode object

aspect

self.aspect() -> returns the aspect ratio of this format.

@return: float

cleanAperture

self.cleanAperture() -> returns a 4 element tuple with the rectangle (x1, y1, x2, y2) of the clean aperture.

@return: tuple

height

self.height() -> returns the height of this format.

@return: int

isValid

self.isValid() -> returns whether or not this format object has valid data.

@return: True or False

name

self.name() -> returns the name of this format.

@return: string

pixelAspect

self.pixelAspect() -> returns the pixel aspect ratio of this format.

@return: float

productionAperture

self.productionAperture() -> returns a 4 element tuple with the rectangle (x1, y1, x2, y2) of the production aperture.

@return: tuple

toString

self.toString() -> returns a description of the object. Equivalent to str(object).

@return: string

width

self.width() -> returns the width of this format

@return: int

class hiero.core.IExportStructure

Bases: Shiboken.Object

childElement
exportRootPath
rootElement
setExportRootPath
class hiero.core.IExportStructureElement

Bases: Shiboken.Object

addChild
child
childCount
childIndex
clearChildren
createChildFolder
createChildTask
fromXml
isLeaf
name
parent
path
preset
removeChild
setName
setPreset
setPresetType
toXml
class hiero.core.IExporterRegistry

Bases: Shiboken.Object

IExporterRegistry provides a simple interface for our C++ Application to access python instance of hiero.core.TaskRegistry.

This class should not be used directly; use hiero.core.TaskRegistry instead.

assignPresetToProject

self.assignPresetToProject(hiero.core.TaskPreset, hiero.core.Project) -> Called by the C++ application to assign a TaskPreset to .

a null Project will remove the project assignment and revernt the preset to local ownership.

@param: hiero.core.TaskPreset@param: Project

copyAndAddProcessorPreset

self.copyAndAddProcessorPreset() -> Called by the C++ application to duplicate a preset.

@param: hiero.core.TaskPreset instance for duplication@return: new hiero.core.TaskPreset instance

copyAndAddProjectPreset

copyAndAddProjectPreset() -> Called by the C++ application to duplicate a preset and assign it to a new project.

@param: hiero.core.TaskPreset instance for duplication@param: Project to which cloned preset should be assigned@return: new hiero.core.TaskPreset instance

createAndAddProcessorPreset

self.createAndAddProcessorPreset(string, hiero.core.TaskPreset) -> Called by the C++ application to create a new preset, using typetemplate as a template.

@param: string - Preset name@return: hiero.core.TaskPreset instance as type template

createAndExecuteProcessor

self.createAndExecuteProcessor(hiero.core.TaskPreset, [hiero.core.ItemWrapper], string) -> Called by the C++ application to instantiate the Processor associated with specified preset and execute on the selected items.

@param: hiero.core.TaskPreset@param: list of items for export@param: name of submission object used for dispatching job to renderfarm

discardPresetChanges

self.startPresetChanges(hiero.core.Project) -> Discard any changes to the presets since startPresetChanges() was called.

@param: hiero.core.Project)

loadPresets

self.loadPresets(string) -> Called by the C++ application to load presets from a specified path.

@param: path as string

localPresets

self.projectPresets() -> Returns a list of local presets assigned to the specified Project.

@return: list of TaskPreset instances

localPresetsChanged

self.localPresetsChanged() -> Called by the C++ application to check whether local presets have changed since last save.

@return: bool changed state

nukeShotExportPresets

self.nukeShotExportPresets(hiero.core.Project) -> Get a list of presets which are contain Nuke shot exports.

@return: list of TaskPreset instances

presetFromXml

self.presetFromXml(string) -> Called by the C++ application to ask the TaskRegistry to deserialize a Task preset from xml.

@param: string - Preset XML@return: hiero.core.TaskPreset instance

presetToPrettyXml

self.presetToPrettyXml(hiero.core.TaskPreset) -> Called by the C++ application to ask the TaskRegistry to serialize a Task preset to human friendly formatted xml.

@param: hiero.core.TaskPreset instance@return: string - Preset XML

presetToXml

self.presetToXml(hiero.core.TaskPreset) -> Called by the C++ application to ask the TaskRegistry to serialize a Task preset to xml.

@param: hiero.core.TaskPreset instance@return: string - Preset XML

presetsSubDirectory

self.presetsSubDirectory() -> Get the sub-directory in the plugin paths to search for presets.

projectDuplicated

projectDuplicated(hiero.core.Project, hiero.core.Project) -> Called by the C++ application to notify the TaskRegistry that a project has been duplicated and its associated Presets should be duplicated and assigned to the new project.

@param: Project - original project

@param: Project - new project

projectExportHistoryXml

self.projectExportHistoryXml(hiero.core.Project) -> Returns a list of XML fragments containing the project export history.

@param hiero.core.Project: project

@return: list of strings

projectPresets

self.projectPresets(hiero.core.Project) -> Returns a list of project presets assigned to the specified Project.

@param: hiero.core.Project@return: list of TaskPreset instances

projectPresetsChanged

self.projectPresetsChanged(hiero.core.Project) -> Called by the C++ application to check whether project presets have changed since project last save.

@param: Project

projectUnloaded

self.projectUnloaded(hiero.core.Project) -> Called by the C++ application to notify the TaskRegistry that a project has been unloaded and its associated Presets should be released.

@param: Project

registerme

self.registerme() -> Called from python implimentation of TaskRegistry to register instance as the Application Task Registry.

removeProcessorPreset

self.removeProcessorPreset(hiero.core.TaskPreset) -> Called by the C++ application to remove a preset from the registry.

@param: hiero.core.TaskPreset

renameProcessorPreset

self.renameProcessorPreset(hiero.core.TaskPreset, string) -> Called by the C++ application to rename a preset in the registry.

@param: hiero.core.TaskPreset

restoreProjectExportHistoryXml

self.restoreProjectExportHistoryXml(hiero.core.Project, list) -> Restore the export history for a project.

@param hiero.core.Project: project

@param list: list of strings containing export history

revertDefaultPresets

self.revertDefaultPresets(string) -> Called by the C++ application reconstruct the default presets.

@param: path as string

savePresets

self.savePresets(string) -> Called by the C++ application to save presets to a specified path.

@param: path as string

startPresetChanges

self.startPresetChanges(hiero.core.Project) -> Called when the user might start editing the presets, so the changes can be reverted if necessary.

@param: hiero.core.Project)

submissionChanged

self.submissionChanged(string, hiero.core.Project) -> Called by the C++ application when the submission choice changes in the Export Dialog.

@param: submission name as a string

submissionNames

self.submissionNames() -> Called by the C++ application to get a list of the available Submission objects. Submission objects are used to manage render farm renders.

@return: list of name strings

validateExport

self.validateExport(hiero.core.TaskPreset, [hiero.core.ItemWrapper]) -> Called by the C++ application to determinate if preset and selected items have valid resolution according the application mode.

A warning message will be shown in case of any invalid output resolution.

@param: hiero.core.TaskPreset@param: list of items for export@return: An error string if disallowed, otherwise an empty string.

class hiero.core.ITask

Bases: Shiboken.Object

ITask provides a simple interface for our C++ Application to access Python instances of TaskBase.

This class should not be used directly; use hiero.core.TaskBase instead.

addToQueue

self.addToQueue() -> adds this task into the task queue.

children

self.children() -> get a list of child tasks. Note that this list should not change after addToQueue() has been called.

clearError

self.clearError() -> clears the error or warning string for this task.

destinationDescription

self.destinationDescription() -> Get the destination description.

error

self.error() -> Get the error string if one has been set.

finishTask

self.finishTask() -> called by Hiero to tell the Task to that it’s finished. Subclasses should finish processing in their override of this method (close files, clean up).

forcedAbort

self.forcedAbort() -> called by Hiero when the user presses the Abort button. Subclasses should do any clean up in their override of this method.

formatDescription

self.formatDescription() -> Get a description of the format that this task writes to.

getExportDuration

self.getExportDuration() -> Return the time this task took to export in milliseconds. Will return 0 until the task has finished exporting.

ident

self.ident() -> called by Hiero to get a unique identifier for this task.

progress

self.progress() -> called by Hiero to find out from the task what it’s progress is, between 0.0 and 1.0.

setDestinationDescription

self.setDestinationDescription(desc) ->

@param desc: string

setDuplicate

self.setDuplicate() -> Sets the flag cancelling this task and marking as duplicate.

setError

self.setError(desc) -> sets the error string displayed to the user in the task dialog. Error strings display in red.

@param desc: the text to display

setExportDuration

For internal use only. Do not use.

setFormatDescription

self.setFormatDescription(desc) -> tells Hiero a description of the format that this task writes to.

@param desc: description of the format that this task outputs

setSynchronous

self.setSynchronous() -> Flags this task as synchronous. When added to the queue, this task will be executed imediately on the current thread. The Flag must be set prior to adding to queue

setTaskDescription

self.setTaskDescription(description) -> tells Hiero a descriptive string for the task that it can use to show the user through the user interface and/or store it for reference. Helpful when debugging.

@param desc: description of the task

setWarning

self.setWarning(desc) -> sets the warning string displayed to the user in the task dialog. Warning strings display in orange.

@param desc: the text to display

startTask

self.startTask() -> called by Hiero to tell the Task to start. Subclasses should start processing in their override of this method.

synchronous

self.synchronous() -> Returns the state of the Synchronous flag. If True, wheb added to the queue, this task will be executed imediately on the current thread.

taskDescription

self.taskDescription() -> Get a description of the task.

taskStep

self.taskStep() -> called by Hiero repeatedly until the progress method returns 1.0 or greater. Step based processing should occur in this method by subclasses of Task.

class hiero.core.ITaskPreset

Bases: Shiboken.Object

ITaskPreset provides a simple interface for our C++ Application to access Python instances of TaskPreset.

This class should not be used directly; use hiero.core.TaskPresetBase instead.

class ItemTypes

Bases: object

name
ITaskPreset.getResolveEntryCount

self.getResolveEntryCount() -> called by Hiero to get the number of resolve tokens available on this TaskPreset.

ITaskPreset.ident

self.ident() -> called by Hiero to get a unique identifier for the Task related to this TaskPreset.

ITaskPreset.markedForDeletion

self.markedForDeletion() -> called by Hiero to check if the preset is marked for deletion.

ITaskPreset.name

self.name() -> called by Hiero to get the preset name.

ITaskPreset.project

self.project() -> called by Hiero to discover which Project (if any), this preset is assigned to

ITaskPreset.readOnly

self.readOnly() -> called by Hiero to discover if this preset is marked ReadOnly.

ITaskPreset.resolveEntryDescription

self.resolveEntryDescription() -> called by Hiero to get a resolve token description by index.

ITaskPreset.resolveEntryName

self.resolveEntryName() -> called by Hiero to get a resolve token ({shot}) by index.

ITaskPreset.setMarkedForDeletion

self.setMarkedForDeletion() -> called by Hiero to mark this preset for deletion. The delete is not performed until presets are saved.

ITaskPreset.setProject

self.setProject() -> called by Hiero to assign a preset to a Project.

ITaskPreset.setReadOnly

self.setReadOnly() -> called by Hiero to mark this preset as ReadOnly.

ITaskPreset.summary

self.summary() -> called by Hiero to get the preset description.

ITaskPreset.supportedItems

self.supportedItems() -> called by Hiero to establish what types of object this export task operates on (Clips, Sequences, TrackItems).

ITaskPreset.supportsAudio

self.supportsAudio() -> returns whether or not this task preset supports audio.

@return: True or False

class hiero.core.ItemWrapper

Bases: Shiboken.Object

bin

self.bin() -> converts this ItemWrapper to a Bin object. If the item wrapper isn’t wrapping a Bin object, it will return a non-functioning (isNull returns True) TrackItem object (meaning that it has all of the methods of a Bin object, but the methods don’t do anything)

@return: Bin object

binItem

self.binItem() -> converts this ItemWrapper to a BinItem object. If the item wrapper isn’t wrapping a BinItem object, it will return a non-functioning (isNull returns True) TrackItem object (meaning that it has all of the methods of a BinItem object, but the methods don’t do anything)

@return: BinItem object

clip

self.clip() -> converts this ItemWrapper to a Clip object. If the item wrapper isn’t wrapping a Clip object, it will return a non-functioning (isNull returns True) Clip object (meaning that it has all of the methods of a Clip object, but the methods don’t do anything)

@return: Clip object

ignore
isNull

self.isNull() -> returns True if this is a invalid or uninitialized item, or False otherwise

@return: True or False

item

self.item() -> Return the item contained within this wrapper.

@return: Sequence | Clip | TrackItemBase | BinItem

name

self.name() -> Returns item name.

@return: string

root

self.root() -> the root is the highest level in the bin selected for export, Root may be null.

@return: Bin object

sequence

self.sequence() -> converts this ItemWrapper to a Sequence object. If the item wrapper isn’t wrapping a Sequence object, it will return a non-functioning (isNull returns True) Sequence object (meaning that it has all of the methods of a Sequence object, but the methods don’t do anything)

@return: Sequence object

setTrackItemsForViews
trackItem

self.trackItem() -> converts this ItemWrapper to a TrackItemBase object. If the item wrapper isn’t wrapping a TrackItem object, it will return a non-functioning (isNull returns True) TrackItem object (meaning that it has all of the methods of a TrackItem object, but the methods don’t do anything)

@return: TrackItem object

trackItemsForViews
class hiero.core.Keys

Bases: Shiboken.Object

hiero.core.LUTGroup()
hiero.core.LUTs()

LUTs() -> returns a tuple with the names of all of the available luts.

@return: tuple of strings

class hiero.core.MediaFileInfo

Bases: Shiboken.Object

Object representing a single set of media files on disk.

endFrame

self.endFrame() -> returns the last frame of the media source contained by this object. Note that for video formats (mov, r3d), this will always be the media’s (duration - 1).

@return: integer frame

filename

self.filename() -> returns a path to a media source on disk. May represent multiple files, as with image sequences. The form will be one of the following, depending on the file extension of the media:

  • /somepath/file.mov
  • /somepath/imagesequence.######.dpx (1-40)

In the case of the image sequence above, the numbers between the brackets represent the first and last frame of the sequence.

@return: string

startFrame

self.startFrame() -> returns the first frame of the media source contained by this object. Note that for video formats (mov, r3d), this will always be 0.

@return: integer frame

class hiero.core.MediaSource

Bases: Shiboken.Object

Represents a media source.

class MediaType

Bases: object

name
MediaSource.associatedFilePaths

self.associatedFilePaths() -> Return a list of file paths associated with the ‘main’ file, this is used with r3d clips where there are multiple r3ds in sequence, or rmd files.

@return: list of path strings

MediaSource.createOfflineVideoMediaSource()

MediaSource.createOfflineVideoMediaSource() -> returns a media source that might be an offline video file. Use this to explicitly set what you expect the start, duration and framerate of the video source to be, once it becomes available.

Raises a RuntimeError if the source path exists but could not be read by Hiero.

@param path: path to where the media will eventually be

@param start: start of the media, in frames

@param duration: duration of the media, in frames

@param frameRate: TimeBase representing the frame rate of the media source

@param startTimecode: start timecode of the media

@return: Created MediaSource

MediaSource.duration

self.duration() -> returns the duration, in frames.

@return: frames

MediaSource.fileinfos

self.fileinfos() -> returns a tuple of MediaFileInfo objects, which can be used to retrieve all of the file fragments that are used by this MediaSource.

@return: tuple of MediaFileInfo objects

MediaSource.filename

self.filename() -> returns the file name (and just the file name) of the first file used for the MediaSource.

Deprecated; Please use the fileinfos() method instead.

@return: string

MediaSource.filenameHead

self.filenameHead() -> returns the portion of filename before the frame index for an image sequence.

@return: string

MediaSource.filenamePadding

self.filenameHead() -> returns the number characters used for frame index. -1 if not an image sequence.

@return: int

MediaSource.firstpath

self.firstpath() -> returns the full path of the first file used for the MediaSource.

Deprecated; Please use the fileinfos() method instead.

@return: string

MediaSource.fragmentFilename

self.fragmentFilename(fragmentIndex) -> returns the file name (and just the file name) for the fragment of the MediaSource, specified by the fragmentIndex.

Deprecated; Please use the fileinfos() method instead

@param fragmentIndex: index of the fragment to retrieve

@return: string

MediaSource.fragmentPath

self.fragmentPath(fragmentIndex) -> returns the full path for the fragment of the MediaSource, specified by the fragmentIndex.

Deprecated; Please use the fileinfos() method instead.

@param fragmentIndex: index of the fragment to retrieve

@return: string

MediaSource.hasAudio

self.hasAudio() -> True if the source has audio.

@return: True or False

MediaSource.hasVideo

self.hasVideo() -> True if the source has video.

@return: True or False

MediaSource.height

self.height() -> returns the height of the media.

@return: int

MediaSource.isMediaPresent

self.isMediaPresent() -> returns True if the media is present.

@return: True or False

MediaSource.isNull

self.isNull() -> True if the object points to an invalid source, False otherwise.

@return: True or False

MediaSource.isOffline

self.isOffline() -> returns True if the media is missing or unavailable for any reason.

@return: True or False

MediaSource.metadata

self.metadata() -> returns a hiero.core.Metadata object with metadata for the MediaSource.

@return: hiero.core.Metadata object

MediaSource.numChannels
MediaSource.numFragments

self.numFragments() -> returns the number of files used by this MediaSource, or -1 for invalid media. For instance, for mov files, this will return 1; for exr sequences this method will return the number of exr files in the sequence.

Deprecated; Please use the fileinfos() method instead.

@return: int

MediaSource.pixelAspect

self.pixelAspect() -> returns the pixel aspect ratio of the media.

@return: float

MediaSource.refresh

self.refresh() -> updates source info for latest changes in underlying files but doesn’t update the frame range

MediaSource.singleFile

self.singleFile() -> returns True if this MediaSource is comprised of only a single file regardless of how many frames it contains (like a .mov or .r3d).

@return: True or False

MediaSource.startTime

self.startTime() -> returns the start time of the media.

@return: int

MediaSource.timecodeStart
MediaSource.toString

self.toString(includeMetadata=False) -> returns a string with info for the MediaSource. str(object) is equivalent to object.toString().

@param includeMetadata: True adds metadata to the string, False does not

@return: string

MediaSource.width

self.width() -> returns the width of the media.

@return: int

class hiero.core.NamingScheme

Bases: Shiboken.Object

Utility object for extracting names for clips, versions and objects out of clip objects

clipName()

self.clipName(clip) -> extracts name from clip that will be used for displaying the clip object, based on the underlying file(s).

Redefine this method if desired for customized naming schema. Use default_clipName for default functionality if needed.

@param clip: a clip to extract the name from

@return: string

default_clipName()

self.default_clipName(clip) -> extracts name from clip that will be used for displaying the clip object, based on the underlying file(s).

Do not redefine this method. It preserves accessibility to default functionality when redefining clipName.

@param clip: a clip to extract the name from

@return: string

default_rootName()

self.default_rootName(clip) -> extracts name from clip that will be used for displaying the bin item object, based on the underlying file(s).

Do not redefine this method. It preserves accessibility to default functionality when redefining rootName.

@param clip: a clip to extract the name from

@return: string

default_trackItemName()

self.default_trackItemName(clip) -> extracts name from clip that will be used for naming track items when added to a sequence.

Do not redefine this method. It preserves accessibility to default functionality when redefining trackItemName.

@param clip: a clip to extract the name from

@return: string

default_versionName()

self.default_versionName(clip) -> extracts name from clip that will be used for displaying the version object, based on the underlying file(s).

Do not redefine this method. It preserves accessibility to default functionality when redefining versionName.

@param clip: a clip to extract the name from

@return: string

rootName()

self.rootName(clip) -> extracts name from clip that will be used for displaying the bin item object, based on the underlying file(s).

Redefine this method if desired for customized naming schema. Use default_rootName for default functionality if needed.

@param clip: a clip to extract the name from

@return: string

trackItemName()

self.trackItemName(clip) -> extracts name from clip that will be used for naming track items when added to a sequence.

Redefine this method if desired for customized naming schema. Use default_trackItemName for default functionality if needed.

@param clip: a clip to extract the name from

@return: string

versionName()

self.versionName(clip) -> extracts name from clip that will be used for displaying the version object, based on the underlying file(s).

Redefine this method if desired for customized naming schema. Use default_versionName for default functionality if needed.

@param clip: a clip to extract the name from

@return: string

class hiero.core.ProcessorBase(preset, submission, synchronous=False)

Bases: object

ProcessorBase is the base class from which all Processors should derive. The Processor object is responible for taking the object selection and spawning Tasks with the appropriate parameters.

errors()

Get an error string from the processor. Iterates over child tasks and adds their error messages to the string. Returns None if there were no errors.

processTaskPreQueue()

processTaskPreQueue() Walk Tasks in submission and mark any duplicates.

skipOffline()
startProcessing(exportItems, preview=False)

Generate export tasks and add them to the export queue. If preview is True, the tasks are created and returned, but not scheduled for execution.

validItem(supportedTypes, item)

Get if the task is able to run on the item it was initialised with.

class hiero.core.ProcessorPreset(parentType, presetName)

Bases: hiero.core.FnExporterBase.TaskPresetBase

ProcessorPreset is the base class from which all Processor Presets must derrive The purpose of a Processor Preset is to store and data which must be serialized to file and shared between the Processor and ProcessorUI user interface component

class hiero.core.Project

Bases: Shiboken.Object

Object for manipulating projects. Can be created using newProject() or by the following code:

hiero.core.openProject(projectPath)

project = hiero.core.projects()[-1]

class PosterFrameSetting

Bases: object

name
Project.addView

addView(name, color) -> Appends a view to this project’s list of views. Returns False if name is empty or a view already exists with the same name.

@param name: string

@param color: optional; string in the format #RGB, #RRGGBB, #RRRGGGBBB, #RRRRGGGGBBBB or a name from the list of colors defined in the list of SVG color keyword names

@return True or False

Project.audioTrackItems(partialName=None)

self.audioTrackItems(partialName) -> returns all audio track items in a project. @param partialName: optional string with partial name to match against. Will match if this string is anywhere in the name.

@return: an array of hiero.core.TrackItem objects.

Example: finds all audio track items in a project with 30Sec in the name:

trackItems = myProject.audioTrackItems(‘30Sec’)

Project.audioTracks(partialName=None)

self.audioTracks(partialName) -> returns all audio tracks in a project. @param partialName: optional string with partial name to match against. Will match if this string is anywhere in the name.

@return: an array of hiero.core.AudioTrack objects.

Example: finds all audio tracks in a project with 30Sec in the name:

tracks = myProject.audioTracks(‘30Sec’)

Project.beginUndo

self.beginUndo(name) -> starts a new undo action, which will group all other undo actions until self.endUndo() is called. Be aware that this method only works on the main thread, and will throw an exception otherwise.

Note that for operations inside the undo to work Project.endUndo() must be called. It is recommended that you use this in a with block to ensure that this happens. For example:

with project.beginUndo(‘My Undo’):

// Undoable edits

@return: UndoGroup object

Project.bins(partialName=None)

self.bins(partialName) -> returns all bins in a project. Searches recursively, so will return bins within other bins in the list. @param partialName: optional string with partial name to match against. Will match if this string is anywhere in the name.

@return: an array of hiero.core.Bin objects.

Example: finds all bins in a project with MyBin in the name:

bins = myProject.bins(‘MyBin’)

Project.buildTrackName

buildTrackName() -> get default track name used when building vfx trackthis can be configured in the project settings dialog

Project.cancelUndo

self.cancelUndo() -> cancels an undo action started previously by a call to self.beginUndo().

Project.clearUnusedLocalFiles

clearUnusedLocalFiles() -> clear all localised files that are not in any currently open project. This requires localisation to be enabled

Project.clips(partialName=None)

self.clips(partialName) -> returns all clips in a project. @param partialName: optional string with partial name to match against. Will match if this string is anywhere in the name.

@return: an array of hiero.core.Clip objects.

Example: finds all clips in a project with 30Sec in the name:

clips = myProject.clips(‘30Sec’)

Project.clipsBin

self.clipsBin() -> returns the bin object containing the top level clips, sequences and bins for this project.

@return: Bin object

Project.close

self.close() -> closes the project. Be aware that this method will not save the project, even if changes have been made since the last save of the project.

Project.customExportDirectory

self.customExportDirectory() -> Get the custom directory used for exports if useCustomExportDirectory() is set to True.

@return string

Project.deletable

self.deletable() -> returns True if the project can be deleted.

@return: True or False

Project.deleteView

deleteView(name) -> Removes the view with the matching name from this project’s list of views. Returns False if no matching view is found or if the view to be deleted is the only view in the project.

@param name: string

@return True or False

Project.editable

self.editable() -> returns True if the project can be edited.

@return: True or False

Project.endUndo

self.endUndo() -> ends an undo action started previously by a call to self.beginUndo(). This will put a new item into the Edit > Undo/Redo menu items.

Project.exportRootDirectory

self.exportRootDirectory() -> The root directory to use for exports. This will return either self.projectDirectory(True) or self.customExportDirectory() depending on the self.useCustomExportDirectory() setting.

@return string

Project.extractSettings()

self.extractSettings() -> returns a dict of the project’s settings. @return: dict

Project.framerate

framerate() -> project’s default framerate for new sequences

@return TimeBase

Project.guid
Project.heroView

heroView() -> Get the name of the hero view set on the project

@return str

Project.isLocalisationEnabled

isLocalisationEnabled() -> return whether localisation is enabled

@return whether localisation is enabled

Project.isNull

self.isNull() -> returns False if this is a valid Project object, True otherwise.

@return: True or False

Project.isRestricted

self.isRestricted() -> returns whether or not access to the project is restricted.

@return: True or False

Project.lutSetting16Bit

self.lutSetting16Bit() -> returns the project’s 16 bit lut setting name.

@return: string

Project.lutSetting8Bit

self.lutSetting8Bit() -> returns the project’s 8 bit lut setting name.

@return: string

Project.lutSettingFloat

self.lutSettingFloat() -> returns the project’s float lut setting name.

@return: string

Project.lutSettingLog

self.lutSettingLog() -> returns the project’s log lut setting name.

@return: string

Project.lutSettingViewer

self.lutSettingsViewer() -> returns the project’s viewer lut setting name.

@return: string

Project.lutSettingWorkingSpace

self.lutSettingWorkingSpace() -> returns the project’s Working Space lut setting name.

@return: string

Project.lutUseOCIOForExport

self.lutUseOCIOForExport() -> returns the project setting for using OCIO in nuke script export.

@return: bool

Project.name

self.name() -> returns the name of the project.

@return: string

Project.ocioConfigName

self.ocioConfigName() -> returns the ocio config name loaded by NukeStudio. When using a custom ocio config an empty string is returned.

@return: string

Project.ocioConfigPath

self.ocioConfigPath() -> returns the project settings for the ocio config path.

@return: string

Project.outputFormat

outputFormat() -> gets project’s default outputFormat for new sequences.@return Format

Project.path

self.path() -> returns the path to the project.

@return: string

Project.posterFrameSettings

posterFrameSettings() -> Get the poster frame settings used for clips added to the project.

@return tuple of poster frame setting and custom frame number

Project.projectDirectory

self.projectDirectory() -> Get the project directory used for resolving relative paths and the exportRootDirectory() (if useCustomExportDirectory() is False).

@param expanded: whether expressions in the path are expanded

@return string

Project.projectRoot

[DEPRECATION WARNING] Project.projectRoot() will be removed in Nuke 12, use exportRootDirectory() instead.

self.projectRoot() -> Get root path of the project used for exports by default.

@return: string

Project.redo

self.redo() -> triggers a redo of the next item in the redo stack. Only works on the main thread. If called from any other thread, throws an exception.

Project.redoItemText

self.redoItemText() -> returns the text of the next item on the redo stack. Only works on the main thread. Can be useful for testing that undo/redo works.

@return: string

Project.save

self.save() -> saves a previously saved project to disk.

Project.saveAs

self.saveAs(filename) -> saves the project to the path specified by the filename parameter. Throws an exception if the project couldn’t be saved for any reason.

@param filename: path to save the project to

Project.sequences(partialName=None)

self.sequences(partialName) -> returns all sequences in a project. User can filter by by partial name. @param partialName: optional string with partial name to match against. Will match if this string is anywhere in the name. @return: an array of hiero.core.Sequence objects.

Example: finds all sequences in a project with 30Sec in the name:

sequences = myProject.sequences(‘30Sec’)

Project.setCustomExportDirectory

self.setCustomExportDirectory() -> Set the custom directory used for exports if useCustomExportDirectory() is set to True.

@param path

Project.setDeletable

self.setDeletable(deletable) -> sets whether or not a project can be deleted.

@param deletable: True or False

Project.setEditable

self.setEditable(editable) -> sets whether or not a project can be edited.

@param editable: True or False

Project.setFramerate

setFramerate(TimeBase) -> sets project’s default framerate for new sequences.This will persist when the application is restarted

@param TimeBase

Project.setHasMigratedSequenceProperties

setHasMigratedSequenceProperties() -> Mark the project as having had deprecated sequence properties converted into soft effects.

Project.setLocalisationEnabled

setLocalisationEnabled() -> set whether localisation is enabled. This will persist when the application is restarted.

@param whether localisation should be enabled

Project.setOcioConfigPath

self.setOcioConfigPath(path) -> set the ocio config for the project

Project.setOutputFormat

setOutputFormat(Format) -> sets project’s default output format for new sequences.

setOutputFormat(width, height, pixelAspect, name) -> sets project’s default output format for new sequences. This will persist when the application is restarted

@param width: width for the output format@param height: height for the output format@param pixelAspect: float for pixel aspect ratio@param name: string for the format name

Project.setPosterFrameSettings

setPosterFrameSettings() -> Set the poster frame settings used for clips added to the project.

@param setting: the mode for setting poster frames

@param customFrame: the frame number if mode is set to ePosterFrameCustom

Project.setProjectDirectory

self.setProjectDirectory(string) -> Set the project directory used for resolving relative paths and the exportRootDirectory() (if useCustomExportDirectory() is False).

@param path: the path or expression to set

Project.setProjectRoot

[DEPRECATION WARNING] Project.setProjectRoot() will be removed in Nuke 12, use setProjectDirectory() or setCustomExportDirectory() instead.

self.setProjectRoot() -> Set root path of the project used for exports by default.

@param: path to set as project root

Project.setShotPresetName

self.setShotPresetName() -> set the name of Shot Preset which is usedwhen sending to nuke or creating a comp.

@param: name

Project.setShowViewColors

setShowViewColors() -> Set if colors set for views are shown in the UI.

Project.setStartTimecode

setStartTimecode(Time) -> sets project’s default start timecode for new sequences. This will persist when the application is restarted

@param TimeBase start timecode for sequence

Project.setTimeDisplayFormat

setTimeDisplayFormat() -> sets project’s default displayType for new sequences. This will persist when the application is restarted

@param DisplayType to use

Project.setTrackItemVersionsLinkedToBin

setTrackItemVersionsLinkedToBin(linked) -> Set whether track item versions are linked by default

Project.setUseCustomExportDirectory

self.setUseCustomExportDirectory() -> Set if the export root directory should be a custom directory, or use the project directory.

@param custom

Project.setViews

setViews(views) -> Set the project’s views.

@param views: this can be either a list of view names, or a list of tuples with (name, color)

Project.setViewsForStereo

setViewsForStereo() -> Replaces the project’s views with two views named “left” and “right”.

Project.shotPresetName

self.shotPresetName() -> get the name of Shot Preset which is usedwhen sending to nuke or creating a comp.

@return: string

Project.showViewColors

showViewColors() -> Get if colors set for views are shown in the UI.

Project.startTimecode

startTimecode() -> gets project’s default start frame for new sequences.@return Time

Project.tagsBin

self.tagsBin() -> returns the bin object containing the top level tags for this project.

@return: Bin object

Project.timeDisplayFormat

timeDisplayFormat() -> gets project’s default displayType for new sequences. @return DisplayType

Project.toString

self.toString() -> returns a description of the object. Equivalent to str(object).

@return: string

Project.trackItemVersionsLinkedToBin

trackItemVersionsLinkedToBin() -> Get whether track item versions are linked by default

Project.trackItems(partialName=None)

self.trackItems(partialName) -> returns all track items in a project. @param partialName: optional string with partial name to match against. Will match if this string is anywhere in the name.

@return: an array of hiero.core.TrackItem objects.

Example: finds all track items in a project with 30Sec in the name:

trackItems = myProject.trackItems(‘30Sec’)

Project.tracks(partialName=None)

self.tracks(partialName) -> returns all tracks in a project. @param partialName: optional string with partial name to match against. Will match if this string is anywhere in the name.

@return: an array of hiero.core.VideoTrack and hiero.core.AudioTrack objects.

Example: finds all tracks in a project with 30Sec in the name:

tracks = myProject.tracks(‘30Sec’)

Project.undo

self.undo() -> triggers an undo on the last item previously added to the undo stack. Only works on the main thread. If called from any other thread, throws an exception.

Project.undoItemText

self.undoItemText() -> returns the text of the last item on the undo stack. Only works on the main thread. Can be useful for testing that undo/redo works.

@return: string

Project.useCustomExportDirectory

self.useCustomExportDirectory() -> Get if the export root directory should be a custom directory, or use the project directory.

return bool

Project.useOCIOEnvironmentOverride()

self.useOCIOEnvironmentOverride() -> returns whether the OCIO config has been overriden in the environment.

@return: bool

Project.videoTrackItems(partialName=None)

self.videoTrackItems(partialName) -> returns all video track items in a project. @param partialName: optional string with partial name to match against. Will match if this string is anywhere in the name.

@return: an array of hiero.core.TrackItem objects.

Example: finds all video track items in a project with 30Sec in the name:

trackItems = myProject.videoTrackItems(‘30Sec’)

Project.videoTracks(partialName=None)

self.videoTracks(partialName) -> returns all video tracks in a project. @param partialName: optional string with partial name to match against. Will match if this string is anywhere in the name.

@return: an array of hiero.core.VideoTrack objects.

Example: finds all video tracks in a project with 30Sec in the name:

tracks = myProject.videoTracks(‘30Sec’)

Project.views

views() -> Returns a list of this project’s views.

@return list of strings

Project.viewsAndColors

viewsAndColors() -> Returns a list of this project’s views and corresponding colors.

@return list of (str, PySide2.QtGui.QColor) tuples

hiero.core.QuickTimePixelFormats()
class hiero.core.ReformatState

Bases: Shiboken.Object

Object representing a the reformatting settings for a track item. This corresponds to the Nuke ‘Reformat’ node.

boxForceShape

self.boxForceShape() -> returns the box ‘force shape’ flag.

@return: bool

boxPAR

self.boxPAR() -> returns the box pixel aspect ratio.

@return: double

boxSize

self.boxSize() -> returns the box size.

@return: QSize

isNull
originalResizeFlip

self.originalResizeFlip() -> returns the original resize flip flag, which may be a deprecated value if it was loaded from an old project.

@return: bool

originalResizeFlop

self.originalResizeFlop() -> returns the original resize flop flag, which may be a deprecated value if it was loaded from an old project.

@return: bool

originalResizeTurn

self.originalResizeTurn() -> returns the original resize turn flag, which may be a deprecated value if it was loaded from an old project.

@return: bool

originalType

self.originalType() -> returns the original reformat type of the state, which may be a deprecated value if it was loaded from an old project.

@return: string

resizeCenter

self.resizeCenter() -> returns the resize center flag.

@return: bool

resizeFlip

self.resizeFlip() -> returns the resize flip flag. Note: the flip option has been removed, this method should not be called.

@return: bool

resizeFlop

self.resizeFlop() -> returns the resize flop flag. Note: the flop option has been removed, this method should not be called.

@return: bool

resizeTurn

self.resizeTurn() -> returns the resize turn flag. Note: the turn option has been removed, this method should not be called.

@return: bool

resizeType

self.resizeType() -> returns the resize type.

@return: string

scale

self.scale() -> returns the scaling factor. Note: the scale option has been removed, this method should not be called.

@return: double

setBoxForceShape

self.setBoxForceShape() -> sets the box ‘force shape’ flag if the reformat type is set to ‘to box’.

@param setBoxForceShape: bool

setBoxPAR

self.setBoxPAR() -> sets the box pixel aspect ratio if the reformat type is set to ‘to box’.

@param PAR: double

setBoxSize

self.setBoxSize() -> sets the box size if the reformat type is set to ‘to box’.

@param size: QSize

setResizeCenter

self.setResizeCenter() -> sets the resize center flag on the track item.

@param center: bool

setResizeFlip

self.setResizeFlip() -> the flip option has been removed, this method exists only for compatibility reasons

setResizeFlop

self.setResizeFlop() -> the flop option has been removed, this method exists only for compatibility reasons

setResizeTurn

self.setResizeTurn() -> the turn option has been removed, this method exists only for compatibility reasons

setResizeType

self.setResizeType() -> sets the resize type of the state.

@param newResizeType: string

setScale

self.setScale() -> the scale option has been removed, this method exists only for compatibility reasons

setType

self.setType() -> sets the reformat type of the state.

@param newType: string

toString

self.toString() -> returns a description of the object. Equivalent to str(object).

@return: string

type

self.type() -> returns the reformat type of the state.

@return: string

class hiero.core.RenderProgressObserver

Bases: Shiboken.Object

Observer for tracking the progress of renders on the frame server.

isNull
updateProgress

RenderProgressObserver.updateProgress() -> called on progress of frame renders

@param progressList: list of lists containing [filePath, frame, progress]

class hiero.core.RenderTaskPreset(taskType, name, properties)

Bases: hiero.core.FnExporterBase.TaskPresetBase

RenderTaskPreset is a specialization of the TaskPreset which contains parameters associated with generating Nuke render output.

static AllViews()

Get the special cased value for all on the views knob

addCustomResolveEntries(resolver)

addCustomResolveEntries(self, resolver) RenderTaskPreset adds specialized tokens specific to this type of export, such as {ext} which returns the output format extnesion. @param resolver : ResolveTable object

codecName()
codecProperties()
codecSettings()
extension()
summary()
class hiero.core.ResolveTable

Used to store name/value pairs that can be resolved in strings. Example: Assuming the resolve table has an item “{filename}” that resolves to example.mov, Then calling resolveTable.resolve(taskObject, “someprefix_{filename}”) will return “someprefix_example.mov” To use, create an object, call addResolver on it with whatever key/value pairs you want, and then you can call resolve on the object to resolve a string. You can also merge two ResolveTable objects, replacing existing key’s with those in the ResolveTable passed in. And you can use functions to do the resolve. These take one parameter, the task that the resolve is applying to. For an example of how to use this, see FnExporterBase.py.

class CallbackItem(name, description, resolver)
description()
name()
resolve(task)
class ResolveTable.StringItem(name, description, value=None)
description()
name()
resolve(task)
ResolveTable.addEntriesToExportStructureViewer(viewer)
ResolveTable.addResolver(name, description, resolver)
ResolveTable.duplicate()
ResolveTable.entries()
ResolveTable.entryCount()

self.entryCount() -> returns the number of entries in this resolver.

ResolveTable.entryDescription(index)

self.entryDescription(index) -> returns a description of the item, which can be used to populate a dialog to the user when they are picking keywords.

ResolveTable.entryName(index)

self.entryCount(index) -> returns the name of the entry based on the index.

ResolveTable.merge(resolver)
ResolveTable.pathSensitiveReplace(initialString, findValue, replaceValue, isPath)
ResolveTable.resolve(task, value, isPath=False)
class hiero.core.Sequence

Bases: core.Hiero.Python.SequenceBase

Object for Sequences.

addClip(clip, time, videoTrackIndex=0, audioTrackIndex=-1)

Add a clip to a sequence, creating a TrackItem for each video/audio channel in the clip, adding them to the appropriate tracks and linking them together. This has the same effect as dragging a clip from the Bin View to the Timeline View in the Hiero UI.

@param clip: the clip to add @param time: the in time for created track items @param videoTrackIndex: index of the video track to add items to if the clip has video @param audioTrackIndex: index of the audio track to start adding items to if the clip has audio @return: list of created hiero.core.TrackItems

addToNukeScript(script=, additionalNodes=[], additionalNodesCallback=None, includeRetimes=False, retimeMethod=None, offset=0, skipOffline=True, mediaToSkip=[], disconnected=False, masterTrackItem=None, includeAnnotations=False, includeEffects=True, outputToFormat=None)

addToNukeScript(self, script) @param script: Nuke script object to add nodes to. @param includeRetimes: True/False include retimes @param retimeMethod: “Motion”, “Blend”, “Frame” - Knob setting for OFlow retime method @param additionalNodesCallback: callback to allow custom additional node per item function([Clip|TrackItem|Track|Sequence]) @param offset: Optional, Global frame offset applied across whole script @param skipOffline: If True, offline clips are not included in the export @param mediaToSkip: List of MediaSources which should be excluded from the export @param disconnected: If True, tracks other than that containing the masterTrackItem are not connected to any inputs @param masterTrackItem: Used for controlling the script output if disconnected is specified @param includeAnnotations: If True, annotations are included in the exported script @param includeEffects: If True, soft effects are included in the exported script @param outputToFormat: Format to use for output. If not specified, the sequence’s own format is used. @return: None

Add nodes representing this Sequence to the specified script. If there are no clips in the Sequence, nothing is added.

addTrack

self.addTrack(track) -> adds a video or audio track to the Sequence.

@param track: video or audio track to add

audioTrack

self.audioTrack(index) -> returns the audio track for the specified index.

@param index: index of the audio track to return

@return: AudioTrack

audioTracks

self.audioTracks() -> returns a tuple with all of the audio tracks.

@return: tuple of AudioTrack objects

changeFramerateKeepFrames

self.changeFramerateKeepFrames(toTimebase) -> changes the timebase of the sequence, keeping frames of track items the same

@param toTimebase: timebase to change to

changeFramerateKeepTimecodes

self.changeFramerateKeepTimecodes(toTimebase, roundingMode) -> changes the timebase of the sequence, keeping timecodes of track items the same, according to the specified rounding mode

@param toTimebase: timebase to change to

@param roundingMode: rounding mode to use when converting timebases (hiero.core.TimeBase.kRoundNearest, TimeBase.kRound32Pulldown)

clone(*args, **kwargs)

self.clone() -> returns a deep copy of this object.

@return: Sequence object

WARNING - DEPRECATED ( clone ): This method is deprecated and will not be present in future versions of the Python API. This method has been replaced by copy().

copy

self.copy() -> returns a deep copy of this object.

@return: Sequence object

guid
importTracks

self.importTracks(filePath) -> imports all of the tracks from the file specified by the filePath argument.

@param filePath: path to the file to import tracks from

@return tracks: tuple of created tracks

importTracksFromTimeBaseKeepFrames

self.importTracksFromTimeBaseKeepFrames(filePath, srcTimebase) -> imports all of the tracks from the file specified by the filePath argument using the specified timebase.

@param filePath: path to the file to import tracks from

@param srcTimebase: timebase to use when reading the source file

@return tracks: tuple of created tracks

importTracksFromTimeBaseKeepTimecodes

self.importTracksFromTimeBaseKeepTimecodes(filePath, srcTimebase, roundingMode) -> imports all of the tracks from the file specified by the filePath argument using the specified timebase.

@param filePath: path to the file to import tracks from

@param srcTimebase: timebase to use when reading the source file

@param roundingMode: rounding mode to use when converting timebases (hiero.core.TimeBase.kRoundNearest, TimeBase.kRound32Pulldown)

@return tracks: tuple of created tracks

items

self.items() -> returns a tuple with all of the video tracks concatenated with all of the audio tracks. Can iterate over the video tracks first by using self.numVideoTracks. The audio tracks follow the video tracks in the tuple returned from this method.

@return: tuple of VideoTrack and AudioTrack objects

matchMedia

self.matchMedia(path) -> match media using the current rule configuration in conformer().

@param path: path to the folder with the media to connect

numAudioTracks

self.numAudioTracks() -> returns number of audio tracks contained by this sequence.

@return: int

numVideoTracks

self.numVideoTracks() -> returns number of video tracks contained by this sequence.

@return: int

reconnectMedia

self.reconnectMedia(path) -> For each of the Clips used by this Sequence, reconnects media found in the specified path.

@param path: path containing media to reconnect to

removeTrack

self.removeTrack(track) -> removes the track from the Sequence.

@param track: track to remove (hiero.core.AudioTrack or VideoTrack object)

replaceClips

self.replaceClips(path) -> For each of the TrackItems in this sequence, replace it’s Clip with media found in the specified path.

@param path: path containing media to replace with

trackItemAt

self.trackItemAt(time) -> returns the top-most video track item for the specified time that is enabled and has media.

@param time: frame to get the trackitem for

@return: TrackItem

trackItemsAt

self.trackItemsAt(time, mediaType) -> finds enabled track items for the specified time, ordered from top-track to bottom-track (or for audio, min channel to max channel).

@param time: frame to get the trackitems for

@param mediaType: TrackItem.MediaType value specifying the media type of the track items to look for (defaults to kVideo)

@return: tuple of TrackItem objects

videoTrack

self.videoTrack(index) -> returns the video track for the specified index.

@param index: index of the video track to return

@return: VideoTrack

videoTracks

self.videoTracks() -> returns a tuple with all of the video tracks.

@return: tuple of VideoTrack objects

class hiero.core.SequenceBase

Bases: Shiboken.Object

Base class for Sequence and Clip objects. Has some methods common to both of those objects. Most likely never used directly.

addTag

self.addTag(tag) -> adds a Tag object to the Clip or Sequence.

@param tag: the tag object to add

@return: Tag object

addTagToRange

self.addTagToRange(tag, inTime, outTime) -> adds a Tag object to the specified range of the Clip or Sequence.

@param tag: the tag object to add

@param inTime: the first time at which the tag is valid

@param outTime: the last time at which the tag is valid

@return: Tag object

binItem

self.binItem() -> returns the parent BinItem this Sequence or Clip belongs to, if any.

@return: BinItem

clearInTime

self.clearInTime(t) -> clear the ‘in’ point for the clip to Time t.

@return: None

clearOutTime

self.clearInTime(t) -> clear the ‘out’ point for the clip to Time t.

@return: None

clearRange

self.clearRange(start, end, ripple) -> Clears a time range out of the sequence; effectively a razor on any clips straddling the start and end, and a delete of everything else.

@param start: the start of the range to clear

@param end: the end of the range to clear

@param ripple: set to True to shift the remaining track items to the left

disableSoftTrims

self.disableSoftTrims() -> disables soft trims on the object.

dropFrame

self.dropFrame() -> get whether sequence timecode is displayed in drop frame format

duration

self.duration() -> returns the duration of the Clip or Sequence.

@return: int time value

editFinished

self.editFinished(trackItems) -> this should be called after finishing editing the sequence to ensure that its internal state is updated properly and to send a signal to all objects listening to changes in this object (e.g. UI views).This function optionally takes a list of track items that is used to selectively rebuild only those sections of the timeline.This allows a faster update when the edited track items are known.

@param trackItems: optional, the track items to be updated

enableSoftTrims

self.enableSoftTrims(inTime, outTime) -> enables soft trims on the object.

@param inTime: Time - soft trim in time

@param outTime: Time - soft trim out time

format

self.format() -> returns the output Format object for this Sequence or Clip.

@return: Format object

framerate

self.framerate() -> returns the framerate of the Sequence or Clip.

@return: TimeBase object

inTime

self.inTime() -> returns the ‘in’ point set on the clip.

@return: frame

isNull

self.isNull() -> returns False if this is a valid Sequence or Clip object, True otherwise.

@return: True or False

metadata

self.metadata() -> returns a collection of metadata for the object.

@return: DataCollection object

name

self.name() -> returns the name of the object.

@return: string

outTime

self.outTime() -> returns the ‘out’ point set on the clip.

@return: frame

posterFrame

self.posterFrame() -> get the frame in the sequence used for thumbnails

project

self.project() -> returns the Project object that this is attached to, or None if the object is not attached to a project.

@return: Project object

rawView

self.rawView() -> returns a string representing the raw view of this sequence or clip.

@return: string

razorAt

self.razorAt(time) -> Creates razor cuts on all of the unlocked tracks for the parameter time(s).

@param time: if a single (integer) value, indicates the razor cut time; if a tuple or list of integer values, then the times to create multiple cuts at

removeTag

self.removeTag(tag) -> removes the tag from the track.

@param tag: Tag object

setDropFrame

self.setDropFrame(drop) -> set whether sequence timecode is displayed in drop frame format

setFormat

self.setFormat(format) -> set the format of the Sequence or Clip.

@param format: a Format object to set for the Clip or Sequence.

Example: myClipSequence.setFormat( Format(2048 )

setFramerate

self.setFramerate(framerate) -> set the framerate of the Sequence or Clip.

@param framerate: framerate value to set

setInOutEnabled

self.setInOutEnabled(enable) -> Enable/Disable the ‘in’ and ‘out’ points.

@return: None

setInTime

self.setInTime(t) -> set the ‘in’ point for the clip to Time t.

This will also enable the In/Out lock.

@return: None

setName

self.setName() -> set the name of the object.

@param: string new name

setOutTime

self.setOutTime(t) -> set the ‘out’ point for the clip to Time t.

This will also enable the In/Out lock.

@return: None

setPosterFrame

self.setPosterFrame(frame) -> set the frame in the sequence used for thumbnails

setSoftTrimsInTime

self.setSoftTrimsInTime(inTime) -> sets the in time for the soft trims. Note: this method does not enable soft trims if they are disabled.

@param inTime: in frame value for the soft trims

setSoftTrimsOutTime

self.setSoftTrimsOutTime(outTime) -> sets the out time for the soft trims. Note: this method does not enable soft trims if they are disabled.

@param outTime: out frame value for the soft trims

setTimecodeStart

self.setTimecodeStart(time) -> sets the value of the start timecode by frame. To convert times to frame values, use TimeCode.HMSFToFrames or TimeCode.stringToTime.

self.setTimecodeStart(timecodeValue, hasDropFrames) -> sets the value of the start timecode by formatted string, using the framerate of the Sequence or Clip as the time base. If just passing in a framerate, pass it in as an integer.

@param time: frame value to set the time code to

@param timecodeValue: string of the format “hh:mm:ss:ff”

@param hasDropFrames: True if the timecode includes drop frames, False otherwise

softTrimsEnabled

self.softTrimsEnabled() -> returns True if soft trims are enabled, False otherwise.

@return: True or False

softTrimsInTime

self.softTrimsInTime() -> returns the in time set for the soft trims.

@return: frame

softTrimsOutTime

self.softTrimsOutTime() -> returns the out time set for the soft trims.

@return: frame

tags

self.tags() -> returns a tuple of all of the tags applied to this object.

@return: tuple of Tag objects

thumbnail

self.thumbnail(frame, layer) -> returns a thumbnail of the frame specified as a QImage object.

@param frame: the frame to get the thumbnail for (defaults to 0)

@param layer: the layer to get the thumbnail for (defaults to colour)

@return: QImage object

timecodeStart

self.timecodeStart() -> returns the frame value of the start timecode. To convert this to a time code string, use TimeCode.timeToString.

@return: frame

timelineOffset

self.timelineOffset() -> returns the timeline offset value.

@return: frame

toString

self.toString() -> returns a description of the object. Equivalent to str(object).

@return: string

writeAudioToFile

self.writeAudioToFile() -> Bounce down audio tracks and write to wav file at specified location. File will be created or overwritten.

@param filepath: the filepath of file to be written

@param inTime: in point of the timeline to write

@param outTime: out point of the timeline to write

@param numChannels: number of audio channels

@param sampleRate: the sample rate to export to

@param bitDepth: sample bit depth (PCM only)

@param bitRate: audio bitrate in bits (compressed formats only)

class hiero.core.Snapshot

Bases: Shiboken.Object

Object representing a snapshot of a sequence or clip. Can be created with a Clip or a Sequence object.

comment

self.comment() -> returns the comment set on this snapshot object.

@return: string

isNull

self.isNull() -> returns True if the object is invalid, False otherwise.

@return: True or False

item

self.item() -> returns the clip or sequence stored with this snapshot.

@return: Clip or Sequence object

name

self.name() -> returns the name of this snapshot.

@return: string

setComment

self.setComment(comment) -> sets the comment on this snapshot object.

@param comment: string to set the comment to

@return: string

toString

self.toString() -> returns a description of the object. Equivalent to str(object).

@return: string

class hiero.core.SubTrackItem

Bases: core.Hiero.Python.TrackItemBase

Base class for items that exist in sub-tracks, e.g. Annotation objects. This class should never be used directly.

descString
setTimelineIn

self.setTimelineIn(inTime) -> sets the in point for this SubTrackItem. Note that this trims the duration of the SubTrackItem.

@param inTime: frame for the new in point

setTimelineOut

self.setTimelineOut(outTime) -> sets the out point for this SubTrackItem. Note that this trims the duration of the SubTrackItem.

@param outTime: frame for the new out point

subTrackIndex

self.subTrackIndex() -> get the index of the item’s parent sub-track.

@return: int index, -1 if the item has not been added to a track

toString

self.toString() -> returns a description of the object. Equivalent to str(object).

@return: string

class hiero.core.Tag

Bases: Shiboken.Object

Object representing a tag in Hiero.

Can be created with a string name, an optional path to an icon and an optional editable (in gui) boolean parameter

copy
guid

self.guid() -> Return the Tag guid.

@return: object guid as string

icon

self.icon() -> returns the tags icon path.

If the file doesn’t exist, it will search for it in the plugin paths and the project folder and return the located file.

@return: string

inTime

self.inTime() -> returns the in time of the tag.

@return: frame

isNull

self.isNull() -> returns True if the tag is invalid, False otherwise.

@return: True or False

metadata

self.metadata() -> returns the clip’s metadata.

@return: DataCollection object

name

self.name() -> returns the label of the tag.

@return: string

note

self.note() -> returns the note on the tag.

@return: string

outTime

self.outTime() -> returns the out time of the tag.

@return: frame

project

self.project() -> returns the Project object that this is attached to, or None if the object is not attached to a project.

@return: Project object

setIcon

self.setIcon() -> sets the icon on the tag.

@param note: path to icon file

setInTime

self.setInTime(time) -> set the in time of the tag.

@param time: the in time

setName

self.setName() -> sets the name label of the tag.

@param name: name to assign to tag

setNote

self.setNote() -> sets the note on the tag.

@param note: string note to assign to tag

setOutTime

self.setOutTime(time) -> set the out time of the tag.

@param time: the out time

setVisible

self.setVisible() -> sets the visiblity of the tag.

@param visible: visibility state

toString

self.toString() -> returns a description of the object. Equivalent to str(object).

@return: string

visible

self.visible() -> gets the visiblity state of the tag.

@return bool

class hiero.core.TaskBase(initDictionary)

Bases: core.Hiero.Python.ITask

TaskBase is the base class from which all Tasks must derrive.

addToQueue()

addToQueue(self) Called by the processor in order to add the Task to the ExportQueue If derrived classes impliment this function, this base function must be called.

Populates name, description and destination fields in the export queue

availableOutputHandles()

Get the available output handles, based on self._cutHandles. If outputting to sequence time, the start handle is clamped to prevent going into negative frames.

clipName()

clipName(self) Returns the name of the clip in the bin

deleteTemporaryFile(filePath)

Delete a file which is an artifact of the export, but should be removed after it’s finished. Returns whether the file was successfully deleted.

editId()

editId(self) Returns a str containing the id of this edit. See hiero.core.TrackItem.eventNumber().

edlEditId()

edlEditId(self) Returns the id taken from the EDL used to create this edit, if there was one.

fileName()

filename(self) Returns the source items filename if applicable

filebase()

filebase(self) Returns the source items file path less extension if applicable

fileext()

fileext(self) Returns the source items file extention if applicable

filehead()

filehead(self) Returns the source filename excluding image sequence frame padding and extension, if applicable

filepadding()

filepadding(self) Returns the padding used in source file if an image sequence, empty string otherwise

filepath()

filepath(self) Returns the source file path, if applicable

finishTask()

finishTask() Called once Task has signaled completion. Sub-classes should call this base implementation.

hasValidItem()

Get if the task is able to run on the item it was initialised with.

ident()

ident(self) Returns a string used for identifying the type of export task

inputRange(ignoreHandles=False, ignoreRetimes=False, clampToSource=True)

inputRange() Returns the input frame range (as a tuple) for this task if applicable @param: ignoreHandles - If True calculate Input Range excluding export handles @param: ignoreRetimes - If True calculate Input Range without taking retimes into account @param: clampToSource - If True the input range will be clamped to the available media range

isExportingItem(item)

Check if this task is already including an item in its export. Used for preventing duplicates when collating shots into a single script.

name()
outputHandles(ignoreRetimes=False)

outputHandles( ignoreRetimes = False ) Return a tuple of the in/out handles generated by this task. Handles may be cropped such as to prevent negative frame indexes. Note that both handles are positive, i.e. if 12 frames of handles are specified, this will return (12, 12) Sub-classes should reimplement _outputHandles() rather than this method. @return : (in_handle, out_handle) tuple

outputRange(ignoreHandles=False, ignoreRetimes=False, clampToSource=True)

outputRange() Returns the output file range (as tuple) for this task, if applicable. This default implementation works if the task was initialised with a Clip or TrackItem

outputSequenceTime()

Test if the output frame range should be in sequence time rather than source. This only applies when a TrackItem is being exported.

NOTE: This option has been disabled for the time being. The code is left in place in case we want to re-enable it, but it is not available to users.

postSequence()

preSequence() This function serves as hook for custom scripts to add functionality on completion of exporting the contents of the sequence

preSequence()

preSequence() This function serves as hook for custom scripts to add functionality before a task starts exporting anything with the sequence

printState()

Print summary of the task parameters

progress()

progress() Returns a float value 0..1 to indicate progress of task. The task is considered complete once the progress is reported as 1.

projectName()

projectName(self) Returns the name of the project, used for resolving the {project} token)

projectRoot()

projectRoot(self) Returns the project root export path, used for resolving the {projectroot} token

resolvePath(path)

Replace any recognized tokens in path with their current value.

resolvedExportPath()

resolvedExportPath() returns the output path with and tokens resolved

sequenceName()

sequenceName(self) Returns the name of the sequence or parent sequence (if exporting a track item)

setError(desc)

setError(self, desc) Call to set the state of this task to error, with a description of the error. If the task is synchronous, raise exception

shotName()

shotName(self) Returns the Tasks track item name

shotNameIndex()

shotNameIndex(self) Returns the index string for the shot, if there are multiple shots with the same name on the sequence.

startTask()

startTask() Called when task reaches head of the export queue and begins execution

supportedType(item)

Interface for defining what type of items a Task Supports. Return True to indicate @param item is of supported type

taskStep()

taskStep() Called every frame until task completes. Return True value to indicate task requires more steps. Return False value to indicate synchronous processing of the task is complete. The task may continue to run in the background.

timeStamp()

timeStamp(self) Returns the datetime object from time of task creation

timeStampString(localtime)

timeStampString(localtime) Convert a tuple or struct_time representing a time as returned by gmtime() or localtime() to a string formated YEAR/MONTH/DAY TIME.

trackName()

trackName(self) Returns the name of the parent track

updateItem(originalItem, localtime)

updateItem - This is called by the processor prior to taskStart, crucially on the main thread.

This gives the task an opportunity to modify the original item on the main thread, rather than the clone.

validate()

Check that the task is in a state that allows it to be executed. Should raise an exception if there is an error. The default implementation checks if the task can be used with a multi-view project.

versionString()

versionString(self) Returns the version string used to resolve the {version} token

views()

Get the view names used by the task. Tasks which support exporting from multi-view projects should reimplement this to return a non-empty list.

class hiero.core.TaskData(preset, item, exportRoot, shotPath, version, exportTemplate, project, cutHandles=None, resolver=None, retime=False, startFrame=None, startFrameSource=None, submission=None, skipOffline=True, presetId=None, shotNameIndex='', mediaToSkip=[])

Bases: dict

TaskData is used as a seed for creating classes, wrapping up all of the parameters and making it simpler to add new ones

class hiero.core.TaskGroup

Bases: core.Hiero.Python.ITask

TaskGroup is a Task which maintains a list of child Tasks.

addChild(child)

Add a child to the list.

addToQueue()
children()

Get the TaskGroup’s children.

getLeafTasks()

Get a list of all leaf tasks recursively, i.e. those with no child tasks.

progress()

Get the group progress. Returns a value based on the progress of child tasks.

class hiero.core.TaskPreset(parentType, presetName)

Bases: hiero.core.FnExporterBase.TaskPresetBase

Deprecated - Use TaskPresetBase

class hiero.core.TaskPresetBase(parentType, presetName)

Bases: core.Hiero.Python.ITaskPreset

TaskPreset is the base class from which all Task Presets must derrive The purpose of a Task Preset is to store and data which must be serialized to file and shared between the Task and TaskUI user interface component

addCustomResolveEntries(resolver)

addCustomResolveEntries(self, resolver) Impliment this function on custom export tasks to add resolve entries specific to that class.

@param resolver : ResolveTable object

addDefaultResolveEntries(resolver)

addDefaultResolveEntries(self, resolver) Create resolve entries for default resolve tokens shared by all task types. @param resolver : ResolveTable object

addUserResolveEntries(resolver)

addUserResolveEntries(self, resolver) Override this function to add user specific resolve tokens. When adding task specific tokens in derrived classes use TaskBase.addCustomResolveEntries(). This is reserved for users to extend the available tokens.

@param resolver : ResolveTable object

createResolver()

createResolver(self) Instantiate ResolveTable, add default and custom resolve entries return ResolveTable object

getResolveEntryCount()

getResolveEntryCount(self) (DEPRICATED) Return the number of resolve entries in the resolve table

ident()

ident(self) Returns a string used for identifying the type of task

initialiseCallbacks(exportStructure)

When parent ExportStructure is opened in the ui, initialise is called for each preset. Register any callbacks here.

markedForDeletion()

Return True if this preset is marked for deletion. Delete will be performed at save

name()

Return Preset Name

nonPersistentProperties()

nonPersistentProperties() Return the dictionary which contains properties not persisted within the preset. Properties which are only relevant during a single session. @return dict

parentType()

parentType(self) Returns a the parent Task type for this TaskPreset. @return TaskPreet class type

project()

Return the Project with which this preset is associated. If this is a local preset returns None

properties()

properties() Return the dictionary which is used to persist data within this preset. @return dict

readOnly()

Return the read only flag for this preset

resolveEntryCount()

resolveEntryCount(self) Return the number of resolve entries in the resolve table

resolveEntryDescription(index)

resolveEntryDescription(self, index) return ResolveEntry description by index

resolveEntryName(index)

resolveEntryName(self, index) return ResolveEntry name/token by index

savePath()

savePath(self) Return the path from which this preset was loaded. Will return None if this preset was not loaded from file

setCompsToRender(comps)

Set the list of comps to render.

setCompsToSkip(comps)

Set the list of comps to skip.

setMarkedForDeletion(markedForDeletion=True)

Set this preset as marked for deletion. Delete will be performed at save

setName(name)

Set Preset Name

setProject(project)

Set the Project() object which this preset is associated

setReadOnly(readOnly)

Set Read Only flag on preset, not enforced internally

setSavePath(path)

setSavePath(self, path) Set the save path of the preset in order to ensure it is saved to the path it was loaded from

setSkipOffline(skip)

skipOffline(bool) Set flag to skip offline TrackItems during export. @param bool

skipOffline()

skipOffline() Returns True if flag has been set to skip any offline TrackItems @return bool

summary()

Called by Hiero to get a summary of the preset settings as a string.

class hiero.core.TaskRegistry

Bases: core.Hiero.Python.IExporterRegistry

addDefaultPresets(overwrite=False)
addPresetToProjectExportHistory(project, preset)

Add a preset to the export history for a project.

addProcessorPreset(name, preset)

Register Processor Preset Instance

addSubmission(name, submissionClass)
assignPresetToProject(preset, project)

Assign preset to project and ensure name is unique within project. Project may be None in which case preset will be assigned ‘local’

copyAndAddProcessorPreset(preset)
copyAndAddProjectPreset(preset, project)

Duplicate a preset and assign it to a project imediately to prevent name clashes

copyPreset(preset)

Create a copy of a preset. The copy is not added to the registry.

createAndAddProcessorPreset(name, typeTemplate)
createAndExecuteProcessor(preset, items, submissionName=None, synchronous=False)

Instantiate the Processor associated with preset and startProcessing items

createProcessor(preset, submissionName=None, synchronous=False)

Create the processor for an export and return it. This doesn’t start the export.

createTaskFromPreset(preset, initDictionary)
discardPresetChanges(project)
findPresetInProjectExportHistory(project, presetId)

Attempt to find a preset in a project’s export history.

getPresetId(preset)

Get the id (hash) of the given preset.

getPresetType(ident)
getProcessor(index)
getProcessorFromPreset(presetName)
getProcessorPreset(index)
isNukeShotExportPreset(preset)

Check if a preset is valid for Nuke shot export. To be considered valid, the preset must contain a NukeShotExporter and a NukeRenderTask (write node).

isSingleSocketAllowed()

Return whether or not single socket exports are allowed.

loadPresets(path)

Load all xml presets within specified path and register

localPresets()

Returns a list of preset names NOT associated with the specified project

localPresetsChanged()

Check if the local task presets have changed since startPresetChanges() was called.

nukeShotExportPresets(project)

Get a list of presets which can export shots as Nuke scripts. Includes local presets and those in the project.

numProcessorPresets()

Return the total number of Processor preset instances registered

numProcessors()

Return the number or processors in the Registry

numTasks()

Returns the number of Tasks Registered

presetFromXml(xml, register=True)

Deserialize preset from xml string. Requires derived TaskPreset classes to be registered.

presetToXml(preset)

Serialise a TaskPreset to XML and return as string. Returns an empty string on failure.

presetTypeFromIdent(ident)

Resolve preset ident string to Preset class type

presetsSubDirectory()
processorByIndex(index)

Returns a processor by index

processorFromPreset(presetName)

Return type of task from preset name

processorName(index)

Returns a Processor name by index

processorPresetByIndex(index)

Return instance of TaskPreset Object

processorPresetByName(name, project=None)

Returns the preset with specified name associated with project. If project is None preset will be searched for in local presets

processorPresetName(index)

Return the name of Processor preset by index

processorPresetNames()

Returns a tuple of Processor Preset names

projectDuplicated(project, newProject)

Called on project clone to duplicate the associated project presets

projectExportHistoryXml(project)

Get the project export history as a list of xml fragments. Use the xml to avoid problems with reference counting the preset objects when calling from C++.

projectPresets(project)

Returns a list of preset names associated with the specified project

projectPresetsChanged(project)

Check if the task presets for the given project have changed since startPresetChanges(project) was called.

projectUnloaded(project)

Called on project unload to remove presets associated with project

registerPreset(parentType, preset)

Register a preset instance and association with parentType

registerProcessor(preset, processor)

Register the association between a Processor and ProcessorPreset

registerTask(preset, task)

Register the association between a Task and TaskPreset

removeProcessorPreset(preset)

Remove Processor preset from registry

renameProcessorPreset(preset, newName)

Validate and update name of Processor Preset

restoreProjectExportHistoryXml(project, presetsXml)

Set the project export history as a list of xml fragments. Use the xml to avoid problems with reference counting the preset objects when calling from C++.

revertDefaultPresets()
savePresets(path)

Save all registered presets, as xml, to path specified.

setDefaultPresets(defaultPresets)
startPresetChanges(project)
submissionByName(name)
submissionChanged(submissionName)
submissionNames()
taskName(index)

Returns a Task name by Index

validateExport(preset, items)

Implements IExporterRegistry.validateExport

class hiero.core.TimeBase

Bases: Shiboken.Object

Helper object that wraps up time bases (or frame rates). Stores values internally as integer ratios, as opposed to floating point values.

Can be initialised with an int, float, or str. In addition, you can construct a TimeBase using TimeBase.fromRational(numerator, denominator), or use the predefined TimeBase values, for example TimeBase.k30NTSC.

class RoundingMode

Bases: object

name
TimeBase.convert()

self.convert(t, from, to) -> returns the time specified by the first parameter converted from from parameter’s time base into the to parameter’s time base.

If either of the time bases is invalid, this method returns the t parameter unchanged.

@param t: the time (frame) to convert from one rate to another

@param from: the time base to convert from

@param to: the time base to convert to

@return: integer

TimeBase.convertTime

self.convertTime(t, toRate) -> returns the time specified by the first parameter converted from this object’s time base into the second parameter’s time base.

If either of the time bases is invalid, this method returns the t parameter unchanged.

@param t: the time (frame) to convert from one rate to another

@param toRate: the new time time to convert to

@return: integer

TimeBase.denominator

self.denominator() -> gets the denominator of the time base.

@return: int

TimeBase.fromRational()

self.fromRational(numerator, denominator) -> creates a new TimeBase object from the given parameters.

For example:

newTimeBase = TimeBase.fromRational(25, 1)

newTimeBase = TimeBase.fromRational(30000, 1001)

TimeBase.fromString()

TimeBase.fromString(str) -> deprecated; a TimeBase can now be constructed directly from a str, e.g. TimeBase(‘30’). Construct a TimeBase object using a str as input.

For example:

newTimeBase = TimeBase.fromString(‘25’)

newTimeBase = TimeBase.fromString(‘30000 / 1001’)

@return: TimeBase

TimeBase.isNTSC

self.isNTSC() -> returns True if the time base is NTSC (24*1000/1001, 30*1000/1001, or 60*1000/1001).

@return: True or False

TimeBase.isValid

self.isValid() -> returns True if the denominator of the time base is non-zero.

@return: True or False

TimeBase.numerator

self.numerator() -> gets the numerator of the time base.

@return: int

TimeBase.supportsDropFrames

self.supportsDropFrames() -> returns True if the time base supports drop frames (only true for 30 or 60 fps NTSC currently).

@return: True or False

TimeBase.toFloat

self.toFloat() -> returns the time base value expressed as a floating point value.

@return: float

TimeBase.toInt

self.toInt() -> returns the time base value, rounded to the nearest integer.

@return: int

TimeBase.toRational

self.toRational() -> returns a tuple of the numerator and the denominator of the time base.

@return: tuple of integers

TimeBase.toRationalString

self.toRationalString() -> returns a string containing the time base expressed as a ratio, for example ‘30000/1001’.

@return: string

TimeBase.toString

self.toString() -> returns a string containing the time base as a floating point number. Equivalent to str(object).

@return: string

class hiero.core.Timecode

Bases: Shiboken.Object

Helper module to convert back and forth between (frames and time bases) and time code values.

class DisplayType

Bases: object

name
Timecode.HMSFToFrames()

self.HMSFToFrames(timeBase, dropFrame, h, m, s, f) -> takes a timebase, whether or not it’s got drop frames, an hour, minute, second and frame, and returns a time value.

@param timeBase: the time base to use

@param dropFrames: True if you want drop frames taken into account

@param h: hour to use

@param m: minute to use

@param s: second to use

@param f: frame to use

@return: frame

Timecode.displayTypeFromString()

self.displayTypeFromString(s) -> guesses the display type from a timecode string. This can be inferred from separators (though not guaranteed) or if no separators than just display as frames.

Example:

displayType = Timecode.displayTypeFromString(‘01:00:00:00’)

print displayType # prints out Timecode.kDisplayTimecode

displayType = Timecode.displayTypeFromString(‘01:00:00;00’)

print displayType # prints out Timecode.kDisplayDropFrameTimecode, because of the semi-colon (;)

@param s: string to detect time code format from

@return: Timecode.DisplayType enumeration

Timecode.framesFromBCD()
Timecode.framesFromTimecode()
Timecode.framesToHMSF()

self.framesToHMSF(time, timeBase, dropFrames) -> takes a time, timebase and whether or not it’s got drop frames, and returns a tuple of the hour, minute, second and frame.

Example:

hour, minute, second, frame = Timecode.framesToHMSF(0, timeBase, True)

@param time: the frame you want to get the time code for

@param timeBase: the time base to use

@param dropFrames: True if you want drop frames taken into account

@return: tuple of hour, minute, second, frame

Timecode.readTimecode()
Timecode.samplesToString()
Timecode.stringToTime()

self.stringToTime(s, timeBase, displayType, timecodeOffset) -> returns a tuple of hour, minute, second, frame values.

@param s: the string to convert

@param timeBase: the time base to use

@param displayType: how the string was formatted; can be (Timecode.kDisplayTimeCode, Timecode.kDisplayDropFrameTimecode, or Time.kDisplayFrames)

@param timecodeOffset: an offset to apply before converting to a time code string

@return: tuple

Timecode.timeToString()

self.timeToString(time, timeBase, displayType, includeSign, timecodeOffset) -> returns a string formatted as a time code.

@param time: the frame to use

@param timeBase: the time base to use

@param displayType: how to format the returned string (Timecode.kDisplayTimeCode, Timecode.kDisplayDropFrameTimecode, or Time.kDisplayFrames)

@param includeSign: if True, a ‘+’ will be put in front of positive time codes

@param timecodeOffset: an offset to apply before converting to a time code string

@return: string

class hiero.core.TrackBase

Bases: Shiboken.Object

Base class for VideoTrack and AudioTrack objects. This class should never be used directly.

Flags for controlling behavior when removing items, these can be combined with bitwise or:

TrackBase.eRemoveLinkedItems: removing an item will also remove any items it is linked to

TrackBase.eDontRemoveLinkedItems: removing an item will not remove linked items

TrackBase.eDontCollapseSubTracks: removing a sub-track item will not cause empty sub-tracks to be removed

class RemoveItemOptions

Bases: object

name
TrackBase.addItem

self.addItem(item) -> deprecated; use addTrackItem instead. Adds a track item to this track. Throws an exception if the item overlaps any existing items on the track.

@param item: the TrackItem to add to this track

@return: TrackItem object

TrackBase.addTag

self.addTag(tag) -> adds the specified tag to the Track.

@param tag: Tag object to apply to the track

@return: a Tag object

TrackBase.addTransition

self.addTransition(transition) -> adds a transition to the timeline for the track. Can only be called when the track has been added to a Sequence.

Note that a transition can only be added to a single track. Calling this function with a Transition object which already belongs to a Track will result in an error.

Transition items can be reomoved from a track using the removeTransition function.

@param transition: the Transition to add to this track

@return: a Transition object

TrackBase.clearRange

self.clearRange(start, end, ripple) -> Clears a time range out of the track; effectively a razor on any clips straddling the start and end, and a delete of everything else.

@param start: the start of the range to clear

@param end: the end of the range to clear

@param ripple: set to True to shift the remaining track items to the left

TrackBase.guid
TrackBase.isEnabled

self.isEnabled() -> returns True if the Track object is enabled.

@return: True or False

TrackBase.isLocked

self.isLocked() -> returns True if the Track object is locked.

@return: True or False

TrackBase.isNull

self.isNull() -> returns True if the Track object is invalid.

@return: True or False

TrackBase.metadata

self.metadata() -> returns the metadata for this Track.

@return: DataCollection object

TrackBase.name

self.name() -> returns the name of the track. Identical to calling trackName().

@return: string

TrackBase.numItems

self.numItems() -> returns the number of items in this track.

@return: int

TrackBase.numTransitions

self.numTransitions() -> returns the number of transitions in this track.

@return: int

TrackBase.project

self.project() -> returns the Project object that this item is attached to or None if the object is not attached to a project.

@return: Project object

TrackBase.razorAt

self.razorAt(time) -> Creates razor cuts on a track for the parameter time(s).

@param time: if a single (integer) value, indicates the razor cut time; if a tuple or list of integer values, then the times to create multiple cuts at

TrackBase.removeItem

self.removeItem(trackItem, option=eRemoveLinkedItems) -> removes a track item from this track.

@param trackItem: the TrackItem to remove from this track

@param option: options controlling the remove behavior. By default linked items are also removed. Note that if linked effects are not removed, this will put them in an invalid state.

TrackBase.removeTag

self.removeTag(tag) -> removes the tag from the track.

@param tag: tag object

TrackBase.removeTransition

self.removeTransition(transition) -> removes a transition from the timeline of this track.

@param transition: the Transition to remove from this track’s timeline

TrackBase.setEnabled

self.setEnabled() -> enables or disables the Track.

TrackBase.setLocked

self.setLocked() -> locks or unlocks the Track.

@return: True or False

TrackBase.setName

self.setName() -> Sets the name of a track.

@param: string

TrackBase.tags

self.tags() -> returns a tuple of all of the tags applied to this object.

@return: tuple of Tag objects

TrackBase.toString

self.toString() -> returns a description of the object. Equivalent to str(object).

@return: string

TrackBase.trackIndex
TrackBase.trackName

self.trackName() -> returns the name of the track. Identical to calling name().

@return: string

TrackBase.transitions

self.transitions() -> returns a tuple of all of the transitions applied to this track object.

@return: tuple of Transition objects

class hiero.core.TrackItem

Bases: core.Hiero.Python.TrackItemBase

Represents a specific item on a Track. Can also be created using the createTrackItem method on VideoTrack and AudioTrack objects. Can be converted to a MediaSource object if isSource() returns True, or a Sequence object if isSequence() returns True.

Note that the version functions don’t cause a scan of any directories for other versions of media and will only skip to versions that have already been discovered. For an example of how to do that, see Plugins/site-packages/hiero/ui/ScanForVersions.py.

For an example of how to implement custom versioning scheme, see Plugins/site-packages/hiero/core/versioning_example.py.

class MediaType

Bases: object

name
TrackItem.addTag

self.addTag(tag) -> adds a new tag to the track item.

@param tag: tag object

@return: a Tag object

TrackItem.addToNukeScript(script=, firstFrame=None, additionalNodes=[], additionalNodesCallback=None, includeRetimes=False, retimeMethod=None, startHandle=None, endHandle=None, colourTransform=None, offset=0, nodeLabel=None, includeAnnotations=False, includeEffects=True, outputToSequenceFormat=False)

This is a variation on the Clip.addToNukeScript() method that remaps the Read frame range to the range of the this TrackItem rather than the Clip’s range. TrackItem retimes and reverses are applied via Retime and OFlow nodes if needed. The additionalNodes parameter takes a list of nodes to add before the source material is shifted to the TrackItem timeline time and trimmed to black outside of the cut. This means timing can be set in the original source range and adding channels, etc won’t affect frames outside the cut length.

@param retimeMethod: “Motion”, “Blend”, “Frame” - Knob setting for OFlow retime method @param offset: Optional, Global frame offset applied across whole script

TrackItem.currentVersion

self.currentVersion() -> returns a version object for the current version set on this track item.

@return: Version object

TrackItem.eventNumber

self.eventNumber() -> Get the event number of this track item on it’s Sequence.

@return: integer event number

TrackItem.getAvailableOcioColourTransforms

self. getAvailableOcioColourTransforms() -> returns colour transform for the media source.

@return: string

TrackItem.handleInLength

self.handleInLength() -> returns the length of the track item’s in handle.

@return: frames

TrackItem.handleInTime

self.handleInTime() -> returns the track item’s in handle time.

@return: frames

TrackItem.handleOutLength

self.handleOutLength() -> returns the length of the track item’s out handle.

@return: frames

TrackItem.handleOutTime

self.handleOutTime() -> returns the track item’s out handle time.

@return: frames

TrackItem.inTransition

self.inTransition() -> returns the in transition for this track item.

@return: Transition object

TrackItem.isMediaPresent

self.isMediaPreset() -> returns True if the track item represent a media source and if the media source is currently available in Hiero (and not offline). Returns False otherwise.

@return: True or False

self.link(trackItem) -> Links track item with another track item. Both track items must point to the same source.

@param trackItem: track item to link to

TrackItem.mapSourceToTimeline

self.mapTimelineToSource(time) -> Map from the track item’s source time to timeline time.

@param time: time to map

@return mapped time

TrackItem.mapTimelineToSource

self.mapTimelineToSource(time) -> Map from timeline time to the track item’s source time.

@param time: time to map

@return mapped time

TrackItem.maxVersion

self.maxVersion() -> sets the highest available version on this TrackItem. If versionLinkedToBin() is set, changes the version on all linked objects.

@return: Version object

TrackItem.mediaType

self.mediaType() -> returns media type for the track item.

@return: MediaType object

TrackItem.metadata

self.metadata() -> returns the metadata for the track item.

@return: DataCollection object

TrackItem.minVersion

self.minVersion() -> sets the lowest available version on this TrackItem. If versionLinkedToBin() is set, changes the version on all linked objects.

@return: Version object

TrackItem.name

self.name() -> returns the track item’s name.

@return: string

TrackItem.nextVersion

self.nextVersion() -> sets the next available version on this TrackItem. If versionLinkedToBin() is set, changes the version on all linked objects.

@return: Version object

TrackItem.numVersions

self.numVersions() -> returns the total number of versions on this track item currently (nothing to do with the maximum or minimum version number).

@return: int

TrackItem.outTransition

self.outTransition() -> returns the out transition for this track item.

@return: Transition object

TrackItem.playbackSpeed

self.playbackSpeed() -> returns the playback speed of this track item.

@return: double

TrackItem.prevVersion

self.prevVersion() -> sets the next available version on this TrackItem. If versionLinkedToBin() is set, changes the version on all linked objects.

@return: Version object

TrackItem.reconnectMedia

self.reconnectMedia(path) -> Reconnects media for the Clip used by the TrackItem, using the specified path.

@param path: path containing media to reconnect to

TrackItem.reformatState

self.reformatState() -> returns the reformat state for the track item.

@return: ReformatState object

TrackItem.removeTag

self.removeTag(tag) -> removes the tag from the track item.

@param tag: Tag object

TrackItem.replaceClips

self.replaceClips(path) -> Find a new Clip from the specified path, and replace the TrackItem’s existing Clip with it.

@param path: path containing media to replace with

TrackItem.setCameraColourTransform

self.setCameraColourTransform(colourTransform) -> sets the camera colour transform for the source media.

@param colourTransform: Colour transform name

TrackItem.setCurrentVersion

self.setCurrentVersion(version) -> sets the current version (by object) on this track item. Note that this method doesn’t check that the versioned media source exists on disk.

@param version: Version object

TrackItem.setCurrentVersionIndex(*args, **kwargs)

self.setCurrentVersionIndex(index) -> sets the current version on this track item and returns the new version object. Creates a new version if there wasn’t one before, but doesn’t check that the versioned media source exists on disk.

@param index: the integer index to set the current version on this track item to

@return: Version object

WARNING - DEPRECATED ( setCurrentVersionIndex ): This method is deprecated and will not be present in future versions of the Python API. Version indices are no longer unique identifiers and should not be used as such. Please use TrackItem.setActiveVersion() instead.

TrackItem.setName

self.setName(name) -> sets the name of the track item.

@param name: the value to set the track name to

TrackItem.setPlaybackSpeed

self.setPlaybackSpeed(newSpeed) -> sets the playback speed of this track item.

@param newSpeed: double

TrackItem.setSource

self.setSource(clip, trackIndex=0) -> sets the source Clip for this TrackItem.

If the TrackItem is not already in a Track, the duration will be set to the Clip’s duration.

@param clip: the Clip object to set as the source for this track item

@param trackIndex: optional track index, for instance if you are adding an audio Clip and want to use its second audio track

@return: the Clip object passed in

TrackItem.setSourceIn

self.setSourceIn(time) -> sets the source in for the track item. This will shrink or grow the duration.

@param time: frame value

TrackItem.setSourceMediaColourTransform

self.setSourceMediaColourTransform(colourTransform) -> sets the input colour transform for the source media.

@param colourTransform: Colour transform name

TrackItem.setSourceOut

self.setSourceOut(time) -> sets the source out for the track item. This will shrink or grow the duration.

Note that this value depends on speed. For exact editing, edit speed instead in order to avoid rounding errors.

@param time: frame value

TrackItem.setTimelineIn

self.setTimelineIn(inTime) -> sets the timeline in value. Shrinks or grows the timeline duration, as appropriate.

@param inTime: frame value

TrackItem.setTimelineOut

self.setTimelineOut(outTime) -> sets the timeline out value. Shrinks or grows the timeline duration, as appropriate.

@param outTime: frame value

TrackItem.setTimes

self.setTimes(timelineIn, timelineOut, sourceIn, sourceOut) -> sets the timeline and source times for the track item.

@param timelineIn: timeline in frame@param timelineOut: timeline out frame@param sourceIn: source in frame@param sourceOut: source out frame

TrackItem.setVersionLinkedToBin

self.setVersionLinkedToBin(linked) -> link the TrackItem’s version to that of it’s associated BinItem. Note this does not immediately update the item’s version, this will happen next time a version is set on the BinItem or any linked TrackItems.

@param: linked

TrackItem.source

self.source() -> depending on the underlying type of the track item, returns a Clip object, a Sequence object or a MediaSource object.

@return: a Clip object, a Sequence object or a MediaSource object

TrackItem.sourceDuration

self.sourceDuration() -> returns the source duration value for the track item.

Note that this value depends on speed, and may not be an integer value.

@return: frames

TrackItem.sourceIn

self.sourceIn() -> returns the source in value for the track item.

Note that after a combination of a retime and editing, this value may not be an integer.

@return: frame

TrackItem.sourceMediaColourTransform

self.setSourceMediaColourTransform() -> returns colour transform for the media source.

@return: string

TrackItem.sourceOut

self.sourceOut() -> returns the source out value for the track item.

Note that this value depends on speed, and may not be an integer value.

@return: frame

TrackItem.tags

self.tags() -> returns a tuple of all of the tags applied to this object.

@return: tuple of Tag objects

TrackItem.thumbnail

self.thumbnail(frame, layer) -> returns a thumbnail of the frame specified as a QImage object.

@param frame: the frame to get the thumbnail for (defaults to 0)

@param layer: the layer to get the thumbnail for (defaults to colour)

@return: QImage object

TrackItem.toString

self.unlink(trackItem) -> Unlinks this track item from given track item.

@param trackItem: track item from which this track item is being unlinked

TrackItem.unlinkAll()

self.unlinkAll() -> Unlink all track items that are linked to this one.

TrackItem.versionDown(*args, **kwargs)

self.versionDown() -> decrements the current version on this track item and returns the new version object. Creates a new version if there wasn’t one before, but doesn’t check that the versioned media source exists on disk.

@return: Version object

WARNING - DEPRECATED ( versionDown ): This method is deprecated and will not be present in future versions of the Python API. Only available versions can now be obtained from TrackItem. To find new versions, please use hiero.core.VersionScanner. To obtain the next version, please use TrackItem.prevVersion().

TrackItem.versionLinkedToBin

self.versionLinkedToBin() -> get if the TrackItem’s version is linked to the associated BinItem

@return: bool

TrackItem.versionMaxAvailable(*args, **kwargs)

self.versionMaxAvailable() -> returns the highest discovered version on this track item.

@return: Version object

WARNING - DEPRECATED ( versionMaxAvailable ): This method is deprecated and will not be present in future versions of the Python API. Only available versions can now be obtained from TrackItem. This method has been replaced by TrackItem.maxVersion().

TrackItem.versionMinAvailable(*args, **kwargs)

self.versionMinAvailable() -> returns the lowest discovered version on this track item.

@return: Version object

WARNING - DEPRECATED ( versionMinAvailable ): This method is deprecated and will not be present in future versions of the Python API. Only available versions can now be obtained from TrackItem. This method has been replaced by TrackItem.minVersion().

TrackItem.versionNextAvailable(*args, **kwargs)

self.versionNextAvailable() -> returns the next highest available version on this track item that the application has discovered.

@return: Version object

WARNING - DEPRECATED ( versionNextAvailable ): This method is deprecated and will not be present in future versions of the Python API. Only available versions can now be obtained from TrackItem. This method has been replaced by TrackItem.nextVersion().

TrackItem.versionPrevAvailable(*args, **kwargs)

self.versionPrevAvailable() -> returns the next lowest version on this track item that the application has discovered.

@return: Version object

WARNING - DEPRECATED ( versionPrevAvailable ): This method is deprecated and will not be present in future versions of the Python API. Only available versions can now be obtained from TrackItem. This method has been replaced by TrackItem.prevVersion().

TrackItem.versionUp(*args, **kwargs)

self.versionUp() -> increments the current version on this track item and returns the new version object. Creates a new version if there wasn’t one before, but doesn’t check that the versioned media source exists on disk.

@return: Version object

WARNING - DEPRECATED ( versionUp ): This method is deprecated and will not be present in future versions of the Python API. Only available versions can now be obtained from TrackItem. To find new versions, please use hiero.core.VersionScanner. To obtain the next version, please use TrackItem.nextVersion().

class hiero.core.TrackItemBase

Bases: Shiboken.Object

Base class for objects which can exist on a timeline track which provides some common methods. Not to be used directly.

clone(*args, **kwargs)

self.clone() -> returns a deep copy of this object.

WARNING - DEPRECATED ( clone ): This method is deprecated and will not be present in future versions of the Python API. This method has been replaced by copy().

copy

self.copy() -> returns a deep copy of this object.

duration

self.duration() -> returns the timeline duration value for the item.

@return: frames

guid
isEnabled

self.isEnabled() -> returns True if the track item is enabled.

@return: True or False

isNull

self.isNull() -> returns True if the track item is invalid.

@return: True or False

linkedItems

self.linkedItems() -> returns a tuple of track item objects linked to this one.

@return: tuple of linked items

move

self.move(time) -> moves the item in the sequence. This will keep the duration.

@param time: frame value. If positive, the item moves right. If negative, the item moves left.

moveTrackItems()

TrackItem.moveTrackItems(trackItems, time) -> moves a group of track items in the sequence.

@param trackItems: sequence of track items to move

@param time: frame value. If positive, the trackitems move right. If negative, the trackitems move left.

parent

self.parent() -> returns the AudioTrack or VideoTrack that contains this item.

@return: AudioTrack or VideoTrack object

parentSequence
parentTrack
project

self.project() -> returns the Project object that this is attached to, or None if the object is not attached to a project.

@return: Project object

sequence

self.sequence() -> returns the Sequence object that this is attached to, or None if the object is not attached to a project.

@return: Project object

setEnabled

self.setEnabled(enabled) -> enables or disables the track item.

@return: True or False

setTimelineIn

self.setTimelineIn(inTime) -> sets the timeline in value. Shrinks or grows the timeline duration, as appropriate.

@param inTime: frame value

setTimelineOut

self.setTimelineOut(outTime) -> sets the timeline out value. Shrinks or grows the timeline duration, as appropriate.

@param outTime: frame value

timelineIn

self.timelineIn() -> returns the timeline in value for the track item.

@return: frames

timelineOut

self.timelineOut() -> returns the timeline in value for the track item.

@return: frames

toString

self.toString() -> returns a description of the object. Equivalent to str(object).

@return: string

trimIn

self.trimIn(time) -> trims the left end of the item. This will grow or shrink the duration and the sourceDuration, but keep the playback speed.

@param time: frame value. If positive, the item duration shrinks. If negative, the item duration grows.

trimOut

self.trimOut(time) -> trims the right end of the item. This will grow or shrink the duration and the sourceDuration, but keep the playback speed.

@param time: frame value. If positive, the item duration shrinks. If negative, the item duration grows.

class hiero.core.Transition

Bases: core.Hiero.Python.TrackItemBase

Object representing a transition between two clips.

class Alignments

Bases: object

name
Transition.alignment

self.alignment() -> returns the alignment mode of this transition. Either kFadeIn, kDissolve, kFadeOut or kUnknown.

@return: alignment type (hiero.core.Transition.Alignments)

Transition.createAudioCrossfadeTransition()

self.createAudioCrossfadeTransition(trackItem1, trackItem2, duration1, duration2) -> creates a new audio crossfade (kDissolve) Transition between two adjacent track items.

The effect will start at duration frames from the end of the trackItem1 and end at duration frames from the start of trackItem2.

@param trackItem1: the earlier TrackItem object to dissolve from. Must be an Audio TrackItem.

@param trackItem2: the later TrackItem object to crossfade to. Must be an Audio TrackItem.

@param duration1: frames for the crossfade from

@param duration2: frames for the crossfade to

@return: Transition object

@seealso: createDissolveTransition for Video equivalent

Transition.createAudioFadeInTransition()

self.createAudioFadeInTransition(trackItem, duration) -> creates a new fade in (kFadeIn) Transition with the timelineIn of the trackItem and the duration specified.

@param trackItem: TrackItem object to use the timelineIn value from. Must be an Audio TrackItem.

@param duration: frames

@return: Transition object

@seealso: createFadeInTransition for Video equivalent

Transition.createAudioFadeOutTransition()

self.createAudioFadeOutTransition(trackItem, duration) -> creates a new fade out (kFadeOut) Transition. The in point will be the timelineOut of trackItem, minus the duration specified.

@param trackItem: TrackItem object to use the timelineOut value from. Must be an Audio TrackItem.

@param duration: frames

@return: Transition object

@seealso: createFadeOutTransition for Video equivalent

Transition.createDissolveTransition()

self.createDissolveTransition(trackItem1, trackItem2, duration1, duration2) -> creates a new dissolve (kDissolve) Transition between two adjacent track items.

The effect will start at duration frames from the end of the trackItem1 and end at duration frames from the start of trackItem2.

@param trackItem1: the earlier TrackItem object to dissolve from. Must be a Video TrackItem.

@param trackItem2: the later TrackItem object to dissolve to. Must be a Video TrackItem.

@param duration1: frames for the dissolve from

@param duration2: frames for the dissolve to

@return: Transition object

@seealso: createAudioCrossTransition for Audio equivalent

Transition.createFadeInTransition()

self.createFadeInTransition(trackItem, duration) -> creates a new fade in (kFadeIn) Transition with the timelineIn of the trackItem and the duration specified.

@param trackItem: TrackItem object to use the timelineIn value from. Must be a Video TrackItem.

@param duration: frames

@return: Transition object

@seealso: createAudioFadeInTransition for Audio equivalent

Transition.createFadeOutTransition()

self.createFadeOutTransition(trackItem, duration) -> creates a new fade out (kFadeOut) Transition. The in point will be the timelineOut of trackItem, minus the duration specified.

@param trackItem: TrackItem object to use the timelineOut value from. Must be a Video TrackItem.

@param duration: frames

@return: Transition object

@seealso: createAudioFadeOutTransition for Audio equivalent

Transition.guid
Transition.inTrackItem

self.inTrackItem() -> Get the in track item for this transition.

return: TrackItem

Transition.outTrackItem

self.outTrackItem() -> Get the out track item for this transition.

return: TrackItem

Transition.parent

self.parent() -> returns the AudioTrack or VideoTrack that contains this transition.

@return: AudioTrack or VideoTrack object

Transition.project
Transition.setAlignment

self.setAlignment(alignment) -> sets the alignment mode on this transition.

@param alignment: alignment type (hiero.core.Transition.Alignments), either kFadeIn, kDissolve, or kFadeOut

Transition.setTimelineIn

self.setTimelineIn(inTime) -> sets the in point for this transition. Note that this trims the duration of the transition.

@param inTime: frame for the new in point

Transition.setTimelineOut

self.setTimelineOut(outTime) -> sets the out point for this transition. Note that this trims the duration of the transition.

@param outTime: frame for the new out point

Transition.toString

self.toString() -> returns a description of the object. Equivalent to str(object).

@return: string

class hiero.core.UndoGroup

Bases: Shiboken.Object

Helper class for beginning and ending undo on a project. Recommended usage is to create with Project.beginUndo(name), using a with block for exception safety to ensure Project.endUndo() is called. For example:

with project.beginUndo(‘My Undo’):

// Undoable edits
beginUndo

self.beginUndo() -> starts a new undo action on the project with the initialised name. See Project.beginUndo()

endUndo

self.endUndo() -> ends the undo action on the project

isNull
class hiero.core.Version

Bases: Shiboken.Object

Object representing a version of a clip or sequence. Can be created with a Clip or Sequence object.

isHidden
isNull

self.isNull() -> returns True if the object is invalid, False otherwise.

@return: True or False

item

self.item() -> returns the clip or sequence stored with this version.

@return: Clip or Sequence object

name

self.name() -> returns the name of this version.

@return: string

parent

self.parent() -> returns the bin item that contains this version.

@return: BinItem object

setHidden
toString

self.toString() -> returns a description of the object. Equivalent to str(object).

@return: string

versionIndex(*args, **kwargs)

self.versionIndex() -> returns a string containing the version’s index.

@return: string

WARNING - DEPRECATED ( versionIndex ): This method is deprecated and will not be present in future versions of the Python API. Version indices are no longer unique identifiers and should not be used as such.

class hiero.core.VideoTrack

Bases: core.Hiero.Python.TrackBase

Object for manipulating video tracks.

addSubTrackItem

self.addSubTrackItem(subTrackItem, subTrackIndex) -> Add a subtrack item to the track on the given sub-track index.

This method will cut or delete sub-track items that overlap with the one being added.

@param subTrackItem: a SubTrackItem object to add.

@param subTrackIndex: the index of the sub-track to add to.

@return: the added item

addTag

self.addTag(tag) -> adds a tag to the video track item.

@param tag: the Tag to add to the video track.

addToNukeScript(script=, additionalNodes=[], additionalNodesCallback=None, includeRetimes=False, retimeMethod=None, offset=0, skipOffline=True, mediaToSkip=[], disconnected=False, includeAnnotations=False, includeEffects=True)

Add a Read node for each track item to the script with Merge or Dissolve nodes to join them in a sequence. TimeClip nodes are added to pad any gaps between clips.

@param script: Nuke script object to add nodes to. @param additionalNodes: List of nodes to be added post read, passed on to track items @param additionalNodesCallback: callback to allow custom additional node per item function([Clip|TrackItem|Track|Sequence]) @param includeRetimes: True/False include retimes @param retimeMethod: “Motion”, “Blend”, “Frame” - Knob setting for OFlow retime method @param offset: Optional, Global frame offset applied across whole script @param skipOffline: If True, offline clips are not included in the export @param mediaToSkip: List of MediaSources which should be excluded from the export @param disconnected: If True, items on the track are not connected and no constant nodes are added to fill gaps @param includeAnnotations: If True, clip-level annotations will be included in the output @param includeEffects: If True, clip-level soft effects will be included in the output

addTrackItem

self.addTrackItem(clip, position) -> if the first parameter is a Clip object, the second parameter must be specified and this method creates a new track item and adds it to this video track at the given position.

If the first parameter is a TrackItem, then this method just adds the track item specified.

This method will cut or delete track items that overlap with the one being added.

This method can only be called if the track has already been added to a Sequence.

@param clip: a Clip object or a TrackItem object, to add to this video track.

@param position: int; insert position. Do not specify if clip is a TrackItem.

@return: TrackItem object

blendMode

self.blendMode() -> returns a string representing the blend-mode as it appears in the Nuke Merge Node, if the VideoTrack object has blending enabled.

@return: String containing the blend-mode

clone(*args, **kwargs)

self.clone() -> returns a deep copy of this object.

@return: VideoTrack object

WARNING - DEPRECATED ( clone ): This method is deprecated and will not be present in future versions of the Python API. This method has been replaced by copy().

copy

self.copy() -> returns a deep copy of this object.

@return: VideoTrack object

createEffect(effectType=None, cloneFrom=None, copyFrom=None, trackItem=None, timelineIn=None, timelineOut=None, subTrackIndex=None)

self.createEffect(trackItem=None, timelineIn=None, timelineOut=None, subTrackIndex=None) -> Create an effect item and add it to the track.

The effect’s node will be of type effectType or if cloneFrom is given, will be a clone of that. It will use timing either based on trackItem if given or timelineIn and timelineOut. If none of these are specified, the effect will cover the full duration of the track’s parent sequence.

@param effectType: the node type to create a soft effect for

@param cloneFrom: if given, the new effect item will be cloned from this

@param copyFrom: if given, the new effect item will be copied from this

@param trackItem: if specified, the effect will be linked to the track item and use the same timing

@param timelineIn: the effect start time

@param timelineOut: the effect end time

@param subTrackIndex: if specified, will be placed on the appropriate sub-track, otherwise will be placed on a new sub-track

@return: the created EffectTrackItem object

createTrackItem

self.createTrackItem(name) -> creates a new track item.

@param name: the name of the new track item

@return: TrackItem object

isBlendEnabled

self.isEnabled() -> returns True if the VideoTrack object has blending enabled.

@return: True or False

isBlendMaskEnabled

self.isBlendMaskEnabled() -> returns True if the VideoTrack object has blend-masking enabled.

@return: True or False

items

self.items() -> returns a tuple with all of the track items contained by this track.

@return: tuple of TrackItem objects

parent

self.parent() -> returns the sequence that contains this track.

@return: Sequence object

removeSubTrackItem

self.removeSubTrackItem(subTrackItem, option=eRemoveLinkedItems) -> removes a sub-track item from this track.

@param subTrackItem: the SubTrackItem to remove from this track

@param option: options controlling the remove behavior. By default linked items are also removed.

removeTag

self.removeTag(tag) -> removes the tag from the video track.

@param tag: Tag object

setAllViews

self.setAllViews() -> assigns all views to a VideoTrack in the form of an empty string since that represents all views.

An error is raised if the track doesn’t have a project with multiple views.

setBlendEnabled

self.setEnabled() -> enables or disables blending on the VideoTrack, if it is not locked.

An error is raised if the track is locked.

setBlendMaskEnabled

self.setBlendMaskEnabled() -> sets whether blend-masking is enabled or not, if it is not locked.

An error is raised if the track is locked.

setBlendMode

self.setBlendMode() -> sets the blend mode to be used, if it is not locked. Expected strings are NUKE Merge Node operations.

An error is raised if the track is locked.

setView

self.setView() -> assigns a view on a VideoTrack.

An error is raised if the track doesn’t have a project with multiple views, or the specified view is invalid.

splitViewsToTracks

self.splitViewsToTracks() -> split the views to separate tracks on the Timeline.

An error is raised if the track doesn’t have a project with multiple views.

subTrackItems

self.subTrackItems() -> returns a tuple with an entry for each sub track in this track, each entry being a tuple of items

on the corresponding sub track.

@return: tuple of SubTrackItem sub-class objects

toString

self.toString() -> returns a description of the object. Equivalent to str(object).

@return: string

trackIndex
view

self.view() -> returns a string representing the view assigned to the VideoTrack. An empty string is returned if the track has multiple views assigned.

@return: String containing the view name

hiero.core.addPathRemap()

addPathRemap(windowsPathPrefix -> adds to the table of file path remapping prefixes that Hiero maintains. Pairs of path prefixes added to this table will be used to convert paths between Windows, OSX and Linux. When on Windows, Hiero will replace any Linux or OSX prefixes found with the corresponding Windows prefix. On OSX, Hiero will search for the Windows and Linux path prefixes and replace them with the corresponding OSX prefix. The same applies for OSX/Windows prefixes being replaced on Linux. These can also be configured through the user interface in the General tab of the Preferences dialog.

@param windowsPathPrefix: string

@param osxPathPrefix: string

@param linuxPathPrefix: string

@return: None

hiero.core.addPluginPath()

addPluginPath(pluginPath) -> adds a new path to the list of plugin paths searched for Python plugins (in Python/Startup and Python/StartupUI folders). The user’s .nuke folder will be the first in this list.

addPluginPath(pluginPath -> the same as above, except that the index specifies which item in the list of paths to place the new one before.

@param pluginPath: the new path to add

@param index: optional; if not specified or negative, the new path will be added to the end of the list

hiero.core.closeAllProjects()

hiero.core.closeProject() -> closes all of the existing projects without saving.

hiero.core.closeProject(bool dontSave) -> same as above, but if the parameter is set to false, unsaved projects will cause Hiero to popup a dialog for each unsaved project, asking the user if they’d like to save.

@param dontSave: True or False

hiero.core.conformer()

conformer() -> returns an interface for setting the conforming options.

@return: a Conformer object

hiero.core.defaultFrameRates()

hiero.core.defaultFrameRates() -> returns the list of frame rates displayed in Hiero’s user interface.

@return: tuple of floats

hiero.core.executeInMainThread(call, *args, **kwargs)

Execute the callable ‘call’ with optional arguments ‘args’ and named arguments ‘kwargs’ in the main thread and return immediately. Note that this method expects a single item for args or a tuple, and a dictionary for kwargs. It will not accept anything else.

Examples of how to use this method (that work):

def someMethod(firstParameter, kwArg0=None, kwArg1=None)
print firstParameter

executeInMainThread(someMethod, “First positional parameter”) executeInMainThread(someMethod, “First positional parameter”, {‘kwArg0’: “arg0”}) executeInMainThread(someMethod, (“First positional parameter”, “kwArg0 passed as positional parameter”)) executeInMainThread(someMethod, (“First positional parameter”, “kwArg0 passed as positional parameter”), {‘kwArg1’: “arg1 as well”}) executeInMainThread(someMethod, “First positional parameter”, {‘kwArg1’: “arg1”})

An example of what won’t work:

executeInMainThread(someMethod, “First positional parameter”, “Second positional parameter”)

The above fails because the second parameter to executeInMainThread must be a dictionary.

hiero.core.executeInMainThreadWithResult(call, *args, **kwargs)

Execute the callable ‘call’ with optional arguments ‘args’ and named arguments ‘kwargs’ in the main thread and wait for the result. Note that this method expects a single item for args or a tuple, and a dictionary for kwargs. It will not accept anything else.

Examples of how to use this method (that work):

def someMethod(firstParameter, kwArg0=None, kwArg1=None)
print firstParameter return kwArg1

result = executeInMainThreadWithResult(someMethod, “First positional parameter”) result = executeInMainThreadWithResult(someMethod, “First positional parameter”, {‘kwArg0’: “arg0”}) result = executeInMainThreadWithResult(someMethod, (“First positional parameter”, “kwArg0 passed as positional parameter”)) result = executeInMainThreadWithResult(someMethod, (“First positional parameter”, “kwArg0 passed as positional parameter”), {‘kwArg1’: “arg1 as well”}) result = executeInMainThreadWithResult(someMethod, “First positional parameter”, {‘kwArg1’: “arg1”})

An example of what won’t work:

result = executeInMainThreadWithResult(someMethod, “First positional parameter”, “Second positional parameter”)

The above fails because the second parameter to executeInMainThread must be a dictionary.

hiero.core.filenameList(directory, splitSequences=False, returnDirectories=True, returnHiddenFiles=True)

hiero.core.filenameList(directory, splitSequences, returnDirectories, returnHiddenFiles) -> Returns a list of strings representing the items found in the specified directory, putting image sequences together as one element.

@param directory: path to the directory to query

@param splitSequences: optional, defaults to False. If set to True, then splits broken image sequences up. Otherwise, broken sequences create only one entry in the returned list

@param returnDirectories: optional, defaults to True. If set to True, sub directories will be included in the returned list

@param returnHiddenFiles: optional, defaults to True. If set to True, hidden/system files will be returned in the list

For a directory with the following items: item1.txt item2.txt quicktime.mov highres1.dpx

You’d get a tuple with the same list of items (txt files are recognized as not being image sequences).

With a directory with the following items:
  • quicktime.mov
  • highres1.dpx
  • highres2.dpx
  • highres3.dpx
  • highres4.dpx
  • highres5.dpx

You’d get a tuple with: (“quicktime.mov”, “highres#.dpx 1-4”)

If you had the following in a directory:
  • highres1.dpx
  • highres2.dpx
  • highres4.dpx
  • highres5.dpx

Note the missing 3 in the above list. If you set splitSequences to False, you’d get: (“highres#.dpx 1-5”)

If instead you set splitSequences to True, you’d get: (“highres#.dpx 1-3”, “highres#.dpx 4-5”)

If you had a directory with this:
  • highres001.dpx
  • highres002.dpx
  • highres003.dpx
  • highres004.dpx
  • highres005.dpx

You’d get a tuple like this: (“highres###.dpx 1-5”)

If you had a directory with this:
  • highres99.dpx
  • highres100.dpx

You’d get this: (“highres#.dpx 99-100”)

In the above example, the sequence number crosses over from 2 digits to 3, so it is treated as one and the number of hashes (#) is put to 1, which means the number is wild.

If instead you had a directory with this:
  • highres099.dpx
  • highres100.dpx

You’d get this: (“highres###.dpx 99-100”)

Note that in this last example, the 99 is prefixed with 0.

hiero.core.findItems(proj=None, filter=None, partialName=None, verbose=0)

findItemsInProject -> Returns all items in a Project’s clipsBin. User can filter by a specific type(s) or by partial name, and optionally print a verbose log to the output window. Takes up to 4 keyword arguments : Project object, a string, a type or an array of strings for filter type, partial name of item, and a bool to enable/disable verbose mode Returns an array of items. Note: to find Tags in a Project, use the findProjectTags method.

@param proj: hiero.core.Project object, to find the items on. If None, then the last project in the currently loaded projects will be used. @param filter: optional. Used to filter the returned list. Can be None, a case insensitive single string or type, or a list of case insensitive strings and types. @param partialName: optional string. If specified, objects will only be returned if their name contains this string. @param verbose: optional value. If not None/False/0, findItems will print out information as it searches. @return: list of objects.

Example uses:

allItems = findItemsInProject(myProj) allSeqsAndTracksWith30SecInName = findItemsInProject(myProj, [‘sequences’, ‘Tracks’], ‘30Sec’, 1) allTracks = findItemsInProject(myProj, “Track”) videoTracks = findItemsInProject(myProj, “VideoTrack”) sequences = findItemsInProject(myProj, “Sequence”) # Can also use plural: ‘Sequences’ sequences = findItemsInProject(myProj, hiero.core.Sequence) sequencesAndClips = findItemsInProject(myProj, [hiero.core.Sequence, hiero.core.Clip]) binsOnly = findItemsInProject(myProj, hiero.core.Bin)

hiero.core.findItems is deprecated. Please use hiero.core.findItemsInProject instead.

hiero.core.findItemsInBin(rootBin, filter=None, partialName=None, verbose=0)

findItemsInBin(rootBin, filter=None, partialName=None, verbose=0) -> Returns all items recursively in a Bin, found in rootBin. @param rootBin: hiero.core.Bin object, to find the items on. @param filter: optional. Used to filter the returned list. Can be None, a case insensitive single string or type, or a list of case insensitive strings and types. @param partialName: optional string. If specified, objects will only be returned if their name contains this string. @param verbose: optional value. If not None/False/0, findItems will print out information as it searches. @return: list of objects.

Example uses: myBin = hiero.core.projects()[0].clipsBin()[0] # A hiero.core.Bin object allItemsInMyBin = findItemsInBin(myBin) allClipsAndSequencesInMyBin = findItemsInBin(myBin, filter = [hiero.core.Sequence, hiero.core.Clip]) allClipsWithPartialName = findItems(myProj, ‘clips’, ‘C00’) allSubBinsOnly = findItems(myProj, hiero.core.Bin)

hiero.core.findItemsInProject(proj=None, filter=None, partialName=None, verbose=0)

findItemsInProject -> Returns all items in a Project’s clipsBin. User can filter by a specific type(s) or by partial name, and optionally print a verbose log to the output window. Takes up to 4 keyword arguments : Project object, a string, a type or an array of strings for filter type, partial name of item, and a bool to enable/disable verbose mode Returns an array of items. Note: to find Tags in a Project, use the findProjectTags method.

@param proj: hiero.core.Project object, to find the items on. If None, then the last project in the currently loaded projects will be used. @param filter: optional. Used to filter the returned list. Can be None, a case insensitive single string or type, or a list of case insensitive strings and types. @param partialName: optional string. If specified, objects will only be returned if their name contains this string. @param verbose: optional value. If not None/False/0, findItems will print out information as it searches. @return: list of objects.

Example uses:

allItems = findItemsInProject(myProj) allSeqsAndTracksWith30SecInName = findItemsInProject(myProj, [‘sequences’, ‘Tracks’], ‘30Sec’, 1) allTracks = findItemsInProject(myProj, “Track”) videoTracks = findItemsInProject(myProj, “VideoTrack”) sequences = findItemsInProject(myProj, “Sequence”) # Can also use plural: ‘Sequences’ sequences = findItemsInProject(myProj, hiero.core.Sequence) sequencesAndClips = findItemsInProject(myProj, [hiero.core.Sequence, hiero.core.Clip]) binsOnly = findItemsInProject(myProj, hiero.core.Bin)

hiero.core.findItems is deprecated. Please use hiero.core.findItemsInProject instead.

hiero.core.findProjectTags(proj=None, tagName=None, iconName=None, verbose=0)

findProjectTags -> Returns all Tags in a project. User can filter by tag name, icon name, and optionally print a verbose log to the output window. Takes up to 4 arguments : Project object, partial name of Tag, partial icon name, and a bool to enable/disable verbose mode Returns a list of Tag objects.

@param proj: hiero.core.Project object, to find the items on. If None, then the last project in the currently loaded projects will be used. @param tagName: optional string. If specified, Tags will only be returned if their name contains this string. @param iconName: optional string. If specified, Tags will only be returned if their icon path contains this string. @param verbose: optional value. If not None/False/0, findProjectTags will print out information as it searches. @return: list of Tag objects.

Example uses:

allTags = findItems(myProj) allTagsWithNameLens = findItems(myProj, tagName = ‘Lens’) allTagsWithIconPath = findItems(myProj, iconName = ‘lens.png’)

hiero.core.formats()

formats() -> returns a tuple with all of the formats currently available.

@return: tuple of Format objects

hiero.core.getBundledNukePath()

hiero.core.getBundledNukePath() -> return the bundled Nuke executable

@return: A string containing the bundled Nuke executable path.

hiero.core.getBundledPythonPath()

hiero.core.getBundledPythonPath() -> return the bundled Python executable

@return: A string containing the bundled Python executable path.

hiero.core.getFilenameList()

Deprecated. Do not use. Use hiero.core.filenameList() instead

hiero.core.getLibraryDirectory()

getLibraryDirectory(subdirectory) -> deprecated; use libraryDirectory() instead.

hiero.core.getPluginPath()

hiero.core.getPluginPath() -> deprecated; please use hiero.core.pluginPath instead.

hiero.core.getRoleColorspace()
hiero.core.isHieroPlayer()
hiero.core.isNC()
hiero.core.isQuickTimeFileExtension(fileExtension)

Returns True if the fileExtension is a recognised QuickTime extension, False otherwise.

hiero.core.isVideoFileExtension(fileExtension)

Returns True if the fileExtension is a recognised video format extension, i.e not an image Sequence (QuickTime/MXF/R3D media)

hiero.core.libraryDirectory()

libraryDirectory(subdirectory) -> returns the input appended to the location of the user’s .nuke directory.

@param subdirectory: path to append to the .nuke directory

@return: string

hiero.core.newProject()

newProject(name -> creates and returns a new Project object. A name can optionally be given for the project.

@return: Project object

hiero.core.openProject(path)

hiero.core.openProject(path) Opens the project found at the specified path. Must be called on the main thread. Throws an exception on failure. @param path: Path to the project file (*.hrox). @return: Opened project.

hiero.core.openProjectStartup()

openProjectStartup(path -> for internal use only, hiero.core.openProject(path) should be used instead.

@return: Project object

hiero.core.overrideApplicationSettingsSetValue()
hiero.core.pathRemappings()

pathRemappings() -> returns the path remappings specified in the application preferences, or added through addPathRemap().

@return: a list of path remappings each containing the mapping for (windows, osx, linux)

hiero.core.pluginPath()

hiero.core.pluginPath() -> Returns a tuple of the search paths used by Hiero to load Python scripts.

@return: tuple of strings

hiero.core.presetProjects()

hiero.core.projects() -> returns a tuple of all of the currently loaded preset projects.

@deprecated: Use hiero.core.projects(Project.kStartupProjects) instead

@return: tuple of hiero.core.Project objects

hiero.core.project()

project(name) -> returns the Project with the specified name, if it can be found, or None.

@return: Project object

hiero.core.projects()

projects() -> returns a tuple of currently loaded projects which are user projects (not startup). Same effect as calling the method below passing Project.kUserProjects.

projects(projectTypes) -> returns a tuple of currently loaded projects, filtered according to projectTypes. Use hiero.core.projects()[-1] to get the last loaded project.

@param projectTypes: optional; one of Project.kAllProjects, Project.kUserProjects, Project.kStartupProjects

@return: tuple of Project objects

hiero.core.quit()

quit() -> shuts down Hiero, without saving any existing projects. Safer than calling sys.exit(), which doesn’t always clean up properly and can cause Hiero to crash. This version sets the exit code of the Hiero process to 0.

Note that this must be the last line in a script.

quit(exitCode) -> same as the first version of this method, except that this one sets the exit code of the process to the exitCode variable.

@param exitCode: optional; integer value to set the process’s exit code to

hiero.core.redo()
hiero.core.redoSize()
hiero.core.remapPath()

remapPath(path) -> uses the platform specific path remapping rules from the user’s preferences and applies them to the input path.

@param path: string path to apply the path remapping rules to

@return: string

hiero.core.setLocalisationForAllVersionsInProject(proj, policy)

Sets localisation policy for all Versions of All Clips in a project @param proj : hiero.core.Project @param: policy - the localisation policy from hiero.core.Clip. Options: kOnLocalize, kAutoLocalize, kOnDemandLocalize, kOffLocalize

hiero.core.setLocalisationPolicyOnBin(bin, policy, recursive=True)

Sets localisation policy for all Clips found in a Bin and recursively found in all Sub-Bins @param: clipList - a list of hiero.core.Clip objects @param: policy - the localisation policy from hiero.core.Clip. Options: kOnLocalize, kAutoLocalize, kOnDemandLocalize, kOffLocalize @param: recursive (optional, default = True) - localises all Clips found recursively in a Bin Structure

hiero.core.setLocalisationPolicyOnSequence(sequence, policy)

Sets localisation policy for all Clips used by TrackItems in a Sequence with a given policy. @param: sequence - a hiero.core.Sequence object @param: policy - the localisation policy from hiero.core.Clip. Options: kOnLocalize, kAutoLocalize, kOnDemandLocalize, kOffLocalize

hiero.core.setLocalisationPolicyOnTrack(track, policy)

Sets localisation policy for all Clips used by TrackItems in a Track with a given policy. @param: track - a hiero.core.Track object @param: policy - the localisation policy from hiero.core.Clip. Options: kOnLocalize, kAutoLocalize, kOnDemandLocalize, kOffLocalize

hiero.core.setLocalisationPolicyOnTrackItem(trackItem, policy)

Sets localisation policy for the source Clip of a TrackItem @param: track - a hiero.core.TrackItem object @param: policy - the localisation policy from hiero.core.Clip. Options: kOnLocalize, kAutoLocalize, kOnDemandLocalize, kOffLocalize

hiero.core.stopScriptAndQuit()
hiero.core.undo()
hiero.core.undoSize()

Table Of Contents

Previous topic

API Reference

Next topic

hiero.ui reference