API
1.6
1.6
  • Introduction
  • Plug-in System
  • Data
    • result
    • Events
    • Targets
  • Environment Variables
    • PYBLISHPLUGINPATH
    • PYBLISH_CLIENT_PORT
    • PYBLISH_ALLOW_DUPLICATE_PLUGINS
    • PYBLISH_GUI
    • PYBLISH_EARLY_ADOPTER
    • PYBLISH_STRICT_DATATYPES
  • Ordering
    • CollectorOrder
    • ValidatorOrder
    • ExtractorOrder
    • IntegratorOrder
  • pyblish.util
    • publish
    • collect
    • validate
    • extract
    • integrate
  • pyblish.cli
    • publish
  • pyblish.api
    • AbstractEntity
      • .data
    • Context
      • .append
      • .create_instance
    • Instance
      • .append
      • .context
    • Plugin
      • .hosts
      • .families
      • .label
      • .active
      • .order
      • .optional
      • .requires
      • .actions
      • .version
      • .match
    • ContextPlugin
      • .process
    • InstancePlugin
      • .process
    • Action
      • .process
      • .icon
      • .on
    • Category
    • Separator
    • discover
    • sort
    • register_gui
    • register_host
Powered by GitBook
On this page
  • register_host
  • Functions
  • Description
  • Example

Was this helpful?

  1. pyblish.api

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

from pyblish import api

class CollectObjectSets(api.ContextPlugin):
    """Collect things only Maya would know"""
    order = api.CollectorOrder
    hosts = ["maya"]
    def process(self, context):
        from maya import cmds
        for objset in cmds.ls(type="objectSet"):
        context.create_instance(objset)

{{ file.mtime }}

Previousregister_gui

Last updated 5 years ago

Was this helpful?

(str)

(str)

()

register_host
deregister_host
registered_hosts