Skip to content

interface

Interfaces to inherit from to define workflow nodes and extensions.

InputAttribute dataclass

Represents an input attribute for a workflow node.

Source code in client/ayon_workflow/plugin_system/interface.py
 8
 9
10
11
12
13
14
15
16
17
@dataclass
class InputAttribute:
    """ Represents an input attribute for a workflow node.
    """
    name: str
    type: Type = Any
    description: str = ""
    default: Any = None
    allow_multi_connection: bool = False
    widget: dict[str, Any] = field(default_factory=dict)

OutputAttribute dataclass

Represents an input attribute for a workflow node.

Source code in client/ayon_workflow/plugin_system/interface.py
20
21
22
23
24
25
26
@dataclass
class OutputAttribute:
    """ Represents an input attribute for a workflow node.
    """
    name: str
    type: Type = Any
    description: str = ""

WorkflowNode dataclass

Base class for available workflow UI nodes.

Source code in client/ayon_workflow/plugin_system/interface.py
38
39
40
41
42
43
44
45
46
47
@dataclass
class WorkflowNode:
    """ Base class for available workflow UI nodes.
    """
    name: str
    version: str
    inputs: list[InputAttribute]
    outputs: list[OutputAttribute]
    description: str = ""
    implementation: Optional[Union[type, WorkflowNodeImplementation]] = None

WorkflowNodeImplementation dataclass

Implementation from functions.

Source code in client/ayon_workflow/plugin_system/interface.py
29
30
31
32
33
34
35
@dataclass
class WorkflowNodeImplementation:
    """ Implementation from functions.
    """
    module: Any
    func: Optional[Callable]
    revert_func: Optional[Callable] = None