Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 676 Bytes

Action.on.md

File metadata and controls

29 lines (20 loc) · 676 Bytes

Action.on

Tailor the circumstance upon which a particular action should be made available.

  • all: Always
  • processed: After plug-in has been processed
  • failed: After plug-in has been processed, and failed
  • succeeded: After plug-in has been processed, and succeeded



Description

Sometimes an Action is not relevant until a certain precondition has been met. For example, if an action is meant to repair broken validation, then it makes the most sense to provide this functionality until validation has actually failed.




Example

import pyblish.api

class MyAction(pyblish.api.Action):
    on = "failed"