pymel.core.datatypes.Matrix

Inheritance diagram of Matrix

class Matrix(*args, **kwargs)

A 4x4 transformation matrix based on api Matrix

>>> from pymel.all import *
>>> import pymel.core.datatypes as dt
>>>
>>> i = dt.Matrix()
>>> print i.formated()
[[1.0, 0.0, 0.0, 0.0],
 [0.0, 1.0, 0.0, 0.0],
 [0.0, 0.0, 1.0, 0.0],
 [0.0, 0.0, 0.0, 1.0]]
>>> v = dt.Matrix(1, 2, 3)
>>> print v.formated()
[[1.0, 2.0, 3.0, 0.0],
 [1.0, 2.0, 3.0, 0.0],
 [1.0, 2.0, 3.0, 0.0],
 [1.0, 2.0, 3.0, 0.0]]
a00
a01
a02
a03
a10
a11
a12
a13
a20
a21
a22
a23
a30
a31
a32
a33
adjoint()

Returns the adjoint (adjugate) Matrix

apicls

alias of MMatrix

asMatrix(percent=None)

The matrix representation for this Matrix/TransformationMatrix/Quaternion/EulerRotation instance

assign(value)
blend(other, weight=0.5)

Returns a 0.0-1.0 scalar weight blend between self and other Matrix, blend mixes Matrix as transformation matrices

cnames = ('a00', 'a01', 'a02', 'a03', 'a10', 'a11', 'a12', 'a13', 'a20', 'a21', 'a22', 'a23', 'a30', 'a31', 'a32', 'a33')
data

The Matrix/FloatMatrix/TransformationMatrix/Quaternion/EulerRotation data

det()

Returns the determinant of this Matrix instance

det3x3()

Returns the determinant of the upper left 3x3 submatrix of this Matrix instance, it’s the same as doing det(m[0:3, 0:3])

det4x4()

Returns the 4x4 determinant of this Matrix instance

get()

Wrap the Matrix api get method

homogenize()

Returns a homogenized version of the Matrix

identity = Matrix([[1.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0], [0.0, 0.0, 0.0, 1.0]])
inverse()

Returns the inverse Matrix

isEquivalent(other, tol=1e-10)

Returns true if both arguments considered as Matrix are equal within the specified tolerance

isSingular()

Returns True if the given Matrix is singular

matrix

The Matrix representation for this Matrix/TransformationMatrix/Quaternion/EulerRotation instance

ndim = 2
rotate

The rotation expressed in this Matrix, in transform space

scale

The scale expressed in this Matrix, in transform space

setToIdentity()

m.setToIdentity() <==> m = a * b Sets MatrixN to the identity matrix

setToProduct(left, right)

m.setToProduct(a, b) <==> m = a * b Sets MatrixN to the result of the product of MatrixN a and MatrixN b

shape = (4, 4)
size = 16
translate

The translation expressed in this Matrix, in transform space

transpose()

Returns the transposed Matrix

weighted(weight)

Returns a 0.0-1.0 scalar weighted blend between identity and self

Previous topic

pymel.core.datatypes.FloatVector

Next topic

pymel.core.datatypes.MatrixN

Core

Core Modules

Other Modules

This Page