Skip to content

.wait(until="closed") #66

@mottosso

Description

@mottosso

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions