raygeo.ops.axis
Axis bitflag for multi-axis machines.
Represents a single axis or combination of axes (X, Y, Z, A, B, C, U). Axis values can be combined using bitwise operators (|, &, ^, ~) to represent multiple axes at once, useful when specifying which axes participate in a coordinated move or transformation.
Axis
Represents a single axis or a combination of axes (X, Y, Z, A, B, C, U).
Axis values can be combined using bitwise operators (|, &, ^, ~)
to represent multiple axes at once.
label
label: str
The uppercase label of the axis (e.g. "X", "Y", "Z").
name
name: str
The uppercase name of the axis (e.g. "X", "Y", "Z").
Legacy alias for label to match Python IntFlag.name.
value
value: int
The raw bit value of the axis.
assert_single_axis()
assert_single_axis() -> None
Assert that this Axis represents exactly one axis (not a combination).
Raises: ValueError — If the axis mask contains multiple or zero bits set.
| Parameter | Type | Description |
|---|---|---|
| Returns | None |
from_name()
@classmethod from_name(name: str) -> Axis
Look up an Axis by its uppercase name.
Returns: The corresponding Axis constant.
Raises: ValueError — If the name is unknown.
| Parameter | Type | Description |
|---|---|---|
name | str | The uppercase letter ("X", "Y", etc.). |
| Returns | Axis |