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
  • Action.process
  • Introduction
  • Example

Was this helpful?

  1. pyblish.api
  2. Action

.process

Action.process

The primary processing mechanism of the Action.

Introduction

Override this to provide wanted functionality when executing this action.

Example

import pyblish.api

class MyAction(pyblish.api.Action):
    def process(self):
        print("Running action")


class ActionWithContext(pyblish.api.Action):
    def process(self, context):
        print("Running action with context")


class ActionWithPlugin(pyblish.api.Action):
    def process(self, plugin):
        print("Running action with plugin")


class ActionWithContextAndPlugin(pyblish.api.Action):
    def process(self, context, plugin):
        print("Running action with context and plug-in")
PreviousActionNext.icon

Last updated 5 years ago

Was this helpful?