.on

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

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"

Last updated