hiero.ui reference

hiero.ui method and class details

class hiero.ui.BinView

Bases: Shiboken.Object

Object representing the Bin View. Passed as the sender object to the event handler callbacks registered for hiero.core.events.EventType.kShowContextMenu type events. Can also be retrieved using currentContextMenuView when active during the context menu events.

getSelection

Deprecated; please use the selection method instead.

@return: tuple of BinItem objects

selection

self.selection() -> returns a tuple with the currently selected items.

@return: tuple of BinItem objects

window

self.window() -> Return the bin view window

class hiero.ui.CodecSettings

Bases: Shiboken.Object

Object to manage codec specific settings. Currently only supports quicktime settings, and only on Mac and Windows.

codecList

self.codecList() -> returns a list of available QuickTime codecs.

@return tuple of strings

getQuickTimeCodec

self.getQuickTimeCodec(settings) -> deprecated; please use CodecSettings.quickTimeCodec instead.

@return string

getQuickTimeSettingsAsString

self.getQuickTimeSettingsAsString(settings) -> deprecated; please use CodecSettings.quickTimeSettingsAsString instead.

@return string

quickTimeCodec

self.quickTimeCodec() -> returns the human readable codec name encoded in the settings string, which will have been set with a call to showQuickTimeSettingsDialog previously.

@return string

quickTimeFrameRate

self.quickTimeFrameRate() -> returns the frame rate setting, which will have been set with a call to showQuickTimeSettingsDialog previously.

@return float

quickTimeKeyFrameRate

self.quickTimeKeyFrameRate() -> returns the rate at which to encode key frames, which will have been set with a call to showQuickTimeSettingsDialog previously.

@return int

quickTimeQuality

self.quickTimeQuality() -> returns the quality setting, which will have been set with a call to showQuickTimeSettingsDialog previously.

@return int

quickTimeSettingsAsString

self.quickTimeSettingsAsString(settings) -> converts a QuickTime format settings string (as returned from self.showQuickTimeSettingsDialog()) into a human readable string.

@param settings: string of QuickTime encoded settings, as returned at some point in the past from CodecSettings.showQuickTimeSettingsDialog

@return human readable settings string

showQuickTimeSettingsDialog

self.showQuickTimeSettingsDialog() -> brings up the QuickTime settings dialog box, on Mac and Windows only. Returns a string representing the settings, in a QuickTime specific (non-human-readable) format.

self.showQuickTimeSettingsDialog(settings, fps) -> same as the above, but takes in a QuickTime formatted settings string and an fps to set for the initial values in the dialog.

self.showQuickTimeSettingsDialog(settings, fps, quality, keyframerate, codec) -> same as the above, but with more parameters.

To see the return value in a human readable form, pass it to self.quickTimeSettingsAsString(settings). You can also retrieve other values set from this method, with quickTimeCodec, quickTimeKeyFrameRate and quickTimeQuality

@param settings: a settings string previously returned from this method, or a 0-length string ()

@param fps: frame rate to default the dialog to

@param quality: integer value indicating quality slider setting

@param keyframerate: integer value indicating when to generate key-frames

@param codec: string name of the codec to preselect

@return string

class hiero.ui.ExportStructureViewer

Bases: PySide2.QtWidgets.QWidget

class EditMode

Bases: object

name
ExportStructureViewer.addFile
ExportStructureViewer.addFolder
ExportStructureViewer.allowNodeDelete
ExportStructureViewer.clearResolveEntries
ExportStructureViewer.copy
ExportStructureViewer.cut
ExportStructureViewer.exportRootChanged
ExportStructureViewer.filenameField
ExportStructureViewer.getWidget
ExportStructureViewer.handleSelectionChanged
ExportStructureViewer.initUI
ExportStructureViewer.itemTypes
ExportStructureViewer.keyPressEvent
ExportStructureViewer.paste
ExportStructureViewer.refresh
ExportStructureViewer.refreshContentField
ExportStructureViewer.removeNode
ExportStructureViewer.selectFileIfOnlyOne
ExportStructureViewer.selectFirstFile
ExportStructureViewer.selection
ExportStructureViewer.selectionAnchor
ExportStructureViewer.selectionRect
ExportStructureViewer.setAllowNodeDelete
ExportStructureViewer.setExportStructure
ExportStructureViewer.setItemTypes
ExportStructureViewer.setProject
ExportStructureViewer.setResolveEntry
class hiero.ui.FormatChooser

Bases: PySide2.QtWidgets.QComboBox

currentFormat
setCurrentFormat
setProject
class hiero.ui.IExporterUIRegistry

Bases: Shiboken.Object

IExporterUIRegistry provides a simple interface for our C++ Application to access the Python instance of TaskUIRegistry.

This class should not be used directly; use hiero.ui.TaskUIRegistry instead.

aquireProcessorUI

self.aquireProcessorUI() -> Called from Hiero Application to aquire a reference to an instance of the ProcessorUI object related to the specified hiero.core.TaskPreset.

@param preset : ITaskPreset

getProcessorUI
getProcessorUIForPreset
getTaskUI
getTaskUIForPreset
numProcessorUIs
numTaskUIs
registerme

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

releaseProcessorUI

self.releaseProcessorUI() -> Called from Hiero Application to release the reference to a IProcessorUI object previously aquired using IExporterUIRegistry.aquireProcessorUI.

@param processorUI : IProcessorUI

class hiero.ui.IProcessorUI

Bases: Shiboken.Object

IProcessorUI provides a simple interface for our C++ Application to access Python instances of ProcessorUIBase.

This class should not be used directly; use hiero.ui.ProcessorUIBase instead.

class EditMode

Bases: object

name
IProcessorUI.displayName

self.displayName() -> called by Hiero to get the Display name of a task for displaying in UI.

@return: string

IProcessorUI.populateUI

self.populateUI() -> called by Hiero to allow the IProcessorUI to populate a QWidget with the ui widgets neccessary to reflect the current preset.

The EditMode is used to instruct the UI generation code to build in ReadOnly mode

@param processorUIWidget: PySide2.QtGui.QWidget@param taskUIWidget: PySide2.QtGui.QWidget@param items: [hiero.core.ItemWrapper]@param editMode: IProcessorUI.EditMode

IProcessorUI.preset

self.preset() -> called by Hiero to get the TaskPreset which this TaskUI is currently reflecting.

@return: ITaskPreset

IProcessorUI.refreshContent
IProcessorUI.savePreset
IProcessorUI.setPreset

self.setPreset() -> called by Hiero to set the TaskPreset which this TaskUI will reflect.

@param preset: ITaskPreset

IProcessorUI.toolTip

self.toolTip() -> called by Hiero to get the desciption of a task for displaying in UI as a tooltip.

@return: string

IProcessorUI.validate

self.validate() -> called by Hiero to get .

@param: [hiero.core.ItemWrapper,]@return: bool

IProcessorUI.validateSelection
class hiero.ui.ITaskUI

Bases: Shiboken.Object

ITaskUI provides a simple interface for our C++ Application to access Python instances of TaskUIBase.

This class should not be used directly; use hiero.ui.TaskUIBase instead.

displayName

self.displayName() -> called by Hiero to get the Display name of a task for displaying in UI.

@return: string

ident

self.ident() -> called by Hiero to get a unique identifier linking this TaskUI with a Task and TaskPreset.

@return: string

populateUI

self.populateUI() -> called by Hiero to allow the TaskUI to populate a QWidget with the ui widgets neccessary to reflect the current preset.

@param widget: PySide2.QtGui.QWidget@param exportTemplate: hiero.core.IExportStructure

preset

self.preset() -> called by Hiero to get the TaskPreset which this TaskUI is currently reflecting.

@return: ITaskPreset

setPreset

self.setPreset() -> called by Hiero to set the TaskPreset which this TaskUI will reflect.

@param preset: ITaskPreset

hiero.ui.InvalidOutputResolutionMessage(message)
class hiero.ui.MediaFlagsChooser

Bases: PySide2.QtWidgets.QWidget

class hiero.ui.Player

Bases: Shiboken.Object

Object representing a video player in Hiero. Players are used by Viewer objects, and can be retrieved using the player() method of Viewer objects.

class Channels

Bases: object

name
Player.LUT

self.LUT() -> returns the name of the LUT currently in use by the player.

@return: string

class Player.MaskOverlayStyle

Bases: object

name
class Player.ProxyResolution

Bases: object

name
class Player.WarningOverlay

Bases: object

name
Player.alphaIsTransparent

self.alphaIsTransparent() -> returns whether the player treats the alpha channel as premultiplied transparency (True) or not (False).

@return: True or False

Player.centerImage

self.centerImage() -> centers the player, resetting the pan values.

Player.channels

self.channels() -> returns channel(s) that the player is currently displaying.

@return: Player.Channels object

Player.displayGain

self.displayGain() -> returns the current gain of the player. Defaults to 1.0

@return: float

Player.displayGamma

self.displayGamma() -> returns the current gamma of the player. Since the viewer displays pixels in linear space, this value defaults to 1.0.

@return: float

Player.guideOverlay

self.guideOverlay() -> returns the guide overlays displayed in the player.

@return: sequence of foundry.ui.Drawing

Player.ignorePixelAspectRatio

self.ignorePixelAspectRatio() -> returns whether the player ignores the pixel aspect ratio or not.

@return: True or False

Player.maskOverlay

self.maskOverlay() -> returns the drawing used as the mask overlay in the player.

@return: foundry.ui.Drawing

Player.maskOverlayStyle

self.maskOverlayStyle() -> returns the current drawing style of the mask overlay used by the player.

@return: Player.MaskOverlayStyle

Player.pan

self.pan(dx, dy) -> pans the player by (dx, dy).

@param dx: float value to pan in x by

@param dy: float value to pan in y by

Player.proxyResolution

self.proxyResolution() -> get the current proxy resolution setting for the player

@return Player.ProxyResolution

Player.sequence

self.sequence() -> returns the object currently being played.

@return Clip object or Sequence object, depending on what is currently playing

Player.setAlphaIsTransparent

self.setAlphaIsTransparent( alphaIsTransparent ) -> sets whether the player treats the alpha channel as premultiplied transparency.

@param alphaIsTransparent: True to have the player treat alpha as premultiplied transparency, False otherwise

Player.setChannels

self.setChannels(channels) -> sets the channels to display in the player. It’s currently either one of the channels or red, green and blue.

@param channels: Player.Channels object

Player.setDisplayGain

self.setDisplayGain(gain) -> sets the gain of the player.

@param gain: float

Player.setDisplayGamma

self.setDisplayGamma(gamma) -> sets the gamma of the player.

@param gamma: float

Player.setGuideOverlay

self.setGuideOverlay(guideOverlays) -> sets the guide overlays to display in the player.

@param guideOverlays: sequence of foundry.ui.Drawing

Player.setIgnorePixelAspectRatio

self.setIgnorePixelAspectRatio(ignorePixelAspectRatio) -> tells the player whether or not to display in anamorphic mode.

@param ignorePixelAspectRatio: True to have the player ignore the pixel aspect ratio, False otherwise

Player.setLUT

self.setLUT(lut) -> sets the LUT to use in the player. If the lut doesn’t exist, will raise an exception.

@param lut: string name of the lut to use

Player.setMaskOverlay

self.setMaskOverlay(aspect) -> sets the drawing to use for the mask overlay.

@param aspect: foundry.ui.Drawing

Player.setMaskOverlayStyle

self.setMaskOverlayStyle(style) -> sets the drawing style of the mask overlay.

@param Player.MaskOverlayStyle style

Player.setProxyResolution

self.setProxyResolution(resolution) -> set the player proxy resolution.

@param resolution: Player.ProxyResolution

Player.setSequence

self.setSequence(clip) -> deprecated; use Viewer.setSequence instead

Player.setWarningOverlay

self.setWarningOverlay(warningOverlay) -> sets the warning overlay.

@param warningOverlay: One of the following enums: eWarningNone, eWarningExposure, eWarningPAL or eWarningNTSC

Player.time

self.time() -> gets the time of the playhead.

@return: frame number

Player.warningOverlay

self.warningOverlay() -> returns player’s warningOverlay.

@return: One of the following enums: eWarningNone, eWarningExposure, eWarningPAL or eWarningNTSC

Player.zoomAbsolute

self.zoomAbsolute(centerX, centerY, zoom) -> scales the image to an absolute value. The centerX and centerY values are currently ignored.

self.zoomAbsolute(zoom) -> scales the image to an absolute value

@param zoom: float value scale by

@param centerX: unused

@param centerY: unused

Player.zoomRelative

self.zoomRelative(centerX, centerY, zoomFactor) -> scales the image relatively and repositions the image.

@param centerX: new x center of the image, in image pixels

@param centerY: new y center of the image, in image pixels

@param zoom: float value scale by

Player.zoomToActualSize

self.zoomToActualSize() -> scales and centers the image to the full size of the image.

Player.zoomToFill

self.zoomToFill() -> scales the image so that it fills the player window.

Player.zoomToFit

self.zoomToFit() -> scales the image so that it fits in the player window, maintaining the pixel aspect ratio.

Player.zoomToFitHeight

self.zoomToFitHeight() -> scales the image so that the height of the image fits in the player window, maintaining the pixel aspect ratio.

Player.zoomToFitWidth

self.zoomToFitWidth() -> scales the image so that the width of the image fits in the player window, maintaining the pixel aspect ratio.

Player.zoomToHalfSize

self.zoomToActualSize() -> scales and centers the image to half the size of the image.

class hiero.ui.ProcessorUIBase(preset, itemTypes)

Bases: ui.Hiero.Python.IProcessorUI

ProcessorUIBase is the base class from which all Processor UI components must derive. Defines the UI structure followed by the specialised processor UIs.

checkOfflineMedia(exportItems)
checkUnrenderedComps(exportItems)

Check for unrendered comps selected for export and ask the user what to do.

createPathPreviewWidget()

Create a widget for showing a preview of the expanded export path.

createProcessorSettingsWidget(exportItems)

Create the UI for processor-specific settings. To be reimplemented by subclasses.

createVersionWidget()

Create a widget for selecting the version number for export.

findCompItems(items)

Search for comp clips and track items in a list of ItemWrappers.

findOfflineMedia(exportItems)
findTagsForItems(exportItems)

Find tags for the export items.

getTaskItemType()
isTranscodeExport()

Check if there are transcode tasks in this export.

offlineMediaPrompt(messageText, messageDetails, hasOnline)
onExportStructureModified()

Callback when the export structure is modified by the user.

onExportStructureSelectionChanged()

Callback when the selection in the export structure viewer changes.

onExportStructureViewerDestroyed()

Callback when the export structure viewer is destroyed. Qt will delete it while we still have a reference, so reset to None when the destroyed() signal is emitted.

onVersionIndexChanged(value)

Callback when the version index changes.

onVersionPaddingChanged(padding)

Callback when the version padding changes.

populateUI(processorUIWidget, taskUIWidget, exportItems)

Build the processor UI and add it to widget.

preset()

Get the export preset.

processorSettingsLabel()

Get the label which is put on the tab for processor-specific settings. To be reimplemented by subclasses.

projectFromSelection(items)
refreshContent()

Refresh the content area of this ProcessorUI

savePreset()

Save the export template to the preset.

setPreset(preset)

Set the export preset.

setTaskContent(preset)

Get the UI for a task preset and add it in the ‘Content’ tab.

skipOffline()
toTrackItems(items)
updatePathPreview()

Update the path preview widget for the currently selected item in the tree view.

validate(exportItems)

Validate settings in UI. Return False for failure in order to abort export.

class hiero.ui.RenderTaskUIBase(taskType, preset, displayName)

Bases: hiero.ui.FnExporterBaseUI.TaskUIBase

RenderTaskUIBase is a specialization of TaskUIBase which reflects the codec properties in RenderTaskPreset into UI

buildCodecUI(layout, itemTaskType)

Populate layout with widgets reflected from the RenderPresetBase class

buildEncoderPropertiesWidget(file_type)

Create the encoder properties widget. This is only used for the settings in the mov32/64 encoders.

codecTypeComboBoxChanged(value)
createChannelsWidget(layout)
createCodecOptionsPlaceholder(layout)
createCodecPropertyWidgets(file_type, propertyDictionaries)

Create widgets for the given property dictionaries, and add them to the given layout.

createColourSpaceWidget(layout)
createFileTypeWidget(layout)
createReformatWidgets(layout, itemTaskType)
createViewsWidget(layout)
deleteFirstChildFromWidget(widget)

Get the first child added to the widget’s layout, and delete it, if it exists.

encoderComboBoxChanged()
formatChanged()
movCodecComboBoxChanged()
propertyChanged()
reformatChanged()

Callback when the Reformat combo box selection has changed. Enable/disable the reformat property widgets as appropriate.

setFormat(format)
updateChannelsForFileType(fileType)
updateCodecPropertiesWidget(file_type)

Update the codec properties widget. If applicable, also updates the encoder properties (for movs).

class hiero.ui.SpreadsheetView

Bases: Shiboken.Object

beginSelectionUpdate

self.beginSelectionUpdate() -> Call beginSelectionUpdate before, and endSelectionUpdate after, making multiple setSelection.

endSelectionUpdate

self.endSelectionUpdate() -> Call beginSelectionUpdate before, and endSelectionUpdate after, making multiple setSelection.

selectAll

self.selectAll( )

Select All TrackItems within current sequence.

selectNone

self.selectNone( )

Unselect all TrackItems.

selection
sequence
setSelection

self.setSelection( TrackItem )

self.setSelection( [hiero.core.TrackItem] )

Will throw exception if selection is not subset of current sequence.

@param selection : track item(s) to be selected.

window

self.window() -> Return the spreadsheet view window

class hiero.ui.TaskUIBase(taskType, preset, displayName)

Bases: ui.Hiero.Python.ITaskUI, PySide2.QtCore.QObject

TaskUIBase is the base class from hich all TaskUI components should derrive

displayName()

Exporter name to be displayed in the UI

ident()
initializeAndPopulateUI(widget, exportTemplate)
initializeUI(widget)
parentType()
populateUI(widget, exportTemplate)

populateUI() Export dialog to allow the TaskUI to populate a QWidget with the ui widgets neccessary to reflect the current preset.

preset()

Return Preset currently assigned to ExporterUI

setPreset(preset)

Assign Preset to ExporterUI

setProject(project)

Set the project being used for the current export.

setTags(tags)

setTags passes the subset of tags associated with the selection for export

setTaskItemType(type)
taskItemType()
class hiero.ui.TaskUIRegistry

Bases: ui.Hiero.Python.IExporterUIRegistry

Registry/factory for ITaskUI and IProcessorUI objects.

getNewTaskUIForPreset(preset)

Get a new instance of the task UI class for the preset.

getProcessorUI(index)

Return ProcessorUI registered at specified index

getProcessorUIForPreset(preset)

Return ProcessorUI object associated with the preset type. Note that this returns a stored instance of the preset.

getTaskUI(index)

Return TaskUI registered at specified index

getTaskUIForPreset(preset)

Return TaskUI object associated with the preset type. Note that this returns a stored instance of the preset, which is suitable for calling from C++ code. For actually constructing UIs, getNewTaskUIForPreset() should be called to create a new object.

numProcessorUIs()

Get the number of registered IProcessorUI classes.

numTaskUIs()

Get the number of registered ITaskUI classes.

processorUIByIndex(index)

Return ProcessorUI registered at specified index

registerProcessorUI(processorPreset, processorUI)

Register IProcessorUI class and associate with IProcessorPreset class

registerTaskUI(taskPreset, taskUI)

Register an ITaskUI class and associate with an ITaskPreset class

class hiero.ui.TimelineEditor

Bases: Shiboken.Object

Object representing the Timeline Editor.

beginSelectionUpdate

self.beginSelectionUpdate() -> Call beginSelectionUpdate before, and endSelectionUpdate after, making multiple setSelection.

endSelectionUpdate

self.endSelectionUpdate() -> Call beginSelectionUpdate before, and endSelectionUpdate after, making multiple setSelection.

getSelection

Deprecated; please use the selection method instead.

@return: tuple of TrackItem and Transition objects

selectAll

self.selectAll( )

Select All TrackItems within current sequence.

selectNone

self.selectNone( )

Unselect all TrackItems and Tracks.

selection

self.selection() -> returns a tuple with the currently selected items.

@return: tuple of TrackItem and Transition objects

sequence

self.sequence() -> returns the Sequence currently being edited in the timeline editor.

@return: Sequence object

setSelection

self.setSelection( TrackItem )

self.setSelection( [hiero.core.TrackItem] )

Will throw exception if selection is not subset of current sequence.

@param selection : track item(s) to be selected.

setTrackSelection

self.setTrackSelection( TrackBase )

self.setTrackSelection( [hiero.core.TrackBase] )

Will throw exception if selection is not subset of current sequence.

@param selection : Tracks to be selected.

window

self.window() -> Return the timeline editor window

class hiero.ui.VersionWidget

Bases: PySide2.QtWidgets.QSpinBox

Widget for editing version indices and padding. This extends QSpinbox to allow the user to add leading zeroes to specify padding.

padding()
setPadding(padding)
sizeHint()
textFromValue(value)
valueFromText(text)
class hiero.ui.Viewer

Bases: Shiboken.Object

Object for manipulating viewers in Hiero. Get the currently active viewer by calling currentViewer().

class CompareMode

Bases: object

name
class Viewer.LayoutMode

Bases: object

name
Viewer.cachedFrames

self.cachedFrames() -> get the frames which are currently cached in the viewer.

@return: set containing the indices of the cached frames

Viewer.compareMode

self.compareMode() -> returns the compare mode for the viewer. Can only be called from the user interface thread. Use hiero.core.executeInMainThread if you need to call it from a non-ui thread.

@return: a Viewer.CompareMode object

Viewer.enterFullScreen

self.enterFullScreen() -> puts the viewer into full screen mode. Can only be called from the user interface thread. Use hiero.core.executeInMainThread if you need to call it from a non-ui thread.

Viewer.exitFullScreen

self.exitFullScreen() -> takes the viewer out of full screen mode. Can only be called from the user interface thread. Use hiero.core.executeInMainThread if you need to call it from a non-ui thread.

Viewer.flushCache

self.flushCache() -> flush the cache on the viewer and pause caching.

Viewer.frameIncrement

self.frameIncrement() -> returns the frame increment for the viewer. Can only be called from the user interface thread. Use hiero.core.executeInMainThread if you need to call it from a non-ui thread.

@return: the number of frames to skip or nudge

Viewer.getAchievedFPS

self.getAchievedFPS() -> returns the average fps achieved by the viewer.

@return: floating point frames per second average

Viewer.goToInTime()

Move playhead to In point

Viewer.goToNextEdit

self.goToNextEdit() -> Move playhead to next edit. Can only be called from the user interface thread.

Viewer.goToNextTag

self.goToNextTag() -> Move playhead to next tag. Can only be called from the user interface thread.

Viewer.goToOutTime()

Move playhead to Out point

Viewer.goToPrevEdit

self.goToPrevEdit() -> Move playhead to previous edit. Can only be called from the user interface thread.

Viewer.goToPrevTag

self.goToPrevTag() -> Move playhead to previous tag. Can only be called from the user interface thread.

Viewer.goToTag(tag)

Move playhead to Tag. If Tag (Tag Object or Tag name) does not exists on the Viewer’s Sequence/Clip a KeyError is raised.

@param tag: a Tag object or the name of the desired tag.

Viewer.goToTrackItemEnd(trackItem)

Move playhead to end of the trackItem.

@param trackItem: sequence’s track item.

Viewer.goToTrackItemMiddle(trackItem)

Move playhead to middle of the trackItem.

@param trackItem: sequence’s track item.

Viewer.goToTrackItemStart(trackItem)

Move playhead to start of the trackItem.

@param trackItem: sequence’s track item.

Viewer.image

self.image() -> returns the contents of the viewer as an image, including all overlays. Can only be called from the user interface thread.

@return: a PySide2.QtGui.QImage object

Viewer.isCachingPaused

self.isCachingPaused() -> get whether caching is paused.

@return: bool

Viewer.layoutMode

self.layoutMode() -> returns the layout mode the viewer is currently in.

@return: a Viewer.LayoutMode object

Viewer.overlaysShown

self.overlaysShown() -> get whether overlays are shown in the viewer.

@return: bool

Viewer.pauseCaching

self.pauseCaching() -> pause caching on the viewer.

Viewer.play

self.play() -> starts playback in the viewer in the forward direction. Can only be called from the user interface thread. Use hiero.core.executeInMainThread if you need to call it from a non-ui thread.

Viewer.playBackwards

self.playBackwards() -> starts playback in the viewer in the backwards direction. Can only be called from the user interface thread. Use hiero.core.executeInMainThread if you need to call it from a non-ui thread.

Viewer.playForwards

self.playForwards() -> starts playback in the viewer in the forward direction. Can only be called from the user interface thread. Use hiero.core.executeInMainThread if you need to call it from a non-ui thread.

Viewer.player

self.player(index) -> returns the player object attached to this viewer, based on the input index.

@param index: integer index of the player to retrieve

@return: Player object

Viewer.resumeCaching

self.resumeCaching() -> resume caching on the viewer.

Viewer.setCompareMode

self.setCompareMode(mode) -> changes the compare mode for the viewer. Can only be called from the user interface thread. Use hiero.core.executeInMainThread if you need to call it from a non-ui thread.

@param compareMode: a Viewer.CompareMode value

Viewer.setDisplayTimecode

self.setDisplayTimecode(displayTimecode) -> Sets the viewer to display Timecode if ‘displayTimecode’ is True, or Timeline Frame otherwise

@return: None

Viewer.setFrameIncrement

self.setFrameIncrement(frames) -> changes the frame increment for the viewer. Can only be called from the user interface thread. Use hiero.core.executeInMainThread if you need to call it from a non-ui thread.

@param frames: the number of frames to skip or nudge

Viewer.setLayoutMode

self.setLayoutMode(mode) -> changes the layout mode for the viewer. Can only be called from the user interface thread. Use hiero.core.executeInMainThread if you need to call it from a non-ui thread.

@param layoutMode: a Viewer.LayoutMode value indicating what layout to set the viewer to

Viewer.setOverlaysShown

self.setOverlaysShown(show) -> set whether overlays are shown in the viewer.

@param show: bool

Viewer.setSequence

self.setSequence() -> set the sequence for this viewer

@param sequence: the sequence to set on this viewer

@param indexOfPlayer: index to specify which of the players the sequence should be set on

Viewer.setTime

self.setTime(time) -> seeks the play head of the viewer to the time parameter. Works the same as scrubbing the timeline in the viewer. Can only be called from the user interface thread. Use hiero.core.executeInMainThread if you need to call it from a non-ui thread.

@param time: frame to set the play head to

Viewer.setView

setView(name, viewIndex) -> If name matches an existing view then the Viewers’s active view for viewIndex is set to the view given by name.

@param name: string

@param viewIndex: optional; integer (for example in stereo a viewIndex of 0 corresponds to the primary view and 1 to the secondary view)

Viewer.stop

self.stop() -> stops playback in the viewer. Can only be called from the user interface thread. Use hiero.core.executeInMainThread if you need to call it from a non-ui thread.

Viewer.time

self.time() -> returns the current frame of the viewer.

Viewer.toggleFullScreen

self.toggleFullScreen() -> toggles full screen mode for the viewer. Can only be called from the user interface thread. Use hiero.core.executeInMainThread if you need to call it from a non-ui thread.

Viewer.toggleFullScreen1_1

self.toggleFullScreen1_1() -> toggles 1:1 full screen mode for the viewer. Can only be called from the user interface thread. Use hiero.core.executeInMainThread if you need to call it from a non-ui thread.

Viewer.view

view(viewIndex) -> Returns the name of the active view for viewIndex.

@param viewIndex: optional; integer (for example in stereo a viewIndex of 0 corresponds to the primary view and 1 to the secondary view)

Viewer.window

self.window() -> Return the viewer window

Viewer.wipeTool

self.wipeTool() -> return the split wipe tool for this viewer.

@return: ViewerWipeTool object

class hiero.ui.ViewerWipeTool

Bases: Shiboken.Object

Object for manipulating the viewer wipe tool in Hiero.

isActive

self.isActive() -> returns True if the tool is active.

@param index: integer index of the player to retrieve

@return: bool

setActive

self.setActive(active) -> Make the tool active or inactive.

@param active: the active state

@return: None

class hiero.ui.WindowManager

Bases: Shiboken.Object

Global object to handle window management in Hiero. Use windowManager() to get the single instance of this object to use.

class WindowMenuSection

Bases: object

name
WindowManager.addWindow

self.addWindow(window, section, shortcut) -> adds a window to the window manager and insert a menu item for it into the Window menu. This will also make the window dockable with Hiero’s other windows.

@param window: QWidget object for the window

@param section: section (either an int, or a WindowManager.WindowMenuSection) to insert the menu item into

@param shortcut: shortcut to apply to the menu item. See the documentation on QKeySequence for more info

WindowManager.popupWindow

self.popupWindow(window) -> Opens the window in a floating dock panel.

@param window: QWidget object for the window

WindowManager.showWindow

self.showWindow(window) -> Opens the window in its layout position or if as a floating dock panel

@param window: QWidget object for the window

WindowManager.windows

self.windows() -> Returns a list with the available widgets in WindowManager

@return: list of the available widgets in WindowManager

hiero.ui.activeSequence()

hiero.ui.activeSequence() -> gets the currently active sequence.

@return: a hiero.core.Sequence of the last activated hiero.ui.TimelineEditor, hiero.ui.SpreadsheetView object or hiero.ui.Viewer object

hiero.ui.activeView()

hiero.ui.activeView() -> gets the currently active view object.

@return: depending on the active view, a hiero.ui.TimelineEditor, a hiero.ui.SpreadsheetView object, a hiero.ui.Viewer object or a hiero.ui.BinView object

hiero.ui.addMenuAction(path, action, before=None)

Add a QAction to the main menubar. The ‘path’ parameter specifies the menu to which to add the action as a ‘/’-separated string. The path may contain either internal action names or display names. e.g. ‘View/Transform’, or (better) ‘foundry.menu.view/foundry.view.transform’.” The optional ‘before’ parameter specifies the name of an item the action should be inserted before. If this is not specified, the action is appended to the menu.

hiero.ui.browseForApplication()

browseForApplication (message, initialPath, parentWidget) -> brings up the file browser to allow the user to select an application. Allows the user to select an executable file on Windows and Linux, and to select an application bundle (*.app) directory on OSX.

@param message: prompt to display to the user in the file browser

@param initialPath: initial path to set the file browser to. Can be a zero length string

@param parentWidget: QWidget to set as the parent of the file browser. Can be None.

@return: string

hiero.ui.createMenuAction(name, method, icon=None)

Creates a menu action (QAction) for use in context menus or Main menubar. The ‘name’ parameter specifies the title of the action. @param: name - the title of the menu action @param: method - the Python method which this action triggers @param: icon (optional) - provides an icon for the action. This can be an absolute path (‘/var/tmp/myIcon.png’), or relative path (‘icons:myIcon.png’)

hiero.ui.currentContextMenuView()

currentContextMenuView() -> returns the current view for the context menu. Only valid during a kShowContextMenu event callback.

@return: Viewer, TimelineEditor, BinView, depending on which window had the context menu created for it

hiero.ui.currentViewer()

currentViewer() -> returns the current viewer window.

@return: Viewer

hiero.ui.currentWorkspace()

hiero.ui.currentWorkspace() -> Returns the name of the current Workspace.

@return: name of current Workspace as a string

hiero.ui.findMenuAction(name)

Find a QAction in the main menubar. The ‘name’ parameter specifies the name of the action. The name may be either an internal action name or a display name. e.g. ‘Cut’, or (better) ‘foundry.application.cut’.”

hiero.ui.findRegisteredAction()

hiero.ui.findRegisteredAction(name) -> Find the action with the given name.

@return: a QAction, or None if not found.

hiero.ui.findRegisteredActions()

hiero.ui.findRegisteredActions(pattern) -> Find the action that starts with the given pattern.

@return: a QAction list or None on an error.

hiero.ui.flushAllViewersCache()

self.flushAllViewersCache() -> flush the cache of all viewers and pause caching

hiero.ui.getFlipbook()
hiero.ui.getProjectRootInteractive(project)

Try to get a valid root path from the project. If the existing exportRootDirectory() is not set or doesn’t exist, the user will be prompted to select one. If no path is selected, returns None.

hiero.ui.getTimelineEditor()

hiero.ui.getTimelineEditor(sequence) -> Find the TimelineEditor for the given Sequence.

@return: a hiero.ui.TimelineEditor, or None if no appropriate TimelineEditor is found.

hiero.ui.insertMenuAction(action, menu, before=None, after=None)

Insert a QAction into the given QMenu. If strings ‘before’ or ‘after’ are specified, the action is inserted before or after the action with that name. If no such action is found or ‘before/after’ are not given, the action is appended to the menu.

hiero.ui.isInAnyProject()
hiero.ui.isInAnyTimeline()
hiero.ui.mainWindow()

hiero.ui.mainWindow() -> used to get Hiero’s main window object.

@return: a PySide2.QtGui.QMainWindow object

hiero.ui.menuBar()

hiero.ui.menuBar() -> used to get Hiero’s global menu bar.

@return: a PySide2.QtGui.QMenuBar object

hiero.ui.openFileBrowser()

openFileBrowser(caption=””, mode=1, pattern=””, initialPath=””, forSave=False, canChooseMultiple=False, sequencesEnabled=False, mayNotExist=False, showAllFileTypes=False, confirmOverwrite=True, requiredExtension=””) -> string list.

Displays a modal foundry file browser dialog. @param caption: Optional. Message to display in the dialog. @param mode: Optional. Selection mode (1=Files Only, 2=Directories Only, 3=Files and Directories) @param pattern: Optional. File filter pattern. @param initialPath: Optional. The selected path on dialog creation. @param forSave: Optional. Configure dialog for saving a file. @param multipleSelection: Optional. Allow selection of multiple files. @param sequencesEnabled: Optional. Configure file browser for showing sequences. @param mayNotExist: Optional. Allow return of paths that don’t exist e.g. for saving. @param showAllFileTypes: Optional. Show all files regardless of the filter. @param confirmOverwrite: Optional. If file exists will ask user to confirm overwrite. If canceled the file will not be in the returned list of paths. @param requiredExtension: Optional. Enforce a certain file extension. @return: The selected files as a list of strings

hiero.ui.openInNewViewer()

openInNewViewer( ) <openInNewViewer, None>` -> Opens a BinItem’s activeItem (Clip/Sequence) in a new Viewer.

openInNewViewer( ) <openInNewViewer, None>` -> Opens a Sequence in a new Viewer.

openInNewViewer( ) <openInNewViewer, None>` -> Opens a Clip in a new Viewer.

@return: Viewer object

hiero.ui.openInOSShell()
hiero.ui.openInSpreadsheet()

openInSpreadsheet( ) <openInSpreadsheet, None>` -> Opens a Sequence in a Spreadsheet.

@return: SpreadsheetView object

hiero.ui.openInTimeline()

openInTimeline( ) <openInTimeline, None>` -> Opens a BinItem’s activeItem (Clip/Sequence) in a Timeline View.

openInTimeline( ) <openInTimeline, None>` -> Opens a Sequence in a Timeline View.

openInTimeline( ) <openInTimeline, None>` -> Opens a Clip in a Timeline View.

@return: TimelineEditor object

openInTimeline( -> Opens a list of BinItems’ activeItems (Clips/Sequences) in a Timeline View.

@return: tuple of TimelineEditor objects

hiero.ui.openInViewer()

openInViewer( ) <openInViewer, None>` -> Opens a BinItem’s activeItem (Clip/Sequence) in the Viewer.

openInViewer( ) <openInViewer, None>` -> Opens a Sequence in the Viewer.

openInViewer( ) <openInViewer, None>` -> Opens a Clip in the Viewer.

@return: Viewer object

hiero.ui.registerAction()

hiero.ui.registerAction(action) -> Register an action.

hiero.ui.registerBinViewCustomMimeDataType()

registerBinViewCustomMimeDataType(customMimeType) -> registers a custom mime type so that Hiero passes on drag and drop events through the event system. For an example of how to use this method, see the bin_drop.py example.

hiero.ui.registerPanel(id, command)
hiero.ui.registeredActions()

hiero.ui.registeredActions() -> Returns a list of all registered actions.

@return: a tuple of QActions

hiero.ui.resetCurrentWorkspace()

hiero.ui.resetCurrentWorkspace() -> Resets the current Workspace to its default state.

@return: None

hiero.ui.restorePanel(id)
hiero.ui.saveWorkspace()

hiero.ui.saveWorkspace(name) -> Save the current Workspace with name.

@return: None

Example: hiero.ui.saveWorkspace(‘NewWorkspaceName’)

hiero.ui.sendToViewerA()

sendToViewerA( ) <sendToViewerA, None>` -> Sends a BinItem’s activeItem (Clip/Sequence) to the Viewer A.

sendToViewerA( ) <sendToViewerA, None>` -> Sends a Sequence to the Viewer A.

sendToViewerA( ) <sendToViewerA, None>` -> Sends a Clip to the Viewer A.

hiero.ui.sendToViewerB()

sendToViewerB( ) <sendToViewerB, None>` -> Sends a BinItem’s activeItem (Clip/Sequence) to the Viewer B.

sendToViewerB( ) <sendToViewerB, None>` -> Sends a Sequence to the Viewer B.

sendToViewerB( ) <sendToViewerB, None>` -> Sends a Clip to the Viewer B.

hiero.ui.setWorkspace()

hiero.ui.setWorkspace(name) -> Sets the Workspace with name, as per the name in the Workspace menu.

@return: None

Example: hiero.ui.setWorkspace(‘Reviewing’)

hiero.ui.trackNameValidator()
hiero.ui.unregisterBinViewCustomMimeDataType()

unregisterBinViewCustomMimeDataType(customMimeType) -> unregisters a custom mime type that was previously registered using registerBinViewCustomMimeDataType().

hiero.ui.unregisterPanel(id, command)
hiero.ui.updateViewer()
hiero.ui.windowManager()

windowManager() -> returns the single WindowManager object.

@return: WindowManager

Table Of Contents

Previous topic

hiero.core reference

Next topic

Examples