maya.main#

This module defines MayaWidget, Bookmarks’ container widget.

Classes:

MayaButtonWidget(size[, parent])

A small control buttons used by the Maya plugin usually docked under the Maya Toolbox.

MayaWidget([parent])

The main plugin widget.

PanelPicker([parent])

Modal dialog used to select a visible modelPanel in Maya.

Functions:

init_maya_widget()

Initializes the maya widget.

init_tool_button(*args, **kwargs)

Finds the built-in Toolbox menu and embeds our custom control-button.

show()

Main function to show MayaWidget inside Maya as a dockable widget.

class bookmarks.maya.main.MayaButtonWidget(size, parent=None)[source]#

Bases: ClickableIconButton

A small control buttons used by the Maya plugin usually docked under the Maya Toolbox.

Classes:

Methods:

contextMenuEvent(event)

Event handler.

enterEvent(event)

Event handler.

init_shortcuts()

Initializes the plugin shortcuts.

leaveEvent(event)

Event handler.

paintEvent(event)

Event handler.

ContextMenu#

alias of MayaButtonWidgetContextMenu

contextMenuEvent(event)[source]#

Event handler.

enterEvent(event)[source]#

Event handler.

init_shortcuts()[source]#

Initializes the plugin shortcuts.

leaveEvent(event)[source]#

Event handler.

paintEvent(event)[source]#

Event handler.

class bookmarks.maya.main.MayaWidget(parent=None)[source]#

Bases: MayaQWidgetDockableMixin, QWidget

The main plugin widget.

Methods:

active_changed()

Slot called when an active asset changes.

context_callbacks()

This method is called by the Maya plug-in when initializing and the callback needed by the maya plugin.

customFilesContextMenuEvent(index, parent)

Event handler used to show a custom context menu.

paintEvent(event)

Event handler.

remove_context_callbacks()

This method is called by the Maya plug-in when unloading.

show(*args, **kwargs)

Show method override.

sizeHint()

Returns a size hint.

active_changed()[source]#

Slot called when an active asset changes.

context_callbacks()[source]#

This method is called by the Maya plug-in when initializing and the callback needed by the maya plugin.

customFilesContextMenuEvent(index, parent)[source]#

Event handler used to show a custom context menu.

paintEvent(event)[source]#

Event handler.

remove_context_callbacks()[source]#

This method is called by the Maya plug-in when unloading.

show(*args, **kwargs)[source]#

Show method override.

sizeHint()[source]#

Returns a size hint.

class bookmarks.maya.main.PanelPicker(parent=None)[source]#

Bases: QDialog

Modal dialog used to select a visible modelPanel in Maya.

Methods:

keyPressEvent(event)

Key press event handler.

mouseMoveEvent(event)

Event handler.

mouseReleaseEvent(event)

Event handler.

paintEvent(event)

Event handler.

showEvent(event)

Event handler.

keyPressEvent(event)[source]#

Key press event handler.

mouseMoveEvent(event)[source]#

Event handler.

mouseReleaseEvent(event)[source]#

Event handler.

paintEvent(event)[source]#

Event handler.

showEvent(event)[source]#

Event handler.

bookmarks.maya.main.init_maya_widget()[source]#

Initializes the maya widget. Usually the Maya plugin will call this method.

bookmarks.maya.main.init_tool_button(*args, **kwargs)[source]#

Finds the built-in Toolbox menu and embeds our custom control-button.

bookmarks.maya.main.show()[source]#

Main function to show MayaWidget inside Maya as a dockable widget.

The function will create MayaWidget if it doesn’t yet exist and dock it to the bar where AttributeEditor is found. If it exists it will get the existing instance and show it if not currently visible, hide it if visible.