Previous releases
Summary of new features.
Management
- README replaces Wiki
- Most packages no on PyPI.
- pyblish is now a PyPI package.
API
- Full support for Python 3 across all relevant projects
- Many bugs were squashed in the making of this release
- Persistent unique IDs for plug-ins and instances via
.id
. -
register_gui
is now a thing.
GUI
- Pyblish Lite is a new lightweight alternative to Pyblish QML.
- Pyblish QML has gotten liposuction surgery.
Overview
The main difference you’ll notice is of course Pyblish Lite. For those of you who have waited for, or developed your own alternative to Pyblish QML, this one’s for you. Written in pure Python with a single dependency on any Qt binding. That is, if you have PyQt5 installed, great. If you have PySide installed, that’s ok too and you don’t have to worry about explicitly telling Lite which one to chose, as they are all equally fine.
The focus of Lite is compatibility. Recommended use is to try Pyblish QML, and gracefully fallback to Lite where needed. Which brings me to the next highlight.
register_gui()
Before, when Pyblish QML roamed the world on his own, integrations such as pyblish-maya made a series of assumptions about how to embrace its existence. Which meant that it added bulk where not necessary for those who did not use QML.
register_gui()
solves this by promoting a common interface towards every GUI and allowing the user or developer tell Pyblish which he would rather use.
import pyblish.api
pyblish.api.register_gui("pyblish_lite")
From then on, any GUI-related functionality, such as pyblish-maya, can look for what you have registered, and act accordingly.
import pyblish_maya
pyblish_maya.show()
# Viola, pyblish-lite appears.
The only requirement for the GUI, is that it is on the PYTHONPATH at the time of calling show()
, and that is exposes a single member function, also called show()
at the package-level.
Example
# my_package/__init__.py
def show():
# your GUI here
Fallback
I mentioned a fallback mechanism. You can register multiple GUIs and have your integration choose the most desirable one. The current behavior is for your integration, such as the File->Publish menu-item in Autodesk Maya, to cycle between those registered and (1) look them up from your PYTHONPATH and (2) query the existence of def show()
.
- More info: http://api.pyblish.com/register_gui.html
README
Up till now, each project has provided documentation through their native GitHub Wiki. This has proven overly complex and unable to stay up to date with changing software; partly due to forgetfulness, but also because the Wiki is simply disconnected from the version control its parent Git repository.
Instead, each project now boasts a minimal yet complete README.md with full details on how to use a project.
The hope is that the README should be more inviting and provide less temptation to nest instructions, adding complexity to what is intended for simplicity.
See here
- https://github.com/pyblish/pyblish
- https://github.com/pyblish/pyblish-base
- https://github.com/pyblish/pyblish-qml
- https://github.com/pyblish/pyblish-lite
- https://github.com/pyblish/pyblish-maya
Installation
As a response to user feedback, all Pyblish projects are now proudly hosted and accessible on PyPI.
Install latest projects individually…
$ pip install pyblish-base
$ pip install pyblish-maya
$ pip install pyblish-lite
Or install a known working combination of primary projects all at once…
$ pip install pyblish
The recommended use of PyPI packages is both for those just getting started, and for integration into a studio via tools such as Rez. Developer should still clone repositories and append to their PYTHONPATHs as usual.
Pyblish QML
Pyblish QML now has full support for Python 3, which means that installing PyQt5 on most platforms is a command away.
Debian
$ apt-get install -y python3-pyqt5 python3-pyqt5.qtquick
$ pip install pyblish-qml
$ python -m pyblish_qml --demo
Windows
- Download and install PyQt5
pip install pyblish-qml
python -m pyblish_qml --demo
MacOS
$ brew install pyqt5
$ pip install pyblish-qml
$ python -m pyblish_qml --demo
In light of the simpler alternative (i.e. Lite) Pyblish QML is now more honest about your responsibilities.
It’s a host-agnostic graphical user interface that communicates with your hosts through inter-process communication, and requires to be run independently.
$ python -m pyblish_qml
Once started, your hosts then share this single instance - providing an interface to software not necessarily shipped with Qt bindings. As such, Pyblish QML depends on PyQt5 when started, and no dependencies apart from Python 2 or 3 to use.
Maya
import pyblish_qml
pyblish_qml.show()
Nuke
import pyblish_qml
pyblish_qml.show()
The recommended way to use it is to launch during login and keep it running in the background.
Refer to the new README for details.
Deprecated
With these new improvements, a number of projects are no longer required.
- pyblish-rpc - Has been integrated into pyblish-qml, along with…
- pyblish-integration
-
pyblish-win - Has been superseded by
pip install pyblish
and that pyblish-qml is compatible with Python 3. - pyblish-shell - Primarily intended to help Windows users by providing a pre-compiled PyQt5 distribution, this is no longer needed as PyQt5 is provided natively by the developer.
Enjoy!