Skip to content

maya_zen_tools.errors

ZenToolsError

Bases: Exception

Base class for ZenTools Exceptions

Source code in src/maya_zen_tools/errors.py
14
15
16
17
class ZenToolsError(Exception):
    """
    Base class for ZenTools Exceptions
    """

TooManyShapesError

Bases: maya_zen_tools.errors.InvalidSelectionError

Raised when a loop or loft is attempted using components from more than one polygon mesh.

Source code in src/maya_zen_tools/errors.py
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
class TooManyShapesError(InvalidSelectionError):
    """
    Raised when a loop or loft is attempted using
    components from more than one polygon mesh.
    """

    def __init__(self, shapes: Sequence[str]) -> None:
        self.shapes: tuple[str, ...] = tuple(shapes)
        super().__init__(shapes)

    def __repr__(self) -> str:
        return (
            f"TooManyShapesError({self.shapes!r}): "
            "Selected components must all belong to the same shape."
        )

    def __str__(self) -> str:
        return repr(self)