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().
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.
self.elements() -> returns a tuple with all of the elements contained in this annotation.
@return: tuple of hiero.core.Element sub-class objects
self.toString() -> returns a description of the object. Equivalent to str(object).
@return: string
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.
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)
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.
self.toString() -> string
Returns a description of the object. Equivalent to str(object).
@return: A string describing the object.
Bases: core.Hiero.Python.AnnotationElement
A class, derived from AnnotationElement, storing a set of 2d points to represent a single stroke
within an annotation.
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)
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)].
self.toString() -> returns a description of the object. Equivalent to str(object).
@return: string
Bases: core.Hiero.Python.AnnotationElement
A class, derived from AnnotationElement, storing a single item of text within an annotation.
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)
self.fontPath() -> string
Returns the current font path for this annotation text object.
@return: A string containing the current font path.
self.horizontalJustification
Returns the horizontal justification of the text.
@return: One of eHLeft, eHCenter, eHRight, eHJustify.
self.rotation -> float
Returns the rotation angle of the text, as a floating point value in degrees.
@return: The text’s rotation angle.
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.
self.setFontPath() -> None
Sets the path to the file from which to load the font for use with this annotation text object.
self.setHorizontalJustification -> None
Set the horizontal justification of the text.
@param justify: One of eHLeft, eHCenter, eHRight, eHJustify.
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.
self.setText() -> None
Sets the text for this annotation text object.
@param text: The new text string.
self.setVerticalJustification -> None
Set the vertical justificaiton of the text.
@param justify: One of eVBaseline, eVTop, eVCenter, eVBottom.
self.text() -> string
@return: A string containing the current text for this annotation text object.
self.toString() -> returns a description of the object. Equivalent to str(object).
@return: string
self.verticalJustification
Returns the vertical justification of the text.
@return: One of eVBaseline, eVTop, eVCenter, eVBottom.
Bases: Shiboken.Object
Helper object to set and get application settings.
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
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.
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
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)
Bases: core.Hiero.Python.TrackBase
Object for manipulating audio tracks.
self.addTag(tag) -> adds a tag to the audio track item.
@param tag: the Tag to add to the audio track
@return: Tag object
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
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().
self.copy() -> returns a deep copy of this object.
@return: AudioTrack object
self.createTrackItem(name) -> creates a new track item.
@param name: the name of the new track item
@return: TrackItem object
self.items() -> returns a tuple with all of the track items contained by this track.
@return: tuple of TrackItem objects
self.toString() -> returns a description of the object. Equivalent to str(object).
@return: string
Bases: Shiboken.Object
Observer of background renders.
Bases: Shiboken.Object
Container object for BinItem objects (wrapping Clip and Sequence objects) and other Bin objects.
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
self.bins() -> returns a tuple with all of the sub bins contained by this object.
@return: tuple of Bin objects
self.clips() -> returns a tuple with all of the BinItem’s containing clips contained by this bin.
@return: tuple of BinItem objects
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
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
self.isNull() -> returns True if the object is invalid.
@return: True or False
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
self.name() -> returns the name of the bin.
@return: True or False
self.numChildren() -> returns the number of child objects contained by this bin.
@return: int
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
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
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
self.sequences() -> returns a tuple with all of the BinItem’s containing sequences contained by this bin.
@return: tuple of BinItem objects
self.toString() -> returns a description of the object. Equivalent to str(object).
@return: string
Bases: Shiboken.Object
Generic object wrapper with shared functionality for sequences and clips.
self.activeItem() -> returns the item contained by this bin item.
self.activeVersion() -> gets the currently active Version object of the bin item.
@return: Version object
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
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
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().
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
WARNING - DEPRECATED ( hasVersion ): 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.hasVersionClip() instead, or check membership to BinItem.items().
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
self.isNull() -> returns True if the object contains a invalid Sequence or Clip object.
@return: True or False
self.items() -> returns a tuple containing all of the different versions of this object.
@return: tuple of Version objects
self.maxVersion() -> finds the maximum (last) version and sets it as the active version on this bin item. Offline versions and hidden versions will be ignored during the search.
@return: Version object
self.minVersion() -> finds the minimum (first) version and sets it as the active version on this bin item. Offline versions and hidden versions will be ignored during the search.
@return: Version object
self.name() -> returns the name of the item.
@return: string
self.nextVersion() -> finds the next version and sets it as the active version on this bin item. Offline versions and hidden versions will be ignored during the search.
@return: Version object
self.numSnapshots() -> returns the number of snapshots that this bin item has.
@return: int
self.numVersions() -> returns the number of versions for this bin item.
@return: int
self.parentBin() -> returns the bin object that contains this bin item.
@return: Bin object
self.prevVersion() -> finds the previous version and sets it as the active version on this bin item. Offline versions and hidden versions will be ignored during the search.
@return: Version object
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
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
self.setActiveVersion(version) -> sets the active version to the version parameter.
@return: Version object
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.
self.snapshots() -> returns a tuple of all of the snapshots contained by this object.
@return: tuple of Snapshot objects
self.toString() -> returns a description of the object. Equivalent to str(object).
@return: string
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
WARNING - DEPRECATED ( version ): 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.items() instead.
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().
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().
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().
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().
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().
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().
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.
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.
self.addTag() -> adds the tag to the set of tags attached to the Clip.@param tag: the tag object to add
@return: Tag object
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
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 FrameRange 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 enabled: enabled status of the read node. True by default @param useOCIO: Use open colourIO nodes for colour space transform
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().
self.entityReference() -> returns this clip’s asset management system entity reference.
@return: string
self.isLocalised() -> returns whether the clip is completely localised.
@return: bool
self.isNull() -> returns False if this is a valid Clip object, True otherwise.
@return: True or False
self.localisationPolicy() -> returns the localisation policy of the clip.
@return: LocalisationPolicy
self.localisationProgress() -> returns the localisation progress of the clip, where 0 is totally non-localised and 1 is completely localised.
@return: double
self.mediaSource() -> returns the clip’s media source.
@return: MediaSource object
self.isNull() -> returns a copy of the clip’s metadata.
@return: hiero.core.Metadata object
self.numAudioTracks() -> returns number of audio tracks contained by this clip.
@return: int
self.numVideoTracks() -> returns number of video tracks contained by this clip.
@return: int
self.reconnectMedia(path) -> Reconnect the Clip with media found in the specified path.
@param path: path containing media to reconnect to
self.refresh() -> updates the clip if the source media has changed.
self.rescan() -> updates the clip and rescan the frame range if the source media has changed.
self.setEntityReference(location) -> set this clip’s (asset management system) entity reference.
@param location: Asset management system’s string identifier for the entity.
self.setFrameRange() -> Sets the clip frame range to the specified values.
self.setLocalisationPolicy() -> sets the localisation policy to the clip.
@param localisationPolicy: localisation policy to apply to the clip
self.setSourceMediaColourTransform(colourTransform) -> sets the input colour transform for the source media.
@param colourTransform: Colour transform name
self.sourceIn() -> returns the source in value for the clip.
@return: frame
self.sourceMediaColourTransform() -> returns colour transform for the source media.
@return: string
self.sourceOut() -> returns the source out value for the clip.
@return: frame
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.
self.activate() -> adds this conform rule to the list of conform rules. Conform operations done after this call will use the rule.
self.appliesToTrackItems() -> should return True if this conform rule applies to track items.
@return: True or False; default implementation returns True
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
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
self.deactivate() -> removes this conform rule from the list of conform rules. Conform operations done after this call will not use the rule.
self.name() -> should return True if the conform rule is invalid.
@return: True for invalid, False otherwise
self.name() -> returns the name of the conform rule (which was passed to the object in it’s initializer).
@return: string
self.toString() -> returns a description of the object. Equivalent to str(object).
@return: string
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.
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.
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.
self.includeAlreadyMatched() -> returns the state of re-conform media flag.
@return: True when the tracks that already have media attached will be re-conformed.
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.
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.
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.
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.
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.
self.setExcludeNonOverlappingTimecode( flag ) -> controls whether matching is done on media which does not have timecode which overlaps the track item.
self.setExcludePatterns( filepatterns ) -> sets the list of file patterns to exclude from source media searches.
self.setIncludeAlreadyMatched( flag ) -> controls whether to re-connect tracks that already have media matched to them.
self.setIncludePatterns( filepatterns ) -> sets the list of file patterns to include in source media searches.
self.setNativeRuleFiltering( ruleFiltering ) -> uses a dictionary keyed on the names of the native conforming rules to set whether each rule is enabled for conforming.
self.setPythonRuleFiltering( ruleFiltering ) -> uses a dictionary keyed on the names of the Python conforming rules to set whether each rule is enabled for conforming.
self.setUseBestTimecodeMatch( flag ) -> controls whether to accept the best timecode match if no rules match.
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.
Bases: Shiboken.Object
Storage objects for key/value pairs. Generally used to store metadata.
self.dict() -> returns a dictionary of key/value pairs. Can be used to iterate over the items in this collection.
@return: dict
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
self.keys() -> returns keys in the collection.
@return: list of strings which are keys in the collection
self.readOnly(key) -> returns True if the collection can be modified.
@return: True or False
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
self.toString() -> returns a formatted list of the key/value pairs currently set on this object. Equivalent to str(object).
@return: string
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
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)
self.clone() -> returns a deep copy of this object but, unlike copy(), this clones the underlying Nuke node so that the knobs are shared.
self.declone() -> Declones the effect item. Has no effect if the item is not a clone.
self.isValid() -> Returns true if the effect item is in a valid state and position and false otherwise.
self.name() -> Get the name of the effect’s node.
@return: string
self.node() -> Node
Get the node used to apply the effect.
@return: The effect node.
self.setName() -> Set the name of the effect’s node.
Bases: core.Hiero.Python.IExportStructure
ExportStructrure2 is the implimentation of the datastructure used to represent the export tree, each node within the tree is represented by an ExportStructureElement.
Resolve a child element in the hierarchy by path. Return None if path does not resolve to an element
Returns the exportRootPath, the root of the export into which the export structure is built
Return the hierarchy as a list of (path, preset) tuples
Restore the hierarchy from a list of (path, preset) tuples
Return the root element in this hierarchy. The root element is not included in the path generation
Set the exportRootPath, the root of the export into which the export structure is built
Bases: core.Hiero.Python.IExportStructureElement
ExportStructureElement represents a node within the export structure
Add a child to this Element
Return a child by index
Return the number of children
Given a child element, identify and return the index of the child within the children array. Reutrns -1 if child not found.
Return a list of children
Clear all the children
Return a string representing the Content of this Element
Create and add child element
Build Child Elements from XML data
Returns True if node is flagged as leaf and may not accept children
Return the name of this Element
Return the parent element of this Element
Return the path of this Element
Return the preset assigned to this Element. May be None
Remove a child from this Element
Return a string representing the Content of this Element
Set the parent element of this Element
Set the preset assigned to this Element. May be None
setPresetType(self, identifier) @param identifier : Unique identifier from the Task which is used to associate the preset type
Serialize Element and children to XML
Bases: Shiboken.Object
Object for Flipbook manager
self.createClip(filepath) -> creates and return a flipbook clip for the defined filepath.
@return: Clip
self.createEffectItem(effectType) -> creates and return a flipbook Soft Effect with defiend effectType.
@return: EffectTrackItem
self.createSequence(framerate, outputformat) -> creates and returns a flipbook sequence with the defined framerate and ouput formar.
@return: Sequence
self.updateOCIOConfig(ocioConfigPath) -> updates the flipbook OCIO setting with the defined ocio config filename.
@return: None
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(
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
self.aspect() -> returns the aspect ratio of this format.
@return: float
self.cleanAperture() -> returns a 4 element tuple with the rectangle (x1, y1, x2, y2) of the clean aperture.
@return: tuple
self.height() -> returns the height of this format.
@return: int
self.isValid() -> returns whether or not this format object has valid data.
@return: True or False
self.name() -> returns the name of this format.
@return: string
self.pixelAspect() -> returns the pixel aspect ratio of this format.
@return: float
self.productionAperture() -> returns a 4 element tuple with the rectangle (x1, y1, x2, y2) of the production aperture.
@return: tuple
self.toString() -> returns a description of the object. Equivalent to str(object).
@return: string
self.width() -> returns the width of this format
@return: int
Bases: Shiboken.Object
Base class to be derived from in order to populate an ExportStructureViewer widget, such as the one used in the Export dialog box. IExportStructure objects provides access to a root node, which has to be an object derived from IExportStructureElement, which the ExportStructureViewer widget then uses to determine the tree structure to display to the user. For an example of how to derive from this class, see Plugins/site-packages/hiero/core/FnExportStructure.py. For an example use of a derived IExportStructure object, see Plugins/site-packages/hiero/exporters/FnShotProcessor.py. It will often be more than sufficient to just use an ExportStructure2 object, instead of subclassing IExportStructure directly.
self.childElement(path) -> should return an object derived from IExportStructureElement, representing a child with the path specified.
@param path: the path to the new (or existing) child element
@return: IExportStructureElement derived object
self.exportRootPath() -> retrieves the root path for the export structure.
@return: string
self.rootElement() -> should return a IExportStructureElement super class object, representing the root of the export file structure.
@return: IExportStructureElement derived object
self.setExportRootPath(path) -> called when the user has modified the export root path, to inform the object of the new path.
@param path: the new user supplied path to export to.
Bases: Shiboken.Object
Base class to be derived from and used in conjunction with a custom implementation of IExportStructure. For an example of how to derive from this class, see Plugins/site-packages/hiero/core/FnExportStructure.py.
self.addChild(newChild) -> should append the new child item to this node’s children, and set the parent on the child to this node.
@param newChild: IExportStructureElement object
self.child(index) -> should return the child of this node, based on the index.
@param index: int index of the child to return
@return: IExportStructureElement object
self.childCount() -> should return the number of child nodes on this item.
@return: int
self.childIndex(exportElementChild) -> if the parameter is a child of this node, then this method should return the index of that child amongst the node’s other children.
@param exportElementChild: IExportStructureElement object
@return: int
self.clearChildren() -> clears all of the children nodes from this node.
self.content() -> should return the stored content of this element.
@return: string
self.createChild(name, isLeaf) -> should create and add a child element with the given name, setting the parent to this node. Should only do so if a child of that name didn’t already exist. Should also handle creating sub children if the name includes slashes, similar to the setName method. Should return the newly created child or the existing child if it didn’t create one.
@param name: the name for the new node
@param isLeaf: True or False value for whether or not this is a leaf node
@return: IExportStructureElement object
self.fromXml(xmlText) -> should reinitialize the node from the xml text, and recreate the preset and all child nodes as well. If initialized using taskRegistry._savePresetElement, taskRegistry._loadPresetElement can be used to get data back out.
@param xmlText: xml formatted text, as a result of a call in the past to the toXml method
self.isLeaf() -> should return True if this is a node with no children, otherwise it should return False.
@return: True or False
self.name() -> should return the name of this element.
@return: string
self.parent() -> should return the parent node of this object.
@return: IExportStructureElement object
self.path() -> should return the full path to this node, including the path of any parents of this node.
@return: string
self.preset() -> should return an object derived from TaskPreset, representing the task associated with this element of the export structure.
@return: hiero.core.TaskPreset derived object
self.removeChild(child) -> should remove the child from the node’s list of children
@param child: IExportStructureElement child object to remove
self.setName(name) -> called to tell the node it’s name. Should create children if the name includes any slashes (/) in it.
@param name: string
self.setParent(newParent) -> should set the parent of this element.
@param newParent: IExportStructureElement object
self.setPreset(preset) -> tells the object that the user has selected a new preset for this particular export element.
@param preset: a hiero.core.TaskPreset derived object, which can be used to create a task to process later on during an export.
self.setPresetType(presetType) -> called to tell the object to set the task preset type by name. The taskRegistry can be used with this ‘type’ to create the preset to store.
@param presetType: the name of the task preset to create/use.
self.toXml() -> should return a string of formatted xml which can be sent to the fromXml method later to read it back. The xml should include the preset data for this node, as well as the children, and should be in proper xml format. This can be done easily with xml.etree.cElementTree, especially because the taskRegistry has methods to write out xml for presets and other objects (taskRegistry._savePresetElement)
@return: string
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.
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
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() -> 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
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
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
self.startPresetChanges(hiero.core.Project) -> Discard any changes to the presets since startPresetChanges() was called.
@param: hiero.core.Project)
self.loadPresets(string) -> Called by the C++ application to load presets from a specified path.
@param: path as string
self.projectPresets() -> Returns a list of local presets assigned to the specified Project.
@return: list of TaskPreset instances
self.localPresetsChanged() -> Called by the C++ application to check whether local presets have changed since last save.
@return: bool changed state
self.markProjectPresetsUnchanged(hiero.core.Project) -> Called by the C++ application to reset project presets changed flag, when a project is saved.
@param: Project
self.nukeShotExportPresets(hiero.core.Project) -> Get a list of presets which are contain Nuke shot exports.
@return: list of TaskPreset instances
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
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
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
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
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
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
self.projectPresetsChanged(hiero.core.Project) -> Called by the C++ application to check whether project presets have changed since project last save.
@param: Project
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
self.registerme() -> Called from python implimentation of TaskRegistry to register instance as the Application Task Registry.
self.removeProcessorPreset(hiero.core.TaskPreset) -> Called by the C++ application to remove a preset from the registry.
@param: hiero.core.TaskPreset
self.renameProcessorPreset(hiero.core.TaskPreset, string) -> Called by the C++ application to rename a preset in the registry.
@param: hiero.core.TaskPreset
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
self.revertDefaultPresets(string) -> Called by the C++ application reconstruct the default presets.
@param: path as string
self.savePresets(string) -> Called by the C++ application to save presets to a specified path.
@param: path as string
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)
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
Bases: Shiboken.Object
IProcessor provides a simple interface for our C++ Application to access python instances of Processors.
This class should not be used directly; use hiero.core.ProcessorBase instead.
self.displayName() -> returns processor’s name.
@return: string
self.startProcessing() -> starts processing given items.
@param items: list of items.
self.validateSelection(items) -> validates if given items are suitable for processing by this processor.
@param items: list of items.
@return: bool
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.
self.addToQueue() -> adds this task into the task queue.
self.children() -> get a list of child tasks. Note that this list should not change after addToQueue() has been called.
self.clearError() -> clears the error or warning string for this task.
self.destinationDescription() -> Get the destination description.
self.error() -> Get the error string if one has been set.
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).
self.forcedAbort() -> called by Hiero when the user presses the Abort button. Subclasses should do any clean up in their override of this method.
self.formatDescription() -> Get a description of the format that this task writes to.
self.ident() -> called by Hiero to get a unique identifier for this task.
self.progress() -> called by Hiero to find out from the task what it’s progress is, between 0.0 and 1.0.
self.setDestinationDescription(desc) ->
@param desc: string
self.setDuplicate() -> Sets the flag cancelling this task and marking as duplicate.
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
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
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
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
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
self.startTask() -> called by Hiero to tell the Task to start. Subclasses should start processing in their override of this method.
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.
self.taskDescription() -> Get a description of the task.
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.
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.
self.getResolveEntryCount() -> called by Hiero to get the number of resolve tokens available on this TaskPreset.
self.ident() -> called by Hiero to get a unique identifier for the Task related to this TaskPreset.
self.markedForDeletion() -> called by Hiero to check if the preset is marked for deletion.
self.name() -> called by Hiero to get the preset name.
self.project() -> called by Hiero to discover which Project (if any), this preset is assigned to
self.propertiesValue() -> called by Hiero to access base level properties within the preset dictionary.
self.readOnly() -> called by Hiero to discover if this preset is marked ReadOnly.
self.resolveEntryDescription() -> called by Hiero to get a resolve token description by index.
self.resolveEntryName() -> called by Hiero to get a resolve token ({shot}) by index.
self.setMarkedForDeletion() -> called by Hiero to mark this preset for deletion. The delete is not performed until presets are saved.
self.setProject() -> called by Hiero to assign a preset to a Project.
self.setPropertiesValue() -> called by Hiero set base level properties within the preset dictionary.
self.setReadOnly() -> called by Hiero to mark this preset as ReadOnly.
self.summary() -> called by Hiero to get the preset description.
self.supportedItems() -> called by Hiero to establish what types of object this export task operates on (Clips, Sequences, TrackItems).
self.supportsAudio() -> returns whether or not this task preset supports audio.
@return: True or False
Bases: Shiboken.Object
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
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
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
self.isNull() -> returns True if this is a invalid or uninitialized item, or False otherwise
@return: True or False
self.item() -> Return the item contained within this wrapper.
@return: Sequence | Clip | TrackItemBase | BinItem
self.name() -> Returns item name.
@return: string
self.root() -> the root is the highest level in the bin selected for export, Root may be null.
@return: Bin object
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
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
Bases: Shiboken.Object
LUTs() -> returns a tuple with the names of all of the available luts.
@return: tuple of strings
Bases: Shiboken.Object
Object representing a single set of media files on disk.
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
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:
In the case of the image sequence above, the numbers between the brackets represent the first and last frame of the sequence.
@return: string
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
Bases: Shiboken.Object
Represents a media source.
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
@return: True or False
self.duration() -> returns the duration, in frames.
@return: frames
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
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
self.filenameHead() -> returns the portion of filename before the frame index for an image sequence.
@return: string
self.filenameHead() -> returns the number characters used for frame index. -1 if not an image sequence.
@return: int
self.firstpath() -> returns the full path of the first file used for the MediaSource.
Deprecated; Please use the fileinfos() method instead.
@return: string
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
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
self.hasAudio() -> True if the source has audio.
@return: True or False
self.hasVideo() -> True if the source has video.
@return: True or False
self.height() -> returns the height of the media.
@return: int
self.isMediaPresent() -> returns True if the media is present.
@return: True or False
self.isNull() -> True if the object points to an invalid source, False otherwise.
@return: True or False
self.isOffline() -> returns True if the media is missing or unavailable for any reason.
@return: True or False
self.metadata() -> returns a hiero.core.Metadata object with metadata for the MediaSource.
@return: hiero.core.Metadata object
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
self.pixelAspect() -> returns the pixel aspect ratio of the media.
@return: float
self.refresh() -> updates source info for latest changes in underlying files but doesn’t update the frame range
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
self.startTime() -> returns the start time of the media.
@return: int
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
self.width() -> returns the width of the media.
@return: int
Bases: Shiboken.Object
Utility object for extracting names for clips, versions and objects out of clip objects
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 customised naming schema. Use default_clipName for default functionality if needed.
@param clip: a clip to extract the name from
@return: string
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
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
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
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 customised naming schema. Use default_rootName for default functionality if needed.
@param clip: a clip to extract the name from
@return: string
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 customised naming schema. Use default_versionName for default functionality if needed.
@param clip: a clip to extract the name from
@return: string
Bases: core.Hiero.Python.IProcessor
ProcessorBase is the base class from which all Processors should derrive. ProcessorBase impliments the hiero.core.IProcessor interface, for interaction with the C++ Application.
The Processor object is responible for taking the object selection and spawning Tasks with the appropriate parameters.
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() Walk Tasks in submission and mark any duplicates.
Get if the task is able to run on the item it was initialised with.
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
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]
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’)
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’)
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
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’)
buildTrackName() -> get default track name used when building vfx trackthis can be configured in the project settings dialog
self.cancelUndo() -> cancels an undo action started previously by a call to self.beginUndo().
clearUnusedLocalFiles() -> clear all localised files that are not in any currently open project. This requires localisation to be enabled
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’)
self.clipsBin() -> returns the bin object containing the top level clips, sequences and bins for this project.
@return: Bin object
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.
self.deletable() -> returns True if the project can be deleted.
@return: True or False
self.editable() -> returns True if the project can be edited.
@return: True or False
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.
self.extractSettings() -> returns a dict of the project’s settings. @return: dict
isLocalisationEnabled() -> return whether localisation is enabled
@return whether localisation is enabled
self.isNull() -> returns False if this is a valid Project object, True otherwise.
@return: True or False
self.isRestricted() -> returns whether or not access to the project is restricted.
@return: True or False
self.lutSetting16Bit() -> returns the project’s 16 bit lut setting name.
@return: string
self.lutSetting8Bit() -> returns the project’s 8 bit lut setting name.
@return: string
self.lutSettingFloat() -> returns the project’s float lut setting name.
@return: string
self.lutSettingLog() -> returns the project’s log lut setting name.
@return: string
self.lutSettingsViewer() -> returns the project’s viewer lut setting name.
@return: string
self.lutUseOCIOForExport() -> returns the project setting for using OCIO in nuke script export.
@return: bool
self.name() -> returns the name of the project.
@return: string
self.ocioConfigPath() -> returns the project settings for the ocio config path.
@return: string
self.path() -> returns the path to the project.
@return: string
self.projectRoot() -> Get root path of the project used by default when sending to nuke or using {projectroot} token in export.
@return: string
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.
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
self.save() -> saves a previously saved project to disk.
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
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’)
self.setDeletable(deletable) -> sets whether or not a project can be deleted.
@param deletable: True or False
self.setEditable(editable) -> sets whether or not a project can be edited.
@param editable: True or False
setLocalisationEnabled() -> set whether localisation is enabled. This will persist when the application is restarted.
@param whether localisation should be enabled
self.setProjectRoot() -> Set root path of the project used by default when sending to nuke or using {projectroot} token in export.
@param: path to set as project root
self.setShotPresetName() -> set the name of Shot Preset which is usedwhen sending to nuke or creating a comp.
@param: name
self.shotPresetName() -> get the name of Shot Preset which is usedwhen sending to nuke or creating a comp.
@return: string
self.tagsBin() -> returns the bin object containing the top level tags for this project.
@return: Bin object
self.toString() -> returns a description of the object. Equivalent to str(object).
@return: string
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’)
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’)
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.
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
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’)
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’)
Bases: Shiboken.Object
Object representing a the reformatting settings for a track item. This corresponds to the Nuke ‘Reformat’ node.
self.boxForceShape() -> returns the box ‘force shape’ flag.
@return: bool
self.boxPAR() -> returns the box pixel aspect ratio.
@return: double
self.boxSize() -> returns the box size.
@return: QSize
self.resizeCenter() -> returns the resize center flag.
@return: bool
self.resizeFlip() -> returns the resize flip flag.
@return: bool
self.resizeFlop() -> returns the resize flop flag.
@return: bool
self.resizeTurn() -> returns the resize turn flag.
@return: bool
self.resizeType() -> returns the resize type.
@return: string
self.scale() -> returns the scaling factor.
@return: double
self.setBoxForceShape() -> sets the box ‘force shape’ flag if the reformat type is set to ‘to box’.
@param setBoxForceShape: bool
self.setBoxPAR() -> sets the box pixel aspect ratio if the reformat type is set to ‘to box’.
@param PAR: double
self.setBoxSize() -> sets the box size if the reformat type is set to ‘to box’.
@param size: QSize
self.setResizeCenter() -> sets the resize center flag on the track item.
@param center: bool
self.setResizeFlip() -> sets the resize flip flag on the track item.
@param flip: bool
self.setResizeFlop() -> sets the resize flop flag on the track item.
@param flop: bool
self.setResizeTurn() -> sets the resize turn flag on the track item.
@param turn: bool
self.setResizeType() -> sets the resize type of the state.
@param newResizeType: string
self.setScale() -> sets the scaling factor if the reformat type is set to ‘scale’.
@param value: double
self.setType() -> sets the reformat type of the state.
@param newType: string
self.toString() -> returns a description of the object. Equivalent to str(object).
@return: string
self.type() -> returns the reformat type of the state.
@return: string
Bases: Shiboken.Object
Observer for tracking the progress of renders on the frame server.
RenderProgressObserver.updateProgress() -> called on progress of frame renders
@param progressList: list of tuples containing (filePath, frame, progress)
Bases: hiero.core.FnExporterBase.TaskPresetBase
RenderTaskPreset is a specialization of the TaskPreset which contains parameters associated with generating Nuke render output.
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
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.
self.entryCount() -> returns the number of entries in this resolver.
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.
self.entryCount(index) -> returns the name of the entry based on the index.
Bases: core.Hiero.Python.SequenceBase
Object for Sequences.
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
self.addTag(tag) -> add a tag to the Sequence.
@param tag: the tag to add (hiero.core.Tag object)
@return: Tag object
self.addTagToRange(tag, inTime, outTime) -> adds the tag to the specified range of the 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
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 useOCIO: If True, use open colourIO nodes for colour space transform @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.
self.addTrack(track) -> adds a video or audio track to the Sequence.
@param track: video or audio track to add
self.audioTrack(index) -> returns the audio track for the specified index.
@param index: index of the audio track to return
@return: AudioTrack
self.audioTracks() -> returns a tuple with all of the audio tracks.
@return: tuple of AudioTrack objects
self.changeFramerateKeepFrames(toTimebase) -> changes the timebase of the sequence, keeping frames of track items the same
@param toTimebase: timebase to change to
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)
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().
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
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
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
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
self.matchMedia(path) -> match media using the current rule configuration in conformer().
@param path: path to the folder with the media to connect
self.numAudioTracks() -> returns number of audio tracks contained by this sequence.
@return: int
self.numVideoTracks() -> returns number of video tracks contained by this sequence.
@return: int
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
self.removeTrack(track) -> removes the track from the Sequence.
@param track: track to remove (hiero.core.AudioTrack or VideoTrack object)
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
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
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
self.videoTrack(index) -> returns the video track for the specified index.
@param index: index of the video track to return
@return: VideoTrack
self.videoTracks() -> returns a tuple with all of the video tracks.
@return: tuple of VideoTrack objects
Bases: Shiboken.Object
Base class for Sequence and Clip objects. Has some methods common to both of those objects. Most likely never used directly.
self.addTag(tag) -> adds a Tag object to the Clip or Sequence.
@param tag: the tag object to add
@return: Tag object
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
self.binItem() -> returns the parent BinItem this Sequence or Clip belongs to, if any.
@return: BinItem
self.clearInTime(t) -> clear the ‘in’ point for the clip to Time t.
@return: None
self.clearInTime(t) -> clear the ‘out’ point for the clip to Time t.
@return: None
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
self.disableSoftTrims() -> disables soft trims on the object.
self.dropFrame() -> get whether sequence timecode is displayed in drop frame format
self.duration() -> returns the duration of the Clip or Sequence.
@return: int time value
self.editFinished() -> 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).
self.enableSoftTrims(inTime, outTime) -> enables soft trims on the object.
@param inTime: Time - soft trim in time
@param outTime: Time - soft trim out time
self.format() -> returns the output Format object for this Sequence or Clip.
@return: Format object
self.framerate() -> returns the framerate of the Sequence or Clip.
@return: TimeBase object
self.inTime() -> returns the ‘in’ point set on the clip.
@return: frame
self.isNull() -> returns False if this is a valid Sequence or Clip object, True otherwise.
@return: True or False
self.metadata() -> returns a collection of metadata for the object.
@return: DataCollection object
self.name() -> returns the name of the object.
@return: string
self.outTime() -> returns the ‘out’ point set on the clip.
@return: frame
self.posterFrame() -> get the frame in the sequence used for thumbnails
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
self.rawView() -> returns a string representing the raw view of this sequence or clip.
@return: string
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
self.setDropFrame(drop) -> set whether sequence timecode is displayed in drop frame format
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 )
self.setFramerate(framerate) -> set the framerate of the Sequence or Clip.
@param framerate: framerate value to set
self.setInOutEnabled(enable) -> Enable/Disable the ‘in’ and ‘out’ points.
@return: None
self.setInTime(t) -> set the ‘in’ point for the clip to Time t.
This will also enable the In/Out lock.
@return: None
self.setName() -> set the name of the object.
@param: string new name
self.setOutTime(t) -> set the ‘out’ point for the clip to Time t.
This will also enable the In/Out lock.
@return: None
self.setPosterFrame(frame) -> set the frame in the sequence used for thumbnails
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
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
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
self.softTrimsEnabled() -> returns True if soft trims are enabled, False otherwise.
@return: True or False
self.softTrimsInTime() -> returns the in time set for the soft trims.
@return: frame
self.softTrimsOutTime() -> returns the out time set for the soft trims.
@return: frame
self.tags() -> returns a tuple of all of the tags applied to this object.
@return: tuple of Tag objects
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
self.timecodeStart() -> returns the frame value of the start timecode. To convert this to a time code string, use TimeCode.timeToString.
@return: frame
self.timelineOffset() -> returns the timeline offset value.
@return: frame
self.toString() -> returns a description of the object. Equivalent to str(object).
@return: string
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
Bases: Shiboken.Object
Object representing a snapshot of a sequence or clip. Can be created with a Clip or a Sequence object.
self.comment() -> returns the comment set on this snapshot object.
@return: string
self.isNull() -> returns True if the object is invalid, False otherwise.
@return: True or False
self.item() -> returns the clip or sequence stored with this snapshot.
self.name() -> returns the name of this snapshot.
@return: string
self.setComment(comment) -> sets the comment on this snapshot object.
@param comment: string to set the comment to
@return: string
self.toString() -> returns a description of the object. Equivalent to str(object).
@return: string
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.
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
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
self.toString() -> returns a description of the object. Equivalent to str(object).
@return: string
Bases: Shiboken.Object
Object representing a tag in Hiero. Can be created with a string name and an optional path to an icon.
self.guid() -> Return the Tag guid.
@return: object guid as string
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
self.inTime() -> returns the in time of the tag.
@return: frame
self.isNull() -> returns True if the tag is invalid, False otherwise.
@return: True or False
self.metadata() -> returns the clip’s metadata.
@return: DataCollection object
self.name() -> returns the label of the tag.
@return: string
self.note() -> returns the note on the tag.
@return: string
self.outTime() -> returns the out time of the tag.
@return: frame
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
self.setIcon() -> sets the icon on the tag.
@param note: path to icon file
self.setInTime(time) -> set the in time of the tag.
@param time: the in time
self.setNote() -> sets the note on the tag.
@param note: string note to assign to tag
self.setOutTime(time) -> set the out time of the tag.
@param time: the out time
self.setVisible() -> sets the visiblity of the tag.
@param visible: visibility state
self.toString() -> returns a description of the object. Equivalent to str(object).
@return: string
self.visible() -> gets the visiblity state of the tag.
@return bool
Bases: core.Hiero.Python.ITask
TaskBase is the base class from which all Tasks must derrive.
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
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(self) Returns the name of the clip in the bin
editId(self) Returns a str containing the id of this edit. See hiero.core.TrackItem.eventNumber().
edlEditId(self) Returns the id taken from the EDL used to create this edit, if there was one.
filename(self) Returns the source items filename if applicable
filebase(self) Returns the source items file path less extension if applicable
fileext(self) Returns the source items file extention if applicable
filehead(self) Returns the source filename excluding image sequence frame padding and extension, if applicable
filepadding(self) Returns the padding used in source file if an image sequence, empty string otherwise
finishTask() Called once Task has signaled completion. Sub-classes should call this base implementation.
Get if the task is able to run on the item it was initialised with.
ident(self) Returns a string used for identifying the type of export task
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
Check if this task is already including an item in its export. Used for preventing duplicates when collating shots into a single script.
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) @return : (in_handle, out_handle) tuple
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
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.
preSequence() This function serves as hook for custom scripts to add functionality on completion of exporting the contents of the sequence
preSequence() This function serves as hook for custom scripts to add functionality before a task starts exporting anything with the sequence
Print summary of the task parameters
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(self) Returns the name of the project, used for resolving the {project} token)
projectRoot(self) Returns the project root export path, used for resolving the {projectroot} token
Replace any recognized tokens in path with their current value.
resolvedExportPath() returns the output path with and tokens resolved
sequenceName(self) Returns the name of the sequence or parent sequence (if exporting a track item)
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(self) Returns the Tasks track item name
shotNameIndex(self) Returns the index string for the shot, if there are multiple shots with the same name on the sequence.
startTask() Called when task reaches head of the export queue and begins execution
Interface for defining what type of items a Task Supports. Return True to indicate @param item is of supported type
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(self) Returns the datetime object from time of task creation
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(self) Returns the name of the parent track
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.
versionString(self) Returns the version string used to resolve the {version} token
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
Bases: core.Hiero.Python.ITask
TaskGroup is a Task which maintains a list of child Tasks.
Add a child to the list.
Get the TaskGroup’s children.
Get the group progress. Returns a value based on the progress of child tasks.
Bases: hiero.core.FnExporterBase.TaskPresetBase
Deprecated - Use TaskPresetBase
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(self, resolver) Impliment this function on custom export tasks to add resolve entries specific to that class.
@param resolver : ResolveTable object
addDefaultResolveEntries(self, resolver) Create resolve entries for default resolve tokens shared by all task types. @param resolver : ResolveTable object
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(self) Instantiate ResolveTable, add default and custom resolve entries return ResolveTable object
getResolveEntryCount(self) (DEPRICATED) Return the number of resolve entries in the resolve table
ident(self) Returns a string used for identifying the type of task
Return True if this preset is marked for deletion. Delete will be performed at save
Return Preset Name
nonPersistentProperties() Return the dictionary which contains properties not persisted within the preset. Properties which are only relevant during a single session. @return dict
parentType(self) Returns a the parent Task type for this TaskPreset. @return TaskPreet class type
Return the Project with which this preset is associated. If this is a local preset returns None
properties() Return the dictionary which is used to persist data within this preset. @return dict
Accessor of properties() for C++ code
Return the read only flag for this preset
resolveEntryCount(self) Return the number of resolve entries in the resolve table
resolveEntryDescription(self, index) return ResolveEntry description by index
resolveEntryName(self, index) return ResolveEntry name/token by index
savePath(self) Return the path from which this preset was loaded. Will return None if this preset was not loaded from file
Set the list of comps to render.
Set the list of comps to skip.
Set this preset as marked for deletion. Delete will be performed at save
Set Preset Name
Set the Project() object which this preset is associated
Accessor of properties() for C++ code
Set Read Only flag on preset, not enforced internally
setSavePath(self, path) Set the save path of the preset in order to ensure it is saved to the path it was loaded from
skipOffline(bool) Set flag to skip offline TrackItems during export. @param bool
skipOffline() Returns True if flag has been set to skip any offline TrackItems @return bool
Called by Hiero to get a summary of the preset settings as a string.
Bases: core.Hiero.Python.IExporterRegistry
Add a preset to the export history for a project.
Register Processor Preset Instance
Assign preset to project and ensure name is unique within project. Project may be None in which case preset will be assigned ‘local’
Duplicate a preset and assign it to a project imediately to prevent name clashes
Create a copy of a preset. The copy is not added to the registry.
Instantiate the Processor associated with preset and startProcessing items
Attempt to find a preset in a project’s export history.
Get the id (hash) of the given 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).
Load all xml presets within specified path and register
Returns a list of preset names NOT associated with the specified project
Check if the local task presets have changed since startPresetChanges() was called.
Mark the task presets for the current project as unchanged. Once called, projectPresetsChanged(project) will return False unless the user makes a change.
Get a list of presets which can export shots as Nuke scripts. Includes local presets and those in the project.
Return the total number of Processor preset instances registered
Return the number or processors in the Registry
Returns the number of Tasks Registered
Deserialize preset from xml string. Requires derived TaskPreset classes to be registered.
Serialise a TaskPreset to XML and return as string
Resolve preset ident string to Preset class type
Returns a processor by index
Return type of task from preset name
Returns a Processor name by index
Return instance of TaskPreset Object
Returns the preset with specified name associated with project. If project is None preset will be searched for in local presets
Return the name of Processor preset by index
Returns a tuple of Processor Preset names
Called on project clone to duplicate the associated project presets
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++.
Returns a list of preset names associated with the specified project
Check if the task presets for the given project have changed since markProjectPresetsUnchanged(project) was called.
Called on project unload to remove presets associated with project
Register a preset instance and association with parentType
Register the association between a Processor and ProcessorPreset
Register the association between a Task and TaskPreset
Remove Processor preset from registry
Validate and update name of Processor Preset
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++.
Save all registered presets, as xml, to path specified
Returns a Task name by Index
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.
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
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
self.denominator() -> gets the denominator of the time base.
@return: int
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(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
self.isNTSC() -> returns True if the time base is NTSC (24*1000/1001, 30*1000/1001, or 60*1000/1001).
@return: True or False
self.isValid() -> returns True if the denominator of the time base is non-zero.
@return: True or False
self.numerator() -> gets the numerator of the time base.
@return: int
self.supportsDropFrames() -> returns True if the time base supports drop frames (only true for 30 or 60 fps NTSC currently).
@return: True or False
self.toFloat() -> returns the time base value expressed as a floating point value.
@return: float
self.toInt() -> returns the time base value, rounded to the nearest integer.
@return: int
self.toRational() -> returns a tuple of the numerator and the denominator of the time base.
@return: tuple of integers
self.toRationalString() -> returns a string containing the time base expressed as a ratio, for example ‘30000/1001’.
@return: string
self.toString() -> returns a string containing the time base as a floating point number. Equivalent to str(object).
@return: string
Bases: Shiboken.Object
Helper module to convert back and forth between (frames and time bases) and time code values.
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
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
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
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
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
Bases: Shiboken.Object
Base class for VideoTrack and AudioTrack objects. This class should never be used directly.
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
self.addTag(tag) -> adds the specified tag to the Track.
@param tag: Tag object to apply to the track
@return: a Tag object
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.
@param transition: the Transition to add to this track
@return: a Transition object
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
self.isEnabled() -> returns True if the Track object is enabled.
@return: True or False
self.isLocked() -> returns True if the Track object is locked.
@return: True or False
self.isNull() -> returns True if the Track object is invalid.
@return: True or False
self.metadata() -> returns the metadata for this Track.
@return: DataCollection object
self.name() -> returns the name of the track. Identical to calling trackName().
@return: string
self.numItems() -> returns the number of items in this track.
@return: int
self.numTransitions() -> returns the number of transitions in this track.
@return: int
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
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
self.removeItem(trackItem) -> removes a track item from this track.
@param trackItem: the TrackItem to remove from this track
self.removeTag(tag) -> removes the tag from the track.
@param tag: tag object
self.removeTransition(transition) -> removes a transition from the timeline of this track.
@param transition: the Transition to remove from this track’s timeline
self.setEnabled() -> enables or disables the Track.
self.setLocked() -> locks or unlocks the Track.
@return: True or False
self.setName() -> Sets the name of a track.
@param: string
self.tags() -> returns a tuple of all of the tags applied to this object.
@return: tuple of Tag objects
self.toString() -> returns a description of the object. Equivalent to str(object).
@return: string
self.trackName() -> returns the name of the track. Identical to calling name().
@return: string
self.transitions() -> returns a tuple of all of the transitions applied to this track object.
@return: tuple of Transition objects
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.
self.addTag(tag) -> adds a new tag to the track item.
@param tag: tag object
@return: a Tag object
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
self.currentVersion() -> returns a version object for the current version set on this track item.
@return: Version object
self.eventNumber() -> Get the event number of this track item on it’s Sequence.
@return: integer event number
self.handleInLength() -> returns the length of the track item’s in handle.
@return: frames
self.handleInTime() -> returns the track item’s in handle time.
@return: frames
self.handleOutLength() -> returns the length of the track item’s out handle.
@return: frames
self.handleOutTime() -> returns the track item’s out handle time.
@return: frames
self.inTransition() -> returns the in transition for this track item.
@return: Transition object
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.isSequence() -> returns True if the track item represents a sequence. If it does, you can create a new Sequence object with this track item.
@return: True or False
self.isSource() -> returns True if the track item represents a media source. If it does, you can create a new MediaSource object with this track item.
@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
self.mapTimelineToSource(time) -> Map from the track item’s source time to timeline time.
@param time: time to map
@return mapped time
self.mapTimelineToSource(time) -> Map from timeline time to the track item’s source time.
@param time: time to map
@return mapped time
self.maxVersion() -> returns the highest discovered version on this track item.
@return: Version object
self.mediaType() -> returns media type for the track item.
@return: MediaType object
self.metadata() -> returns the metadata for the track item.
@return: DataCollection object
self.minVersion() -> returns the lowest version on this track item.
@return: Version object
self.name() -> returns the track item’s name.
@return: string
self.nextVersion() -> returns the next highest available version on this track item that the application has discovered.
@return: Version object
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
self.outTransition() -> returns the out transition for this track item.
@return: Transition object
self.playbackSpeed() -> returns the playback speed of this track item.
@return: double
self.prevVersion() -> returns the next lowest version on this track item that the application has discovered.
@return: Version object
self.reconnectMedia(path) -> Reconnects media for the Clip used by the TrackItem, using the specified path.
@param path: path containing media to reconnect to
self.reformatState() -> returns the reformat state for the track item.
@return: ReformatState object
self.removeTag(tag) -> removes the tag from the track item.
@param tag: Tag object
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
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
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.
self.setName(name) -> sets the name of the track item.
@param name: the value to set the track name to
self.setPlaybackSpeed(newSpeed) -> sets the playback speed of this track item.
@param newSpeed: double
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
self.setSourceIn(time) -> sets the source in for the track item. This will shrink or grow the duration.
@param time: frame value
self.setSourceMediaColourTransform(colourTransform) -> sets the input colour transform for the source media.
@param colourTransform: Colour transform name
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
self.setTimelineIn(inTime) -> sets the timeline in value. Shrinks or grows the timeline duration, as appropriate.
@param inTime: frame value
self.setTimelineOut(outTime) -> sets the timeline out value. Shrinks or grows the timeline duration, as appropriate.
@param outTime: frame value
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
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
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
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
self.setSourceMediaColourTransform() -> returns colour transform for the media source.
@return: string
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
self.tags() -> returns a tuple of all of the tags applied to this object.
@return: tuple of Tag objects
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
self.unlink(trackItem) -> Unlinks this track item from given track item.
@param trackItem: track item from which this track item is being unlinked
self.unlinkAll() -> Unlink all track items that are linked to this one.
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().
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().
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().
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().
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().
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().
Bases: Shiboken.Object
Base class for objects which can exist on a timeline track which provides some common methods. Not to be used directly.
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().
self.copy() -> returns a deep copy of this object.
self.duration() -> returns the timeline duration value for the item.
@return: frames
self.isEnabled() -> returns True if the track item is enabled.
@return: True or False
self.isNull() -> returns True if the track item is invalid.
@return: True or False
self.linkedItems() -> returns a tuple of track item objects linked to this one.
@return: tuple of linked items
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.
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.
self.parent() -> returns the AudioTrack or VideoTrack that contains this item.
@return: AudioTrack or VideoTrack object
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
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
self.setEnabled(enabled) -> enables or disables the track item.
@return: True or False
self.setTimelineIn(inTime) -> sets the timeline in value. Shrinks or grows the timeline duration, as appropriate.
@param inTime: frame value
self.setTimelineOut(outTime) -> sets the timeline out value. Shrinks or grows the timeline duration, as appropriate.
@param outTime: frame value
self.timelineIn() -> returns the timeline in value for the track item.
@return: frames
self.timelineOut() -> returns the timeline in value for the track item.
@return: frames
self.toString() -> returns a description of the object. Equivalent to str(object).
@return: string
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.
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.
Bases: core.Hiero.Python.TrackItemBase
Object representing a transition between two clips.
self.alignment() -> returns the alignment mode of this transition. Either kFadeIn, kDissolve, kFadeOut or kUnknown.
@return: alignment type (hiero.core.Transition.Alignments)
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
@param trackItem2: the later TrackItem object to dissolve to
@param duration1: frames for the dissolve from
@param duration2: frames for the dissolve to
@return: Transition object
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
@param duration: frames
@return: Transition object
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
@param duration: frames
@return: Transition object
self.inTrackItem() -> Get the in track item for this transition.
return: TrackItem
self.outTrackItem() -> Get the out track item for this transition.
return: TrackItem
self.parent() -> returns the AudioTrack or VideoTrack that contains this transition.
@return: AudioTrack or VideoTrack object
self.setAlignment(alignment) -> sets the alignment mode on this transition.
@param alignment: alignment type (hiero.core.Transition.Alignments), either kFadeIn, kDissolve, or kFadeOut
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
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
self.toString() -> returns a description of the object. Equivalent to str(object).
@return: string
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
self.beginUndo() -> starts a new undo action on the project with the initialised name. See Project.beginUndo()
self.endUndo() -> ends the undo action on the project
Bases: Shiboken.Object
Object representing a version of a clip or sequence. Can be created with a Clip or Sequence object.
self.isNull() -> returns True if the object is invalid, False otherwise.
@return: True or False
self.item() -> returns the clip or sequence stored with this version.
self.name() -> returns the name of this version.
@return: string
self.toString() -> returns a description of the object. Equivalent to str(object).
@return: string
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.
Bases: core.Hiero.Python.TrackBase
Object for manipulating video tracks.
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
self.addTag(tag) -> adds a tag to the video track item.
@param tag: the Tag to add to the video track.
Add a Read node for each track item to the script with AppendClip nodes to join them in a sequence. Blank Constants 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 useOCIO: Use open colourIO nodes for colour space transform @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
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
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().
self.copy() -> returns a deep copy of this object.
@return: VideoTrack object
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
self.createTrackItem(name) -> creates a new track item.
@param name: the name of the new track item
@return: TrackItem object
self.items() -> returns a tuple with all of the track items contained by this track.
@return: tuple of TrackItem objects
self.removeSubTrackItem(subTrackItem) -> removes a sub-track item from this track.
@param subTrackItem: the SubTrackItem to remove from this track
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
self.toString() -> returns a description of the object. Equivalent to str(object).
@return: string
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
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 .hiero 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.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
conformer() -> returns an interface for setting the conforming options.
@return: a Conformer object
hiero.core.defaultFrameRates() -> returns the list of frame rates displayed in Hiero’s user interface.
@return: tuple of floats
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):
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.
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):
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, 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).
You’d get a tuple with: (“quicktime.mov”, “highres#.dpx 1-4”)
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”)
You’d get a tuple like this: (“highres###.dpx 1-5”)
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.
You’d get this: (“highres###.dpx 99-100”)
Note that in this last example, the 99 is prefixed with 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.
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)
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.
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’)
formats() -> returns a tuple with all of the formats currently available.
@return: tuple of Format objects
hiero.core.getBundledNukePath() -> return the bundled Nuke executable
@return: A string containing the bundled Nuke executable path.
hiero.core.getBundledPythonPath() -> return the bundled Python executable
@return: A string containing the bundled Python executable path.
Deprecated. Do not use. Use hiero.core.filenameList() instead
getLibraryDirectory(subdirectory) -> deprecated; use libraryDirectory() instead.
hiero.core.getPluginPath() -> deprecated; please use hiero.core.pluginPath instead.
hiero.core.hieroNukePath() -> returns the HieroNuke executable path which ships with Hiero. DEPRECATED Use getBundledNukePath() instead.
@return: A string containing the HieroNuke executable path.
hiero.core.isHieroPlayer() -> returns True if Application is HieroPlayer, False otherwise.
@return: True if the Application is HieroPlayer, False otherwise.
Returns True if the fileExtension is a recognised QuickTime extension, False otherwise.
Returns True if the fileExtension is a recognised video format extension, i.e not an image Sequence (QuickTime/MXF/R3D media)
libraryDirectory(subdirectory) -> returns the input appended to the location of the user’s .hiero directory.
@param subdirectory: path to append to the .hiero directory
@return: string
newProject() -> creates and returns a new Project object.
@return: Project object
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.
openProjectStartup(path -> for internal use only, hiero.core.openProject(path) should be used instead.
@return: Project object
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() -> Returns a tuple of the search paths used by Hiero to load Python scripts.
@return: tuple of strings
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
project(name) -> returns the Project with the specified name, if it can be found, or None.
@return: Project object
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
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
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
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: kAlwaysLocalise, kAutoLocalise, kNeverLocalise
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: kAlwaysLocalise, kAutoLocalise, kNeverLocalise @param: recursive (optional, default = True) - localises all Clips found recursively in a Bin Structure
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: kAlwaysLocalise, kAutoLocalise, kNeverLocalise
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: kAlwaysLocalise, kAutoLocalise, kNeverLocalise
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: kAlwaysLocalise, kAutoLocalise, kNeverLocalise