Filter plug-ins by an arbitrary "target", such as Global Assets, Local User, Animators, Everyone with Read Hair etc.

This differs from families in that the caller provides the data, as opposed to the DCC. Useful for special-purpose GUIs or publishing tasks.

Targets Workflow

This release enables assigning targets to plugins. Targets are registered globally so you can enable and disable plugins based on targets. This workflow helps when needing to run plugins from the same host but with different sets of plugins. Possible use cases could be submitting to a render farm, or publishing to a different location.

Targets work the same way as families, so a wildcard of * enables the plugin for all targets. Since all plugins are registered with * as targets, this workflow is backwards compatible with existing plugins that has not overwritten the targets attribute.

Targets with publish.util

from pyblish import api, util

class plugin(api.ContextPlugin):
targets = ["custom"]

def process(self, context):"Custom target publishing.")




import pyblish.api
import pyblish.util

class StudioPlugin(pyblish.api.ContextPlugin):

    targets = ["studio"]

    def process(self, context):"Publishing to studio library.")

class ProjectPlugin(pyblish.api.ContextPlugin):

    def process(self, context):"Publishing to project library.")


# Publishing with ProjectPlugin only.

# Publishing with ProjectPlugin and StudioPlugin.

{{ file.mtime }}

Last updated