Action

Process once, with Context and Plugin as input.

Source

Added

1.2.0

Inherits Plugin

Public Functions

Output

Method

Properties

property

type

str

str

Usage

Attach any functionality to a plug-in and tailor it to a particular state; like an action only available via a failed validator, or a successful extraction, or just all-round functionality associated with a particular plug-in.

image

Each action is passed both the Context and it's parent plug-in at run-time and can be accessed via their argument signature, similar to plug-ins.

Actions in QML are arranged in a menu with optional customisable groups and separators. Actions with any kind of implementation error show up as well, including a helpful error message for simplified debugging.

Argument signature

These objects are available via the argument signature.

  • context: The global context

  • plugin: The parent plug-in

Full list of features

  • Per-plugin actions

  • Action API ~= Plug-in API, it is more or less a 1-1 match between their interfaces, including process() and label.

  • Standard logging and exception reporting, identical to plug-ins

  • Customisable icon per action, from Awesome Icon

  • Customisable availability

    • 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

Example

Extended Example

Every possible combination of an action.

Maya Example

{{ file.mtime }}

Last updated

Was this helpful?