A lightweight alternative to pyblish-qml.
Python 2.6+ and Python 3.x
You can install via pip, or clone manually.
$ pip install pyblish-lite $ python -m pyblish_lite --debug # Test install
Pyblish Lite runs both standalone and from a host and requires either PySide of PyQt bindings to be readily available.
$ python -m pyblish_lite
import pyblish_lite pyblish_lite.show()
import pyblish.api import pyblish_lite pyblish.api.register_host("maya") window = pyblish_lite.show()
import pyblish.api import pyblish_lite pyblish.api.register_host("nuke") window = pyblish_lite.show()
from PySide import QtGui import mari import pyblish.api import pyblish_lite pyblish.api.register_host("mari") mari.app.activateMainWindow() parent = QtGui.qApp.activeWindow() window = pyblish_lite.show(parent)
ATTENTION: This can't be run from the Houdini Python terminal, it'll crash the process.
import pyblish.api import pyblish_lite pyblish.api.register_host("houdini") window = pyblish_lite.show()
Below is the current and full documentation of Lite.
Currently, it has all things Pyblish QML except the perspective view, plus a few extras.
- Keyboard shortcuts
- Artist view
- Middle-click on any item to explore it's properties
- Comment section
- Select multiple items
- Remembers checked state between refreshes
- Continue publishing after successful validation
- Select a single item to toggle
- Drag, CTRL or SHIFT select to select multiple items
- Invert check with Space
- Toggle ON with Enter
- Toggle OFF with Backspace
- CTRL+A to select all
Launching Lite brings you to the landing page, called "Artist View".
It's designed to provide a minimal set of information relevant to any user, without going into detail. Here you can control the icon with which an instance is drawn via the
icon data member.
instance.data["icon"] = "random"
Icons are derived from a font library known as FontAwesome. Their names and appearance can be found here:
As a future suggestion, maybe we'd also like to visualise some form of
message here as well?
The next tab brings you to the full overview of available instances and the plug-ins associated with those instances. Here the user may toggle instances, like before, but also plug-ins tagged as
In Lite's bigger brother QML, plug-ins that are not compatible with any instance are excluded from this list, simplifying situations where you may have hundreds of them, but only a few are relevant. This is an upcoming feature in Lite.
Finally, the last tab provides a full record of everything logged from within a plug-in, along with exceptions raised (for the artist) and their exact location in Python (for the developer).
QML also features filtering of these messages, via log
level and freeform text search.
In Pyblish QML, items in the terminal are expanded to reveal more information about any particular message, like at which module and line within that module it came from. This information is available via middle-click.
context.data["comment"] = "" and the GUI adds a widget to interactively modify that data member.
Pre-fill it for a custom placeholder or guidelines for how to comment. Press "Enter" to publish.
You can customise the user's experience with
pyblish-lite from the settings module.
import pyblish_lite.settings # Customize the title of the window Pyblish-lite produces. # Default: "Pyblish" pyblish_lite.settings.WindowTitle = "My Window" # Customize which tab to show initially from the existing tabs available; # "artist", "overview" and "terminal". # Default: "artist" pyblish_lite.settings.InitialTab = "overview" # Customize whether to use labels for plugins and instances. # Default: True pyblish_lite.settings.UseLabel = False # Custommize the width and height of the window pyblish_lite.settings.WindowSize = (500, 500)
Tests are automatically run at each commit to GitHub via Travis-CI. You can run these tests locally either by (1) having the dependencies available on your PYTHONPATH, or (2) via Docker.
$ cd pyblish-lite $ export PYTHONPATH=/path/to/Qt.py:/path/to/pyside:/path/to/pyblish-base $ nosetests --verbose --with-doctext --exclude=vendor
$ cd pyblish-lite $ docker build -t pyblish/pyblish-lite . $ docker run --rm -v $(pwd):/pyblish-lite pyblish/pyblish-lite
# Doctest: pyblish_lite.model.ProxyModel ... ok # Doctest: pyblish_lite.util.get_asset ... ok # Anything runs ... ok # Logging things that aren't string is fine ... ok # Resetting works the way you'd expect ... ok # Publishing works the way you'd expect ... ok # Only supported families are published ... ok # Only active plugins are published ... ok # Only active instances are published ... ok # Logging things that aren't string is fine ... ok # # ---------------------------------------------------------------------- # Ran 10 tests in 0.357s # # OK