API
Search…
register_gui

register_gui

Register interest in a graphical user interface.
Source
Added
1.4.1

Functions

Output
Method
register_gui(str)

Description

Register one or more Python packages with the following interface, and surrounding Pyblish projects may utilise them where needed. Such as in file menu of the Autodesk Maya integration.
Interface
def show():
"""Create or unhide the most desireable GUI."""
Multiple GUIs may be registered, it is up to the consumer of the registered GUIs to determine which to use and how. The design intent is to enable registration of a series of default GUIs, along with custom or bespoke ones.
>>> import pyblish.api
>>> pyblish.api.registered_guis()
['my_personal_gui', 'pyblish_qml', 'pyblish_lite']

Example

Here is the basic structure expected by the register_gui function.
my_package/
__init__.py
__init__.py
"""My package description"""
from PySide import QtGui
def show():
my_gui = QtGui.QMessageBox()
my_gui.show()
Once the package is on your PYTHONPATH, you may register it like so.
pyblish.api.register_gui("my_package")
{{ file.mtime }}
Last modified 2yr ago