Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.wait(until="closed") #66

Open
mottosso opened this issue Oct 11, 2016 · 0 comments
Open

.wait(until="closed") #66

mottosso opened this issue Oct 11, 2016 · 0 comments
Labels

Comments

@mottosso
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant