shotgun.tasks#

Module contains all widgets and utility classes used to select a Task when publishing to shotgun.

Classes:

InteralNode(data[, parentNode, parent])

Utility class to represent a hierarchy needed by the tree view.

ProxyModel([parent])

TaskModel(entities[, parent])

TaskPicker([parent])

The main dialog used to select a task entity.

TaskView([parent])

Tree view used to display the current ShotGrid Steps and Tasks.

TaskViewContextMenu(index[, parent])

The context menu associated with the AssetItemView.

class bookmarks.shotgun.tasks.InteralNode(data, parentNode=None, parent=None)[source]#

Bases: QObject

Utility class to represent a hierarchy needed by the tree view.

Methods:

addChild(child)

Add a child node.

getChild(row)

Child at the provided index/row.

removeChild(child)

Remove the given node from the children.

removeSelf()

Removes itself from the parent's children.

row()

Row number of this node.

Attributes:

childCount

Children of the this node.

children

Children of the node.

parentNode

Parent of this node.

addChild(child)[source]#

Add a child node.

getChild(row)[source]#

Child at the provided index/row.

removeChild(child)[source]#

Remove the given node from the children.

removeSelf()[source]#

Removes itself from the parent’s children.

row()[source]#

Row number of this node.

property childCount#

Children of the this node.

property children#

Children of the node.

property parentNode#

Parent of this node.

class bookmarks.shotgun.tasks.ProxyModel(parent=None)[source]#

Bases: QSortFilterProxyModel

Methods:

filterAcceptsColumn(self, source_column, ...)

filterAcceptsRow(source_row[, parent])

Filters rows of the proxy model based on the current flags and filter string.

filterAcceptsColumn(self, source_column: int, source_parent: PySide2.QtCore.QModelIndex) bool[source]#
filterAcceptsRow(source_row, parent=QtCore.QModelIndex())[source]#

Filters rows of the proxy model based on the current flags and filter string.

class bookmarks.shotgun.tasks.TaskModel(entities, parent=None)[source]#

Bases: QAbstractItemModel

Methods:

columnCount(self[, parent])

createIndexFromNode(node)

Creates a QModelIndex based on a Node

data(self, index[, role])

entities_to_nodes()

Builds the internal node hierarchy base on the given entity data.

flags(self, index)

headerData(self, section, orientation[, role])

index(self, row, column[, parent])

parent(-> PySide2.QtCore.QObject)

rowCount(self[, parent])

columnCount(self, parent: PySide2.QtCore.QModelIndex = Invalid(PySide2.QtCore.QModelIndex)) int[source]#
createIndexFromNode(node)[source]#

Creates a QModelIndex based on a Node

data(self, index: PySide2.QtCore.QModelIndex, role: int = PySide2.QtCore.Qt.ItemDataRole.DisplayRole) Any[source]#
entities_to_nodes()[source]#

Builds the internal node hierarchy base on the given entity data.

flags(self, index: PySide2.QtCore.QModelIndex) PySide2.QtCore.Qt.ItemFlags[source]#
headerData(self, section: int, orientation: PySide2.QtCore.Qt.Orientation, role: int = PySide2.QtCore.Qt.ItemDataRole.DisplayRole) Any[source]#
index(self, row: int, column: int, parent: PySide2.QtCore.QModelIndex = Invalid(PySide2.QtCore.QModelIndex)) PySide2.QtCore.QModelIndex[source]#
parent(self) PySide2.QtCore.QObject[source]#
parent(self, child: PySide2.QtCore.QModelIndex) PySide2.QtCore.QModelIndex
rowCount(self, parent: PySide2.QtCore.QModelIndex = Invalid(PySide2.QtCore.QModelIndex)) int[source]#
class bookmarks.shotgun.tasks.TaskPicker(parent=None)[source]#

Bases: QDialog

The main dialog used to select a task entity.

The task is to associate a file publish, or a version when publishing to ShotGrid.

Methods:

done(self, arg__1)

showEvent(event)

Show event handler.

sizeHint()

Returns a size hint.

done(self, arg__1: int) None[source]#
showEvent(event)[source]#

Show event handler.

sizeHint()[source]#

Returns a size hint.

class bookmarks.shotgun.tasks.TaskView(parent=None)[source]#

Bases: QTreeView

Tree view used to display the current ShotGrid Steps and Tasks.

Methods:

contextMenuEvent(event)

Custom context menu event.

reset_root_node()

Resets the root node to the initial root node.

resizeEvent(self, event)

contextMenuEvent(event)[source]#

Custom context menu event.

reset_root_node()[source]#

Resets the root node to the initial root node.

resizeEvent(self, event: PySide2.QtGui.QResizeEvent) None[source]#
class bookmarks.shotgun.tasks.TaskViewContextMenu(index, parent=None)[source]#

Bases: BaseContextMenu

The context menu associated with the AssetItemView.

Methods:

setup()

Creates the context menu.

setup()[source]#

Creates the context menu.