Updated Pyblish for Windows to 1.0.9, with a few important bug-fixes and one primary new feature which deprecates another.
>>> import pyblish.api >>> pyblish.api.registered_hosts() # Result: ['python', 'mayabatch', 'mayapy', 'maya'] #
The function replaced by this,
pyblish.api.current_host(), still works, but has been deprecated. It is recommended that you transition to using
pyblish.api.registered_hosts() which will return a list of currently registered hosts.
current_host() now returns the tip of this list, which is compatible with how hosts are registered by default in the updated integrations, so nothing should break.
>>> pyblish.api.current_host() 'maya'
Host registration is typically the responsibility of an integration, such as Pyblish for Maya, and looks like this.
def register_host(): """Register supported hosts""" pyblish.api.register_host("mayabatch") pyblish.api.register_host("mayapy") pyblish.api.register_host("maya")
Is included in the integrations
setup() function and exposed at the top level.
import pyblish_maya pyblish_maya.register_host()