paya.runtime.plugs.Angle#
- class Angle(*args, **kwargs)#
Inheritance
UnitMath1DMathAttributeAttributePyNodeProxyUnicode- classmethod create(node, attrName, **kwargs)#
Creates a
doubleAngleattribute.- Parameters
node (
str,DependNode) – the node on which to create the attributeattrName (str) – the name of the attribute
**kwargs – forwarded to
paya.runtime.nodes.DependNode.addAttr()
- Returns
The generated attribute.
- Return type
- get(plug=False, default=None, **kwargs)#
Overloads
paya.runtime.plugs.Attribute.get()to return anAngleinstance instead of afloat. The instance will have embedded unit information (access via.unit).
- set(*args, **kwargs)#
Overloads
set()for improved unit management. If the argument is afloat, then it will be set directly. If the argument is anAngleinstance with units that are different from the UI, it will be converted accordingly.To set values with a
floatin degrees regardless of UI setting, usedegToUI(), available onpaya.runtime.
- unwind360()#
- Returns
This angle, rolled so that it always remains in the -360 ->
360 range. :rtype:
Angle
- unwindShortest()#
- Returns
This angle, unwound and, if over 180, converted to negative form.
- Return type
- unwindSwitch(switchAttr, shortestIndex=0, positiveIndex=1, negativeIndex=2)#
Unwinds this angle, with the ‘shortest’ / ‘positive’ / ‘negative’ modes chosen from a user attribute (typically an enum). Useful for twist setups.
This method is more efficient than switching between the outputs of
unwindShortest(),unwindPositive()andunwindNegative().- Parameters
- Returns
The unwound angle.
- Return type