mrv.maya.nt.apipatch

Epydoc: mrv.maya.nt.apipatch

Contains patch classes that are altering their respective api classes

The classes here are rather verbose and used as patch-template which can be handled correctly by epydoc, and whose method will be used to patch the respective api classes.

As they are usually derived from the class they patch , they could also be used directly

note:never import classes directly in here, import the module instead, thus not: thisImportedClass but: module.thisImportedClass !

Functions

mrv.maya.nt.apipatch._mplug_createUndoSetFunc(dataTypeId, getattroverride=None)

Create a function setting a value with undo support

Parameter:dataTypeId – string naming the datatype, like “Bool” - capitalization is important
Note:if undo is globally disabled, we will resolve to implementing a faster function instead as we do not store the previous value.
Note:to use the orinal method without undo, use api.MPlug.setX(your_plug, value)
mrv.maya.nt.apipatch.init_applyPatches()

Called by package __init__ method to finally apply the patch according to the template classes Template classes must derive from the to-be-patched api class first, and can derive from helper classes providing basic patch methods. Helper classes must derive from Abstract to indicate their purpose

If a class has an _applyPatch method, it will be called and not additional. If it returns True, the class members will be applied as usual, if False the method will stop

Note:overwritten api methods will be renamed to _api_methodname
Note:currently this method works not recursively

Classes

Epydoc: mrv.maya.nt.apipatch.Abstract

class mrv.maya.nt.apipatch.Abstract
Class flagging that subclasses should be abstract and are only to be used as superclass

Epydoc: mrv.maya.nt.apipatch.ArrayBase

class mrv.maya.nt.apipatch.ArrayBase

Bases: mrv.maya.nt.apipatch.Abstract

Base class for all maya arrays to easily fix them

Note:set _apicls class variable to your api base class
classmethod mfromIter(iter)
Returns:Array created from elements yielded by iter
Note:this one is less efficient than mfromList as the final length of the array is not predetermined
classmethod mfromList(list)
Returns:Array created from the given list of elements
classmethod mfromMultiple(*args)
Returns:Array created from the given elements

Epydoc: mrv.maya.nt.apipatch.MAngle

class mrv.maya.nt.apipatch.MAngle(*args)

Bases: maya.OpenMaya.MAngle, mrv.maya.nt.apipatch.TimeDistanceAngleBase

asAngMinutes()
asAngSeconds()
asDegrees()
asRadians()
asUnits()
assign()
className()
internalToUI()
internalUnit()
setInternalUnit()
setUIUnit()
setUnit()
setValue()
thisown
The membership flag
uiToInternal()
uiUnit()
unit()
value()

Epydoc: mrv.maya.nt.apipatch.MColor

class mrv.maya.nt.apipatch.MColor(*args)

Bases: maya.OpenMaya.MColor, mrv.maya.nt.apipatch.PatchIterablePrimitives

a
assign()
b
g
get()
r
set()
thisown
The membership flag

Epydoc: mrv.maya.nt.apipatch.MColorArray

class mrv.maya.nt.apipatch.MColorArray(*args)

Bases: maya.OpenMaya.MColorArray, mrv.maya.nt.apipatch.ArrayBase

Wrap MColor to make it compatible to pythonic contructs.

Note:for performance reasons, we do not provide negative index support
append()
assign()
className()
clear()
copy()
get()
insert()
length()
classmethod mfromIter(iter)
Returns:Array created from elements yielded by iter
Note:this one is less efficient than mfromList as the final length of the array is not predetermined
classmethod mfromList(list)
Returns:Array created from the given list of elements
classmethod mfromMultiple(*args)
Returns:Array created from the given elements
remove()
set()
setLength()
setSizeIncrement()
sizeIncrement()
thisown
The membership flag

Epydoc: mrv.maya.nt.apipatch.MDistance

class mrv.maya.nt.apipatch.MDistance(*args)

Bases: maya.OpenMaya.MDistance, mrv.maya.nt.apipatch.TimeDistanceAngleBase

asCentimeters()
asFeet()
asInches()
asKilometers()
asMeters()
asMiles()
asMillimeters()
asUnits()
asYards()
assign()
className()
internalToUI()
internalUnit()
setInternalUnit()
setUIUnit()
setUnit()
setValue()
thisown
The membership flag
uiToInternal()
uiUnit()
unit()
value()

Epydoc: mrv.maya.nt.apipatch.MDoubleArray

class mrv.maya.nt.apipatch.MDoubleArray(*args)

Bases: maya.OpenMaya.MDoubleArray, mrv.maya.nt.apipatch.ArrayBase

Note:for performance reasons, we do not provide negative index support
append()
assign()
className()
clear()
copy()
get()
insert()
length()
classmethod mfromIter(iter)
Returns:Array created from elements yielded by iter
Note:this one is less efficient than mfromList as the final length of the array is not predetermined
classmethod mfromList(list)
Returns:Array created from the given list of elements
classmethod mfromMultiple(*args)
Returns:Array created from the given elements
remove()
set()
setLength()
setSizeIncrement()
sizeIncrement()
thisown
The membership flag

Epydoc: mrv.maya.nt.apipatch.MEulerRotation

class mrv.maya.nt.apipatch.MEulerRotation(*args)

Bases: maya.OpenMaya.MEulerRotation, mrv.maya.nt.apipatch.PatchIterablePrimitives

alternateSolution()
asMatrix()
asQuaternion()
asVector()
assign()
bound()
boundIt()
closestCut()
closestSolution()
decompose()
incrementalRotateBy()
inverse()
invertIt()
isEquivalent()
isZero()
order
reorder()
reorderIt()
setToAlternateSolution()
setToClosestCut()
setToClosestSolution()
setValue()
thisown
The membership flag
x
y
z

Epydoc: mrv.maya.nt.apipatch.MFloatArray

class mrv.maya.nt.apipatch.MFloatArray(*args)

Bases: maya.OpenMaya.MFloatArray, mrv.maya.nt.apipatch.ArrayBase

Note:for performance reasons, we do not provide negative index support
append()
assign()
className()
clear()
copy()
get()
insert()
length()
classmethod mfromIter(iter)
Returns:Array created from elements yielded by iter
Note:this one is less efficient than mfromList as the final length of the array is not predetermined
classmethod mfromList(list)
Returns:Array created from the given list of elements
classmethod mfromMultiple(*args)
Returns:Array created from the given elements
remove()
set()
setLength()
setSizeIncrement()
sizeIncrement()
thisown
The membership flag

Epydoc: mrv.maya.nt.apipatch.MFloatMatrix

class mrv.maya.nt.apipatch.MFloatMatrix(*args)

Bases: maya.OpenMaya.MFloatMatrix, mrv.maya.nt.apipatch.PatchMatrix

adjoint()
assign()
className()
det3x3()
det4x4()
get()
homogenize()
inverse()
isEquivalent()
matrix
scriptutil()
setToIdentity()
setToProduct()
thisown
The membership flag
transpose()

Epydoc: mrv.maya.nt.apipatch.MFloatPoint

class mrv.maya.nt.apipatch.MFloatPoint(*args)

Bases: maya.OpenMaya.MFloatPoint, mrv.maya.nt.apipatch.PatchIterablePrimitives

assign()
cartesianize()
className()
distanceTo()
get()
homogenize()
isEquivalent()
rationalize()
setCast()
thisown
The membership flag
w
x
y
z

Epydoc: mrv.maya.nt.apipatch.MFloatPointArray

class mrv.maya.nt.apipatch.MFloatPointArray(*args)

Bases: maya.OpenMaya.MFloatPointArray, mrv.maya.nt.apipatch.ArrayBase

Wrap MFloatPoint to make it compatible to pythonic contructs.

Note:for performance reasons, we do not provide negative index support
append()
assign()
className()
clear()
copy()
get()
insert()
length()
classmethod mfromIter(iter)
Returns:Array created from elements yielded by iter
Note:this one is less efficient than mfromList as the final length of the array is not predetermined
classmethod mfromList(list)
Returns:Array created from the given list of elements
classmethod mfromMultiple(*args)
Returns:Array created from the given elements
remove()
set()
setLength()
setSizeIncrement()
sizeIncrement()
thisown
The membership flag

Epydoc: mrv.maya.nt.apipatch.MFloatVector

class mrv.maya.nt.apipatch.MFloatVector(*args)

Bases: maya.OpenMaya.MFloatVector, mrv.maya.nt.apipatch.PatchIterablePrimitives

angle()
assign()
get()
isEquivalent()
isParallel()
length()
normal()
normalize()
thisown
The membership flag
x
y
z

Epydoc: mrv.maya.nt.apipatch.MFloatVectorArray

class mrv.maya.nt.apipatch.MFloatVectorArray(*args)

Bases: maya.OpenMaya.MFloatVectorArray, mrv.maya.nt.apipatch.ArrayBase

Wrap MFloatVector to make it compatible to pythonic contructs.

Note:for performance reasons, we do not provide negative index support
append()
assign()
className()
clear()
copy()
get()
insert()
length()
classmethod mfromIter(iter)
Returns:Array created from elements yielded by iter
Note:this one is less efficient than mfromList as the final length of the array is not predetermined
classmethod mfromList(list)
Returns:Array created from the given list of elements
classmethod mfromMultiple(*args)
Returns:Array created from the given elements
remove()
set()
setLength()
setSizeIncrement()
sizeIncrement()
thisown
The membership flag

Epydoc: mrv.maya.nt.apipatch.MIntArray

class mrv.maya.nt.apipatch.MIntArray(*args)

Bases: maya.OpenMaya.MIntArray, mrv.maya.nt.apipatch.ArrayBase

Attach additional creator functions

append()
assign()
className()
clear()
copy()
get()
insert()
length()
classmethod mfromIter(iter)
Returns:Array created from elements yielded by iter
Note:this one is less efficient than mfromList as the final length of the array is not predetermined
classmethod mfromList(list)
Returns:Array created from the given list of elements
classmethod mfromMultiple(*args)
Returns:Array created from the given elements
classmethod mfromRange(i, j)
Returns:

An MIntArray initialized with integers ranging from i to j

Parameters:
  • i – first integer of the returned array
  • j – last integer of returned array will have the value j-1
remove()
set()
setLength()
setSizeIncrement()
sizeIncrement()
thisown
The membership flag

Epydoc: mrv.maya.nt.apipatch.MItMeshEdge

class mrv.maya.nt.apipatch.MItMeshEdge(*args)

Bases: maya.OpenMaya.MItMeshEdge, mrv.maya.nt.apipatch.MeshIteratorBase

center()
className()
cleanupSmoothing()
connectedToEdge()
connectedToFace()
count()
currentItem()
edge()
geomChanged()
getConnectedEdges()
getConnectedFaces()
getLength()
index()
isDone()
isSmooth()
next()
numConnectedEdges()
numConnectedFaces()
onBoundary()
point()
reset()
setIndex()
setPoint()
setSmoothing()
thisown
The membership flag
updateSurface()

Epydoc: mrv.maya.nt.apipatch.MItMeshFaceVertex

class mrv.maya.nt.apipatch.MItMeshFaceVertex(*args)

Bases: maya.OpenMaya.MItMeshFaceVertex, mrv.maya.nt.apipatch.MeshIteratorBase

className()
currentItem()
faceId()
faceVertId()
faceVertex()
geomChanged()
getBinormal()
getColor()
getColorIndex()
getNormal()
getTangent()
getUV()
getUVIndex()
hasColor()
hasUVs()
isDone()
next()
normalId()
position()
reset()
setIndex()
tangentId()
thisown
The membership flag
updateSurface()
vertId()

Epydoc: mrv.maya.nt.apipatch.MItMeshPolygon

class mrv.maya.nt.apipatch.MItMeshPolygon(*args)

Bases: maya.OpenMaya.MItMeshPolygon, mrv.maya.nt.apipatch.MeshIteratorBase

center()
className()
count()
currentItem()
geomChanged()
getArea()
getColor()
getColorIndex()
getColorIndices()
getColors()
getConnectedEdges()
getConnectedFaces()
getConnectedVertices()
getEdges()
getNormal()
getNormals()
getPointAtUV()
getPoints()
getTriangle()
getTriangles()
getUV()
getUVArea()
getUVAtPoint()
getUVIndex()
getUVSetNames()
getUVs()
getVertices()
hasColor()
hasUVs()
hasValidTriangulation()
index()
isConnectedToEdge()
isConnectedToFace()
isConnectedToVertex()
isConvex()
isDone()
isHoled()
isLamina()
isPlanar()
isStarlike()
next()
normalIndex()
numColors()
numConnectedEdges()
numConnectedFaces()
numTriangles()
onBoundary()
point()
polygon()
polygonVertexCount()
reset()
setIndex()
setPoint()
setPoints()
setUV()
setUVs()
tangentIndex()
thisown
The membership flag
updateSurface()
vertexIndex()
zeroArea()
zeroUVArea()

Epydoc: mrv.maya.nt.apipatch.MItMeshVertex

class mrv.maya.nt.apipatch.MItMeshVertex(*args)

Bases: maya.OpenMaya.MItMeshVertex, mrv.maya.nt.apipatch.MeshIteratorBase

className()
connectedToEdge()
connectedToFace()
count()
currentItem()
geomChanged()
getColor()
getColorIndices()
getColors()
getConnectedEdges()
getConnectedFaces()
getConnectedVertices()
getNormal()
getNormalIndices()
getNormals()
getOppositeVertex()
getUV()
getUVIndices()
getUVs()
hasColor()
index()
isDone()
next()
numConnectedEdges()
numConnectedFaces()
numUVs()
onBoundary()
position()
reset()
setIndex()
setPosition()
setUV()
setUVs()
thisown
The membership flag
translateBy()
updateSurface()
vertex()

Epydoc: mrv.maya.nt.apipatch.MMatrix

class mrv.maya.nt.apipatch.MMatrix(*args)

Bases: maya.OpenMaya.MMatrix, mrv.maya.nt.apipatch.PatchMatrix

adjoint()
assign()
className()
det3x3()
det4x4()
get()
homogenize()
inverse()
isEquivalent()
isSingular()
matrix
scriptutil()
setToIdentity()
setToProduct()
thisown
The membership flag
transpose()

Epydoc: mrv.maya.nt.apipatch.MObjectArray

class mrv.maya.nt.apipatch.MObjectArray(*args)

Bases: maya.OpenMaya.MObjectArray, mrv.maya.nt.apipatch.ArrayBase

Wrap MObject to make it compatible to pythonic contructs.

Note:This array also fixes an inherent issue that comes into play when MObjects are returned using __getitem__, as the reference count does not natively get incremented, and the MObjects will be obsolete once the parent-array goes out of scope
Note:for performance reasons, we do not provide negative index support
append()
className()
clear()
copy()
insert()
length()
classmethod mfromIter(iter)
Returns:Array created from elements yielded by iter
Note:this one is less efficient than mfromList as the final length of the array is not predetermined
classmethod mfromList(list)
Returns:Array created from the given list of elements
classmethod mfromMultiple(*args)
Returns:Array created from the given elements
remove()
set()
setLength()
setSizeIncrement()
sizeIncrement()
thisown
The membership flag

Epydoc: mrv.maya.nt.apipatch.MPlug

class mrv.maya.nt.apipatch.MPlug(*args)

Bases: maya.OpenMaya.MPlug

Patch applying mrv specific functionality to the MPlug. These methods will be available through methods with the ‘m’ prefix.

Other methods are overridden to allow more pythonic usage of the MPlug class if and only if it is not specific to mrv.

Additionally it provides aliases for all MPlug methods that are getters, but don’t start with a ‘get’.

Note:Theoretically the MPlug would satisfy the ‘iDagItem’ interface, but due to the method prefixes, it could not work here as it calls un-prefixed methods only.
array()
asBool()
asChar()
asDouble()
asFloat()
asInt()
asMAngle()
asMDataHandle()
asMDistance()
asMObject()
asMTime()
asShort()
asString()
assign()
attribute()
child()
className()
connectedTo()
connectionByPhysicalIndex()
constructHandle()
destructHandle()
elementByLogicalIndex()
elementByPhysicalIndex()
evaluateNumElements()
getExistingArrayAttributeIndices()
getSetAttrCmds()
info()
isArray()
isCachingFlagSet()
isChannelBoxFlagSet()
isChild()
isCompound()
isConnected()
isDestination()
isDynamic()
isElement()
isFreeToChange()
isFromReferencedFile()
isIgnoredWhenRendering()
isKeyable()
isLocked()
isNetworked()
isNull()
isProcedural()
isSource()
length()
Returns:number of physical elements in the array, but only if they are not connected. If in doubt, run evaluateNumElements beforehand
Note:cannot use __len__ as it would break printing of pymel
logicalIndex()
maffected()
Returns:list of plugs affecting this one
maffects()
Returns:list of plugs affected by this one
masData(*args, **kwargs)
Returns:our data Mobject wrapped in base.Data
Note:args and kwagrs have to be provided as MDGContext.fsNormal does not exist in maya 8.5, so we have to hide that fact.
mchildByName(childname)
Returns:MPlug with the given childname
Raises AttributeError:
 if no child plug of the appropriate name could be found
Raises TypeError:
 self is not a compound plug
mchildren(predicate=<function <lambda> at 0x5f06938>)
Returns:list of intermediate child plugs, [ plug1 , plug2 ]
Parameter:predicate – return True to include x in result
classmethod mconnectMultiToMulti(*args, **kwargs)

Connect multiple source plugs to the same amount of detsination plugs.

Note:

This method provides the most efficient way to connect a large known amount of plugs to each other

Parameters:
  • iter_source_destination – Iterator yielding pairs of source and destination plugs to connect
  • force – If True, existing input connections on the destination side will be broken automatically. Otherwise the whole operation will fail if one connection could not be made.
Note:

Both iterators need to yield the same total amount of plugs

Note:

In the current implementation, performance will be hurt if force is specified as each destination has to be checked for a connection in advance

mconnectTo(*args, **kwargs)

Connect this plug to the right hand side plug

Parameters:
  • destplug – the plug to which to connect this plug to.
  • force – if True, the connection will be created even if another connection has to be broken to achieve that. If False, the connection will fail if destplug is already connected to another plug
Returns:

destplug allowing chained connections a.connectTo(b).connectTo(c)

Raises RuntimeError:
 

If destination is already connected and force = False

mconnectToArray(*args, **kwargs)

Connect self an element of the given arrayplug.

Parameters:
  • arrayplug – the array plug to which you want to connect to
  • force – if True, the connection will be created even if another connection has to be broken to achieve that.
  • exclusive_connection – if True and destplug is an array, the plug will only be connected to an array element if it is not yet connected
Returns:

newly created element plug or the existing one

mconnections()
Returns:tuple with input and outputs ( inputPlug, outputPlugs )
mct(other)
force
mctf(other)
force
mdc(*args, **kwargs)

Disconnect this plug from other plug if they are connected

Parameter:other – MPlug that will be disconnected from this plug
Returns:other plug allowing to chain disconnections
mdependencyInfo(by=False)
Returns:list of plugs on this node that this plug affects or is being affected by
Parameter:by – if false, affected attributplugs will be returned, otherwise the attributeplugs affecting this one
Note:you can also use the base.DependNode.dependencyInfo method on the node itself if plugs are not required - this will also be faster
Note:have to use MEL :(
mdisconnect(*args, **kwargs)

Completely disconnect all inputs and outputs of this plug. The plug will not be connected anymore.

Returns:self, allowing chained commands
mdisconnectFrom(*args, **kwargs)

Disconnect this plug from other plug if they are connected

Parameter:other – MPlug that will be disconnected from this plug
Returns:other plug allowing to chain disconnections
mdisconnectInput(*args, **kwargs)

Disconnect the input connection if one exists

Returns:self, allowing chained commands
mdisconnectNode(*args, **kwargs)

Disconnect this plug from the given node if they are connected

Parameter:other – Node that will be completely disconnected from this plug
mdisconnectOutputs(*args, **kwargs)

Disconnect all outgoing connections if they exist

Returns:self, allowing chained commands
mfullyQualifiedName()
Returns:string returning the absolute and fully qualified name of the plug. It might take longer to evaluate but is safe to use if you want to convert the resulting string back to the actual plug
static mhaveConnection(lhsplug, rhsplug)
Returns:True if lhsplug and rhs plug are connected - the direction does not matter
Note:equals lhsplug & rhsplug
mhc(lhs, rhs)
mict(destplug)
Returns:True if this plug is connected to destination plug ( in that order )
Note:return true for self.misConnectedTo(destplug) but false for destplug.misConnectedTo(self)
Note:use the mhaveConnection method whether both plugs have a connection no matter which direction
Note:use misConnected to find out whether this plug is connected at all
minput()
Returns:plug being the source of a connection to this plug or a null plug if no such plug exists
minputs()

Special handler returning the input plugs of array elements

Returns:list of plugs connected to the elements of this arrayplug
Note:if self is not an array, a list with 1 or 0 plugs will be returned
misConnectedTo(destplug)
Returns:True if this plug is connected to destination plug ( in that order )
Note:return true for self.misConnectedTo(destplug) but false for destplug.misConnectedTo(self)
Note:use the mhaveConnection method whether both plugs have a connection no matter which direction
Note:use misConnected to find out whether this plug is connected at all
miterGraph(*args, **kwargs)
Returns:graph iterator with self as root, args and kwargs are passed to it.iterGraph. Plugs are returned by default, but this can be specified explicitly using the plug=True kwarg
miterInputGraph(*args, **kwargs)
Returns:iterator over the graph starting at this plug in input(upstream) direction. Plugs will be returned by default
Note:see it.iterGraph for valid args and kwargs
miterOutputGraph(*args, **kwargs)
Returns:iterator over the graph starting at this plug in output(downstream) direction. Plugs will be returned by default
Note:see it.iterGraph for valid args and kwargs
mnextLogicalIndex()
Returns:index of logical indexed plug that does not yet exist
Note:as this method does a thorough search, it is relatively slow compared to a simple numPlugs + 1 algorithm
Note:only makes sense for array plugs
mnextLogicalPlug()
Returns:plug at newly created logical index
Note:only valid for array plugs
moutput()
Returns:first plug that has this plug as source of a connection, or null plug if no such plug exists.
Note:convenience method
moutputs()
Returns:MPlugArray with all plugs having this plug as source
Todo:should the method be smarter and deal nicer with complex array or compound plugs ?
mparent()
Returns:parent of this plug or None
Note:for array plugs, this is the array, for child plugs the actual parent
msetBool(*args, **kwargs)
msetCaching(*args, **kwargs)
if True, the plug’s value will be cached, preventing unnecessary computations
msetChannelBox(*args, **kwargs)
if True, the plug will be visible in the channelbox, even though it might not be keyable or viceversa
msetChar(*args, **kwargs)
msetDouble(*args, **kwargs)
msetFloat(*args, **kwargs)
msetInt(*args, **kwargs)
msetKeyable(*args, **kwargs)
if True, the plug may be set using animation curves
msetLocked(*args, **kwargs)
If True, the plug’s value may not be changed anymore
msetMAngle(*args, **kwargs)
msetMDistance(*args, **kwargs)
msetMObject(*args, **kwargs)
msetMTime(*args, **kwargs)
msetShort(*args, **kwargs)
msetString(*args, **kwargs)
msubPlugs(predicate=<function <lambda> at 0x5f06aa0>)
Returns:list of intermediate sub-plugs that are either child plugs or element plugs. Returned list will be empty for leaf-level plugs
Parameter:predicate – return True to include x in result
Note:use this function recursively for easy deep traversal of all combinations of array and compound plugs
mwa()
Returns:Attribute instance of our underlying attribute
mwn()
Returns:wrapped Node of the plugs node
Note:instance information gets lost this way, the respective instance can be re-retrieved using the instance information on this instanced attribute, if this is an instanced attribute
mwrappedAttribute()
Returns:Attribute instance of our underlying attribute
mwrappedNode()
Returns:wrapped Node of the plugs node
Note:instance information gets lost this way, the respective instance can be re-retrieved using the instance information on this instanced attribute, if this is an instanced attribute
name()
node()
numChildren()
numConnectedChildren()
numConnectedElements()
numElements()
parent()
partialName()
selectAncestorLogicalIndex()
setAttribute()
setBool()
setCaching()
setChannelBox()
setChar()
setDouble()
setFloat()
setInt()
setKeyable()
setLocked()
setMAngle()
setMDataHandle()
setMDistance()
setMObject()
setMPxData()
setMTime()
setNumElements()
setShort()
setString()
thisown
The membership flag

Epydoc: mrv.maya.nt.apipatch.MPlugArray

class mrv.maya.nt.apipatch.MPlugArray(*args)

Bases: maya.OpenMaya.MPlugArray, mrv.maya.nt.apipatch.ArrayBase

Wrap MPlugArray to make it compatible to pythonic contructs

Note:for performance reasons, we do not provide negative index support
append()
assign()
className()
clear()
copy()
insert()
length()
classmethod mfromIter(iter)
Returns:Array created from elements yielded by iter
Note:this one is less efficient than mfromList as the final length of the array is not predetermined
classmethod mfromList(list)
Returns:Array created from the given list of elements
classmethod mfromMultiple(*args)
Returns:Array created from the given elements
remove()
set()
setLength()
setSizeIncrement()
sizeIncrement()
thisown
The membership flag

Epydoc: mrv.maya.nt.apipatch.MPoint

class mrv.maya.nt.apipatch.MPoint(*args)

Bases: maya.OpenMaya.MPoint, mrv.maya.nt.apipatch.PatchIterablePrimitives

assign()
cartesianize()
className()
distanceTo()
get()
homogenize()
isEquivalent()
rationalize()
thisown
The membership flag
w
x
y
z

Epydoc: mrv.maya.nt.apipatch.MPointArray

class mrv.maya.nt.apipatch.MPointArray(*args)

Bases: maya.OpenMaya.MPointArray, mrv.maya.nt.apipatch.ArrayBase

Wrap MPoint to make it compatible to pythonic contructs.

Note:for performance reasons, we do not provide negative index support
append()
assign()
className()
clear()
copy()
get()
insert()
length()
classmethod mfromIter(iter)
Returns:Array created from elements yielded by iter
Note:this one is less efficient than mfromList as the final length of the array is not predetermined
classmethod mfromList(list)
Returns:Array created from the given list of elements
classmethod mfromMultiple(*args)
Returns:Array created from the given elements
remove()
set()
setLength()
setSizeIncrement()
sizeIncrement()
thisown
The membership flag

Epydoc: mrv.maya.nt.apipatch.MQuaternion

class mrv.maya.nt.apipatch.MQuaternion(*args)

Bases: maya.OpenMaya.MQuaternion, mrv.maya.nt.apipatch.PatchIterablePrimitives

asEulerRotation()
asMatrix()
assign()
conjugate()
conjugateIt()
exp()
get()
getAxisAngle()
inverse()
invertIt()
isEquivalent()
log()
negateIt()
normal()
normalizeIt()
scaleIt()
setAxisAngle()
setToXAxis()
setToYAxis()
setToZAxis()
thisown
The membership flag
w
x
y
z

Epydoc: mrv.maya.nt.apipatch.MSelectionList

class mrv.maya.nt.apipatch.MSelectionList(*args)

Bases: maya.OpenMaya.MSelectionList, mrv.maya.nt.apipatch.ArrayBase

add()
assign()
className()
clear()
getDagPath()
getDependNode()
getPlug()
getSelectionStrings()
hasItem()
hasItemPartly()
isEmpty()
length()
merge()
static mfromComponentList(iter_components, **kwargs)
Returns:MSelectionList as initialized from the given list of tuple( DagNode, Component ), Component can be a filled Component object or null MObject
Parameter:kwargs – passed to base.toComponentSelectionList
static mfromIter(iter_items, **kwargs)
Returns:MSelectionList as initialized from the given iterable of Nodes, MObjects, MDagPaths, MPlugs or strings
Parameter:kwargs – passed to base.toSelectionList
static mfromList(iter_items, **kwargs)
Returns:MSelectionList as initialized from the given iterable of Nodes, MObjects, MDagPaths, MPlugs or strings
Parameter:kwargs – passed to base.toSelectionList
static mfromMultiple(*args, **kwargs)
Alternative form of mfromList as args can be passed in.
static mfromStrings(iter_strings, **kwargs)
Returns:MSelectionList initialized from the given iterable of strings
Parameter:kwargs – passed to base.toSelectionListFromNames
mhasItem(rhs)
Returns:True if we contain rhs
Note:As we check for Nodes as well as MayaAPI objects, we are possibly slow
miterComponents(**kwargs)
Returns:Iterator yielding node, component pairs, component is guaranteed to carry a component, implying that this iterator applies a filter
Parameter:kwargs – passed on to it.iterSelectionList
miterPlugs(**kwargs)
Returns:Iterator yielding all plugs on this selection list.
Parameter:kwargs – passed on to it.iterSelectionList
mtoIter(*args, **kwargs)
Returns:iterator yielding of Nodes and MPlugs stored in this given selection list
Note:all args and kwargs are passed to it.iterSelectionList
mtoList(*args, **kwargs)
Returns:list with the contents of this MSelectionList
Note:all args and kwargs passed to it.iterSelectionList
remove()
replace()
thisown
The membership flag
toggle()

Epydoc: mrv.maya.nt.apipatch.MTime

class mrv.maya.nt.apipatch.MTime(*args)

Bases: maya.OpenMaya.MTime, mrv.maya.nt.apipatch.TimeDistanceAngleBase

asUnits()
assign()
className()
setUIUnit()
setUnit()
setValue()
thisown
The membership flag
uiUnit()
unit()
value()

Epydoc: mrv.maya.nt.apipatch.MTransformationMatrix

class mrv.maya.nt.apipatch.MTransformationMatrix(*args)

Bases: maya.OpenMaya.MTransformationMatrix, mrv.maya.nt.apipatch.PatchMatrix

addRotation()
addRotationQuaternion()
addScale()
addShear()
addTranslation()
asMatrix()
asMatrixInverse()
asRotateMatrix()
asScaleMatrix()
assign()
className()
eulerRotation()
getRotation()
getRotationQuaternion()
getScale()
getShear()
getTranslation(space=1)
This patch is fully compatible to the default method
isEquivalent()
mgetScale(space=1)
msetScale(value, space=1)
reorderRotation()
rotateBy()
rotatePivot()
rotatePivotTranslation()
rotateTo()
rotation()
rotationOrder()
rotationOrientation()
scalePivot()
scalePivotTranslation()
setRotatePivot()
setRotatePivotTranslation()
setRotation()
setRotationOrientation()
setRotationQuaternion()
setScale()
setScalePivot()
setScalePivotTranslation()
setShear()
setToRotationAxis()
setTranslation(vector, space=1)
This patch is fully compatible to the default method
thisown
The membership flag
translation()

Epydoc: mrv.maya.nt.apipatch.MVector

class mrv.maya.nt.apipatch.MVector(*args)

Bases: maya.OpenMaya.MVector, mrv.maya.nt.apipatch.PatchIterablePrimitives

angle()
assign()
get()
isEquivalent()
isParallel()
length()
normal()
normalize()
rotateBy()
rotateTo()
thisown
The membership flag
transformAsNormal()
x
y
z

Epydoc: mrv.maya.nt.apipatch.MVectorArray

class mrv.maya.nt.apipatch.MVectorArray(*args)

Bases: maya.OpenMaya.MVectorArray, mrv.maya.nt.apipatch.ArrayBase

Note:for performance reasons, we do not provide negative index support
append()
assign()
className()
clear()
copy()
get()
insert()
length()
classmethod mfromIter(iter)
Returns:Array created from elements yielded by iter
Note:this one is less efficient than mfromList as the final length of the array is not predetermined
classmethod mfromList(list)
Returns:Array created from the given list of elements
classmethod mfromMultiple(*args)
Returns:Array created from the given elements
remove()
set()
setLength()
setSizeIncrement()
sizeIncrement()
thisown
The membership flag

Epydoc: mrv.maya.nt.apipatch.MeshIteratorBase

class mrv.maya.nt.apipatch.MeshIteratorBase

Bases: mrv.maya.nt.apipatch.Abstract

Provides common functionality for all MItMesh classes

Epydoc: mrv.maya.nt.apipatch.PatchIterablePrimitives

class mrv.maya.nt.apipatch.PatchIterablePrimitives

Bases: mrv.maya.nt.apipatch.Abstract

Note:Classes derived from this base should not be used directly

Epydoc: mrv.maya.nt.apipatch.PatchMatrix

class mrv.maya.nt.apipatch.PatchMatrix

Bases: mrv.maya.nt.apipatch.Abstract, mrv.maya.nt.apipatch.PatchIterablePrimitives

Only for matrices

Epydoc: mrv.maya.nt.apipatch.TimeDistanceAngleBase

class mrv.maya.nt.apipatch.TimeDistanceAngleBase

Bases: mrv.maya.nt.apipatch.Abstract

Base patch class for all indicated classes

Note:idea for patches from pymel

Epydoc: mrv.maya.nt.apipatch

class mrv.maya.nt.apipatch.iDagItem

Bases: mrv.interface.Interface

Describes interface for a DAG item. Its used to unify interfaces allowing to access objects in a dag like graph Of the underlying object has a string representation, the defatult implementation will work natively. Otherwise the getParent and getChildren methods should be overwritten

Note:a few methods of this class are abstract and need to be overwritten
Note:this class expects the attribute ‘_sep’ to exist containing the separator at which your object should be split ( for default implementations ). This works as the passed in pointer will belong to derived classes that can define that attribute on instance or on class level
classmethod addSep(item, sep)
Returns:

item with separator added to it ( just once )

Note:

operates best on strings

Parameters:
  • item – item to add separator to
  • sep – the separator
basename()
Returns:basename of this path, ‘/hello/world’ -> ‘world’
children(predicate=<function <lambda> at 0x7f41dd7c2ed8>)
Returns:list of intermediate children of path, [ child1 , child2 ]
Parameter:predicate – return True to include x in result
Note:the child objects returned are supposed to be valid paths, not just relative paths
childrenDeep(order=1, predicate=<function <lambda> at 0x7f41dd7c5050>)
Returns:

list of all children of path, [ child1 , child2 ]

Parameters:
  • order – order enumeration
  • predicate – returns true if x may be returned
Note:

the child objects returned are supposed to be valid paths, not just relative paths

fullChildName(childname)
Add the given name to the string version of our instance :return: string with childname added like name _sep childname
isPartOf(other)
Returns:True if self is a part of other, and thus can be found in other
Note:operates on strings only
isRoot()
Returns:True if this path is the root of the DAG
isRootOf(other)
Returns:True other starts with self
Note:operates on strings
Note:we assume other has the same type as self, thus the same separator
iterParents(predicate=<function <lambda> at 0x7f41dd7c5230>)
Returns:generator retrieving all parents up to the root
Parameter:predicate – returns True for all x that you want to be returned
parent()
Returns:parent of this path, ‘/hello/world’ -> ‘/hello’ or None if this path is the dag’s root
parentDeep()
Returns:all parents of this path, ‘/hello/my/world’ -> [ ‘/hello/my’,’/hello’ ]
root()
Returns:the root of the DAG - it has no further parents
supports(interface_type)
Returns:True if this instance supports the interface of the given type
Parameter:interface_type – Type of the interface you require this instance to support
Note:Must be used in case you only have a weak reference of your interface instance or proxy which is a case where the ordinary isinstance( obj, iInterface ) will not work

Table Of Contents

Previous topic

mrv.maya.nt.persistence

Next topic

mrv.maya.nt.anim

This Page