Source code for openrig.maya.core.ports
"""Port declarations for the solution connection system.
InputPort and OutputPort define the connection points between solutions.
Types are advisory strings — not enforced at runtime, used for documentation
and tooling warnings only.
"""
from dataclasses import dataclass, field
[docs]
@dataclass
class InputPort:
"""Declares a value that a solution needs from another solution.
Args:
name: Unique port identifier within the solution.
type: Advisory type string (e.g. ``"node"``, ``"transform"``, ``"joint"``).
required: If ``True``, the build fails before touching Maya when no
connection is declared for this port.
description: Human-readable description of what this input expects.
"""
name: str
type: str
required: bool = True
description: str = field(default="")
[docs]
@dataclass
class OutputPort:
"""Declares a value that a solution produces for other solutions.
Args:
name: Unique port identifier within the solution.
type: Advisory type string (e.g. ``"node"``, ``"transform"``, ``"joint"``).
description: Human-readable description of what this output provides.
"""
name: str
type: str
description: str = field(default="")