Skip to content

register_plugins

Plugin registration module

This is a simple prototype for registering plugins provided by ayon addons.

Each addon should have, in the same spirit as ayon_core, a plugins/workflow/__init__.py file with a get_plugins() function that returns a list of plugin descriptions.

The init.py should be as imports-free as possible to avoid import errors.

The actual function object used by the execution engine would be retrieved lazily through another standard API point to avoid importing un-necessary stuff. Something like:

func = ayon_test_A.plugins.workflow.get_plugin_function("plugin1")

PluginRegistry

register_plugin_from_class(plugin) classmethod

Register a new plugin from a WorkflowNode class type.

register_plugin_from_dict(module, plugin_as_dict) classmethod

Register a new plugin from a dictionary definition.

register_plugins(force=False, execution_scope=ExecutionScope.WORKSTATION)

This function imports all modules that start with 'ayon_' and register plugins from them.