Source code for bana.OpenMaya.MPoint

"""
    bana.OpenMaya.MPoint
    ~~~~~~~~~~~~~~~~~~~~

    Extensions for the ``maya.OpenMaya.MPoint`` class.

    :copyright: Copyright 2014-2017 by Christopher Crouzet.
    :license: MIT, see LICENSE for details.
"""

import gorilla
from maya import OpenMaya


@gorilla.patches(OpenMaya.MPoint)
class MPoint(object):

    @gorilla.filter(True)
    @gorilla.settings(allow_hit=True)
[docs] def __str__(self): """Printable-friendly version of the values. Categories: :term:`fix`. Returns ------- str A printable-friendly version of the values. """ return str(self.bnGet())
[docs] def bnGet(self): """Retrieve the values as a list. Categories: :term:`MScriptUtil`. Returns ------- list [x, y, z, w] The values. """ return [self.x, self.y, self.z, self.w]