Learn about how things happen in Pyblish.
There are three ways in which a plug-in is associated with a particular set of data.
By availability
By host
By family
Availability is determined by registering a given plug-in to Pyblish, for example by calling register_plugin_path(). Once a plug-in is made available, it must also match the currently running host.
class MyPlugin(...):hosts = ["maya"]
If the host matches, a plug-in is put to the final test; it's supported families.
class MyPlugin(...):families = ["myFamily"]
See also
These data members are included.
Data | Description |
currentFile | Current working file |
workspaceDir | Higher-level directory of current file |
user | Currently logged on user |
cwd | Current working directory (of Python interpreter) |
Example
import pyblish.utilcontext = pyblish.util.collect()print context.data["currentFile"]
[2]: https://github.com/pyblish/pyblish.api/wiki/Plugin.hosts