-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Labels
Description
Goal
Enable running the UI as a blocking command, returning control on closed, published or validated.
Usage
from pyblish_lite import show
window = show()
window.wait(until="published")
# blocked..
print("Publish complete!")Remarks
This feature is trivial to implement in any standalone instance of Lite.
window.exec_()But within a host such as Nuke or Maya, exec_() would not only block our GUI, but the host as well which we need to keep feeding us with events else we get blocked as well. Don't bite the hand that feeds you.
It's possible that this is an unimplementable feature, and that a more reliable implementation is to consider an asynchronous workflow, using signals.
NOT YET IMPLEMENTED
from pyblish import api
from pyblish_lite import show
def on_published():
print("Published!")
api.on("published", on_published)
show()Now when the user publishes, using any GUI or util.publish(), the asynchronous code is run.