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
  • Introduction
  • Data

Was this helpful?

Plug-in System

PreviousIntroductionNextData

Last updated 5 years ago

Was this helpful?

Learn about how things happen in Pyblish.

Introduction

There are three ways in which a plug-in is associated with a particular set of data.

  1. By availability

  2. By host

  3. By family

Availability is determined by registering a given plug-in to Pyblish, for example by calling . 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

Data

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.util
context = pyblish.util.collect()
print context.data["currentFile"]

[2]:

register_plugin_path()
Plugin.hosts
https://github.com/pyblish/pyblish.api/wiki/Plugin.hosts