Skip to content

Tale of Three APIs

mottosso edited this page Oct 10, 2014 · 13 revisions

In Pyblish, there are three APIs that are of interest to you while developing plug-ins.

  1. Library to Plug-in
  2. Plug-in to Library
  3. Plug-in to Plug-in

Library to Plug-in

The Pyblish library itself carries an interface that is exposed to plug-ins. This is the interface you can use from within your plug-ins during development and includes things such as methods on each corresponding superclass, such as commit, to helper functions exposed globally, such as format_filename.

Plug-in to Library

Conversely, each plug-in exposes certain attributes to the library. These are mainly attributes for identifying the plug-in, such as which families it supports and it's main processing method.

Plug-in to Plug-in

Finally, for plug-ins to coordinate with each other, they may pass data from one to another. It does this via the data member. Each stage, selection, validation, extraction and conform, may pass data from one to the next. One common example is for extraction to pass its output-path, called "commit_dir", on to conform that can then use this path to copy the files from its temporary location into its final destination.

Other data includes switches within the instance itself. For example, a Review family may include options for output resolution in pixels, or format such as whether to write a Quicktime or a plain png sequence.

Clone this wiki locally