API
Search…
register_host

register_host

Register supported host.
Source
Added
1.1.3

Functions

Output
Method

Description

Limit availability of plug-ins by host, such as Maya.
Integrations, such as pyblish-maya and pyblish-nuke register their own corresponding host automatically. Additional hosts may be registered by the end-user to customise the available plug-ins at time of publish.

Example

1
from pyblish import api
2
3
class CollectObjectSets(api.ContextPlugin):
4
"""Collect things only Maya would know"""
5
order = api.CollectorOrder
6
hosts = ["maya"]
7
def process(self, context):
8
from maya import cmds
9
for objset in cmds.ls(type="objectSet"):
10
context.create_instance(objset)
Copied!
{{ file.mtime }}
Last modified 1yr ago