API Reference

Toolsetsui

class ToolsetsUI(*args: Any, **kwargs: Any)

Bases: MockExt.QtWidgets.

windowSettingsPath = 'zoo/toolsetsui'
connections()
maximize()

Maximize

setHighlight(highlight, updateUis=False)

Set the logo highlight.

Update the other toolset uis

Parameters
  • highlight

  • updateUis

Returns

initUi()

Init ui

Returns

Return type

calcHeight()

Calculate Height

Returns

Return type

lastHidden()

Get last hidden

Returns

Return type

list

setLastHidden(lastHidden)
resizeWindow(disableScrollBar=True, delayed=False)

Automatically resize the height based on the height of the tree

Returns

maxWindowHeight()

Calculate max height depending on the height of the screen.

Returns

Return type

setDockedWidgetHeight(height)
resizeEndEvent()

Save the height for us to use :return:

toggleToolset(toolsetId, activate=True, keepOpen=False)

Toggle toolset

Parameters
  • toolsetId

  • activate

  • keepOpen

Returns

Return type

toolsetwidgetitem.ToolsetWidgetItem

openLastToolset()

Open last toolset

Returns

Return type

closeEvent(ev)
toolsetUis()

Get all toolsetUi instances. Useful to use if can’t import toolsetui.py

Returns

Return type

overlay
class ToolsetTitleBar(*args: Any, **kwargs: Any)

Bases: MockExt.QtWidgets.

setFramelessEnabled(action=None)

Get the settings and transfer to new ZooToolset

Parameters

action

Returns

dropEvent(event)

On dropping toolset on title bar

Parameters

event

Returns

Return type

dropFinish(source, sourceItem, targetItem)

Drop finish. On drop finish it will tell the source tree and the target tree that the widget has been dropped.

Parameters

source (toolsettree.ToolsetTreeWidget) –

dragEnterEvent(event)

Drag enter event.

Parameters

event

Returns

setLogoHighlight(highlight)

Set the logo colour based on highlight

Parameters

highlight

Returns

mousePos
widgetMousePos
toolsetUis()

Return all the toolset uis as a list

Returns

Return type

list[ToolsetsUI]

toolsetFrames()

All toolset frames

Returns

Return type

list[ToolsetFrame]

addToolsetUi(toolsetUi)

Adds toolset ui to global list so we can use later

Parameters

toolsetUi (ToolsetsUI) –

Returns

Return type

addToolsetFrame(toolsetFrame)

Add toolset frame so we can use later

Parameters

toolsetFrame (ToolsetFrame) –

Returns

Return type

toolsets(visibleOnly=False)

All toolsets in toolset uis

Returns

Return type

list[toolsetwidgetitem.ToolsetWidgetItem]

toolsetsByAttr(attr, visibleOnly=False)

Retrieve the toolset if it has a specific attribute

Parameters

attr

Returns

Return type

list[zoo.apps.toolsetsui.widgets.toolsetwidget.ToolsetWidgetBase]

toolsetsById(tid)

Get toolsets with id

Parameters

tid

Returns

Return type

getLastOpenedToolsetUi()

Get last opened toolset UI.

Return as a tool

Returns

getLastFocusedToolsetUi(includeMinimized=True)

Get last focused toolset ui

Returns

runToolset(toolsetId, logWarning=True)

Runs a toolset tool, and loads it to the active toolset window

Returns False if no toolset window is open

Parameters

toolsetId (string) – the name of the toolSet by it’s type (unique string)

Return taskCompleted

did the tool load?

Rtype taskCompleted

bool

runLastClosedToolset()

Run last closed toolset

Returns

Registry

class ToolsetRegistry(*args: Any, **kwargs: Any)

Bases: MockExt.QtCore.

Registry class to gather all the toolset classes.

os.environ["ZOO_TOOLSET_UI_PATHS"] = "../examples/widgets"
os.environ["ZOO_TOOLSET_LAYOUTS"] = "../examples/zootoolsets"
reg = ToolsetRegistry()
self.logger.debug("{}".format(reg.toolsetDefs))
{'ConvertAllShadersRenderer': <class zoo.apps.generictoolsetui.zootoolsets.convertallshaders_renderer.ConvertAllShadersRendererToolset>,
'importExportShaders': <class zoo.apps.generictoolsetui.zootoolsets.importexportshaders.ImportExportShadersToolset}
registryEnv = 'ZOO_TOOLSET_UI_PATHS'
toolsetJsons = 'ZOO_TOOLSET_LAYOUTS'
readJsons()

Read jsons Merge the data in the jsons and put into one data structure: self.toolsetGroups

Todo

Work with collisions

Returns

property toolsetDefs
discoverToolsets()

Searches the component library specified by the environment variable “ZOO_TOOLSET_UI_PATHS”

groupsData(showHidden=False)
groupType(groupName)

Get type by group name

Parameters

groupName

Returns

groupColor(groupType)
toolsetColor(toolsetId)

Get Toolset Colour Calculate colour based on the group colour from where it was found. Also shifts the colour depending on its position in the list. The further down the list, the more the colour gets shifted.

Parameters

toolsetId

Returns

groupTypes()

Return group types

Returns

list(type)

groupNames()

Return list of names

Returns

definitions(sort=True)

Returns a list of toolset definitions

Returns

toolsetIds(groupType)

Return toolsets based on group type.

Parameters

groupType

Returns

groupFromToolset(toolsetId, showHidden=False)

Looks for the original group

Parameters
  • showHidden – Show hidden toolsets

  • toolsetId

Return groupType

groupType

toolsets(groupType)

List of toolsets under the group type

Parameters

groupType

Returns

Return type

class of toolsetwidget.ToolsetWidgetMaya

toolsetWidget(toolsetId)

Creates a new toolset widget based on the toolsetId

returns list of widgets. Each widget is the different content sizes eg simplified, advanced # todo this needs to be updated to work with the new toolsetWidget changes

Parameters

toolsetId

Returns

toolset(toolsetID)

Returns toolset based on Id

Parameters

toolsetID (basestring) – toolset to find by id

Return type

toolsetwidgetmaya.ToolsetWidgetMaya

toolset(toolsetID)

Gets a toolset definition class by ID.

Creates a new toolsetRegsistry instance and runs ToolsetRegistry.toolset() May be slow since it creates the instance and discovers the toolsets.

from zoo.apps.toolsetsui import registry
toolsetCls = registry.toolset("zooVertSkinning")

zooVertSkinning = toolsetCls()
Parameters

toolsetID (basestring) – toolset to find by id

Returns

Subclass of ToolsetWidgetItem. Toolset class definition

Return type

toolsetwidgetmaya.ToolsetWidgetMaya

instance()

Returns the global instance of the toolset registry. :rtype: ToolsetRegistry

Run

launch(toolArgs=None, parent=None)

Load the artist GUI for hive.

Parameters

toolArgs

Returns

Return type

toolsetui.ToolsetsUI

openToolset(toolsetId, position=None)

Opens a tool given the toolset ID name

Parameters

toolsetId (string) – The name of the toolset ID eg “cleanObjects” or “createTube” etc