Releases: pyblish/pyblish-lite
0.6.3
Synchronous was_*
signals
Now when these signals are emitted, the GUI is in a finished state, allowing for example closing of the GUI upon receiving the was_published signal; if this is all that they GUI was meant to do.
# Replace `Qt` with your binding, e.g. PySide2
from Qt import QtCore
import pyblish_lite
def on_published():
QtCore.QTimer.singleShot(10, window.close)
window = pyblish_lite.show()
window.controller.was_published.connect(on_published)
Under the hood
One thing to note is the use of QTimer
. Why not just call close
right away? Well, was_published
is still a signal and you are not alone in listening to it. Another factor is the window being alerted of the fact that it is now safe to close.
If your signal runs first (the order or operations on signals are, to my knowledge, non-deterministic) then the Window would unaware of completion once you ask it to close.
Delaying the call to close
, via a QTimer
, will guarantee that all signals currently in the queue will evaluate first. You could potentially even set the timer threshold to 0
, given the fact that queues themselves are in fact, to my knowledge, deterministic; i.e. processed one after the other in the order they were created.
Caveat
The thing to look out for in this version is expensive post-processes right after finishing validation. Because whatever post-processes are now run instantly upon completion, the GUI could potentially stall until the post-processes are completed, before having had time to update the graphics; i.e. the color of processed items in the view - giving you the impression that it permanently stalled.
In practice, this should not be noticeable. But keep an eye out, and let me know if you experience any issues.
0.6.2
0.6.1
0.6.0
Pyblish-lite is now a single persistent window.
import pyblish_lite
pyblish_lite.show()
Previously the above code would produce a new window every time it was executed. Now it will produce the same window if it already exists, and create a new window if none exists.
As a consequence, the destroyed
signal now reliably emits on closing the window.
import pyblish_lite
def on_destroyed():
print("Window was destroyed!")
window = pyblish_lite.show()
window.destroyed.connect(on_destroyed)
window.close()
# Window was destroyed!
0.5.0
Callbacks are now implemented. Please refer to the documentation on using callbacks; https://learn.pyblish.com/chapters/20-callback-i.html
Font sizes on OSX has been adjusted for better readability.
0.4.1
0.4.0
0.3.3
0.3.2
0.3.1
Selection, keyboard shortcuts and status messages.
- 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
Tips and tricks
Uncheck all optional plug-ins.
- CTRL+A
- Backspace