Python API 2.0 Reference
OpenMaya.MFnMesh Class Reference
+ Inheritance diagram for OpenMaya.MFnMesh:

Public Member Functions

def __init__ ()
 
def addHoles ()
 
def booleanOps ()
 
def edgeBorderInfo ()
 
def getClosestUVs ()
 
def getFloatPoints ()
 
def getMeshShellsIds ()
 
def getPointsAtUV ()
 
def getTriangleOffsets ()
 
def getUVBorderEdges ()
 
def intersectFaceAtUV ()
 
def isPolygonUVReversed ()
 
def isRightHandedTangent ()
 
def setEdgeSmoothings ()
 
- Public Member Functions inherited from OpenMaya.MFnDagNode
def __init__ ()
 
def addChild ()
 
def child ()
 
def childCount ()
 
def create ()
 
def dagPath ()
 
def dagRoot ()
 
def duplicate ()
 
def fullPathName ()
 
def getAllPaths ()
 
def getConnectedSetsAndMembers ()
 
def getPath ()
 
def hasChild ()
 
def hasParent ()
 
def instanceCount ()
 
def isChildOf ()
 
def isInstanced ()
 
def isInstancedAttribute ()
 
def isParentOf ()
 
def parent ()
 
def parentCount ()
 
def partialPathName ()
 
def removeChild ()
 
def removeChildAt ()
 
def setObject ()
 
def transformationMatrix ()
 
- Public Member Functions inherited from OpenMaya.MFnDependencyNode
def __init__ ()
 
def absoluteName ()
 
def addAttribute ()
 
def addExternalContentForFileAttr ()
 
def affectsAnimation ()
 
def attribute ()
 
def attributeClass ()
 
def attributeCount ()
 
def canBeWritten ()
 
def create ()
 
def dgCallbackIds ()
 
def dgCallbacks ()
 
def dgTimer ()
 
def dgTimerOff ()
 
def dgTimerOn ()
 
def dgTimerQueryState ()
 
def dgTimerReset ()
 
def findAlias ()
 
def findPlug ()
 
def getAffectedAttributes ()
 
def getAffectingAttributes ()
 
def getAliasAttr ()
 
def getAliasList ()
 
def getConnections ()
 
def getExternalContent ()
 
def hasAttribute ()
 
def hasUniqueName ()
 
def isFlagSet ()
 
def isNewAttribute ()
 
def isTrackingEdits ()
 
def name ()
 
def plugsAlias ()
 
def removeAttribute ()
 
def reorderedAttribute ()
 
def setAffectsAnimation ()
 
def setAlias ()
 
def setDoNotWrite ()
 
def setExternalContent ()
 
def setExternalContentForFileAttr ()
 
def setFlag ()
 
def setName ()
 
def setUuid ()
 
def uniqueName ()
 
def userNode ()
 
def uuid ()
 
- Public Member Functions inherited from OpenMaya.MFnBase
def __init__ ()
 
def hasObj ()
 
def object ()
 
def setObject ()
 
def type ()
 

Static Public Member Functions

def __new__ ()
 
- Static Public Member Functions inherited from OpenMaya.MFnDagNode
def __new__ ()
 
- Static Public Member Functions inherited from OpenMaya.MFnDependencyNode
def __new__ ()
 
def allocateFlag ()
 
def classification ()
 
def deallocateAllFlags ()
 
def deallocateFlag ()
 
- Static Public Member Functions inherited from OpenMaya.MFnBase
def __new__ ()
 

Static Public Attributes

int kEdgeClassification = 1
 
int kGeomBorder = -2
 
int kNormalClassification = 2
 
int kSharedUV = 0
 
int kUVBorder = -1
 
int kUnsharedUV = 1
 
Color Representations
int kAlpha = 1
 
int kRGB = 3
 
int kRGBA = 4
 
Boolean Operations
int kDifference = 2
 
int kIntersection = 3
 
int kUnion = 1
 
Other
int kInstanceUnspecified = -1
 
int kIntersectTolerance = 1
 
int kPointTolerance = 1
 
Split Placement Types
int kInternalPoint = 1
 
int kInvalid = 2
 
int kOnEdge = 0
 
- Static Public Attributes inherited from OpenMaya.MFnDagNode
int kNextPos = 255
 
- Static Public Attributes inherited from OpenMaya.MFnDependencyNode
int kTimerMetrics = 9
 
int kTimerTypes = 3
 
int kExtensionAttr = 3
 
int kInvalidAttr = 4
 
int kLocalDynamicAttr = 1
 
int kNormalAttr = 2
 
int kTimerInvalidState = 3
 
int kTimerOff = 0
 
int kTimerOn = 1
 
int kTimerUninitialized = 2
 
int kTimerMetric_callback = 0
 
int kTimerMetric_callbackNotViaAPI = 6
 
int kTimerMetric_callbackViaAPI = 5
 
int kTimerMetric_compute = 1
 
int kTimerMetric_computeDuringCallback = 7
 
int kTimerMetric_computeNotDuringCallback = 8
 
int kTimerMetric_dirty = 2
 
int kTimerMetric_draw = 3
 
int kTimerMetric_fetch = 4
 
int kTimerType_count = 2
 
int kTimerType_inclusive = 1
 
int kTimerType_self = 0
 

Only available in Maya 2012 HotFix 1 or later:

 checkSamePointTwice = property(...)
 
 displayColors = property(...)
 
 numColorSets = property(...)
 
 numEdges = property(...)
 
 numFaceVertices = property(...)
 
 numNormals = property(...)
 
 numPolygons = property(...)
 
 numUVSets = property(...)
 
 numVertices = property(...)
 
def addPolygon ()
 
def allIntersections ()
 
def anyIntersection ()
 
def assignColor ()
 
def assignColors ()
 
def assignUV ()
 
def assignUVs ()
 
def booleanOp ()
 
def cachedIntersectionAcceleratorInfo ()
 
def cleanupEdgeSmoothing ()
 
def clearBlindData ()
 
def clearColors ()
 
def clearUVs ()
 
def closestIntersection ()
 
def collapseEdges ()
 
def collapseFaces ()
 
def copy ()
 
def copyInPlace ()
 
def copyUVSet ()
 
def create ()
 
def createBlindDataType ()
 
def createColorSet ()
 
def createInPlace ()
 
def createUVSet ()
 
def currentColorSetName ()
 
def currentUVSetName ()
 
def deleteColorSet ()
 
def deleteEdge ()
 
def deleteFace ()
 
def deleteUVSet ()
 
def deleteVertex ()
 
def duplicateFaces ()
 
def extractFaces ()
 
def extrudeEdges ()
 
def extrudeFaces ()
 
def freeCachedIntersectionAccelerator ()
 
def generateSmoothMesh ()
 
def getAssignedUVs ()
 
def getAssociatedColorSetInstances ()
 
def getAssociatedUVSetInstances ()
 
def getAssociatedUVSetTextures ()
 
def getBinaryBlindData ()
 
def getBinormals ()
 
def getBlindDataAttrNames ()
 
def getBlindDataTypes ()
 
def getBoolBlindData ()
 
def getClosestNormal ()
 
def getClosestPoint ()
 
def getClosestPointAndNormal ()
 
def getColor ()
 
def getColorIndex ()
 
def getColorRepresentation ()
 
def getColorSetFamilyNames ()
 
def getColorSetNames ()
 
def getColorSetsInFamily ()
 
def getColors ()
 
def getConnectedShaders ()
 
def getCreaseEdges ()
 
def getCreaseVertices ()
 
def getDoubleBlindData ()
 
def getEdgeVertices ()
 
def getFaceAndVertexIndices ()
 
def getFaceNormalIds ()
 
def getFaceUVSetNames ()
 
def getFaceVertexBinormal ()
 
def getFaceVertexBinormals ()
 
def getFaceVertexColors ()
 
def getFaceVertexIndex ()
 
def getFaceVertexNormal ()
 
def getFaceVertexNormals ()
 
def getFaceVertexTangent ()
 
def getFaceVertexTangents ()
 
def getFloatBlindData ()
 
def getHoles ()
 
def getIntBlindData ()
 
def getInvisibleFaces ()
 
def getNormalIds ()
 
def getNormals ()
 
def getPoint ()
 
def getPointAtUV ()
 
def getPoints ()
 
def getPolygonNormal ()
 
def getPolygonTriangleVertices ()
 
def getPolygonUV ()
 
def getPolygonUVid ()
 
def getPolygonVertices ()
 
def getSmoothMeshDisplayOptions ()
 
def getStringBlindData ()
 
def getTangentId ()
 
def getTangents ()
 
def getTriangles ()
 
def getUV ()
 
def getUVAtPoint ()
 
def getUVSetFamilyNames ()
 
def getUVSetNames ()
 
def getUVSetsInFamily ()
 
def getUVs ()
 
def getUvShellsIds ()
 
def getVertexColors ()
 
def getVertexNormal ()
 
def getVertexNormals ()
 
def getVertices ()
 
def hasAlphaChannels ()
 
def hasBlindData ()
 
def hasColorChannels ()
 
def isBlindDataTypeUsed ()
 
def isColorClamped ()
 
def isColorSetPerInstance ()
 
def isEdgeSmooth ()
 
def isNormalLocked ()
 
def isPolygonConvex ()
 
def isUVSetPerInstance ()
 
def lockFaceVertexNormals ()
 
def lockVertexNormals ()
 
def numColors ()
 
def numUVs ()
 
def onBoundary ()
 
def polygonVertexCount ()
 
def removeFaceColors ()
 
def removeFaceVertexColors ()
 
def removeVertexColors ()
 
def renameUVSet ()
 
def setBinaryBlindData ()
 
def setBoolBlindData ()
 
def setColor ()
 
def setColors ()
 
def setCreaseEdges ()
 
def setCreaseVertices ()
 
def setCurrentColorSetName ()
 
def setCurrentUVSetName ()
 
def setDoubleBlindData ()
 
def setEdgeSmoothing ()
 
def setFaceColor ()
 
def setFaceColors ()
 
def setFaceVertexColor ()
 
def setFaceVertexColors ()
 
def setFaceVertexNormal ()
 
def setFaceVertexNormals ()
 
def setFloatBlindData ()
 
def setIntBlindData ()
 
def setInvisibleFaces ()
 
def setIsColorClamped ()
 
def setNormals ()
 
def setPoint ()
 
def setPoints ()
 
def setSmoothMeshDisplayOptions ()
 
def setSomeColors ()
 
def setSomeUVs ()
 
def setStringBlindData ()
 
def setUV ()
 
def setUVs ()
 
def setVertexColor ()
 
def setVertexColors ()
 
def setVertexNormal ()
 
def setVertexNormals ()
 
def sortIntersectionFaceTriIds ()
 
def split ()
 
def subdivideEdges ()
 
def subdivideFaces ()
 
def syncObject ()
 
def unlockFaceVertexNormals ()
 
def unlockVertexNormals ()
 
def updateSurface ()
 
def autoUniformGridParams ()
 
def clearGlobalIntersectionAcceleratorInfo ()
 
def globalIntersectionAcceleratorsInfo ()
 
def uniformGridParams ()
 

Additional Inherited Members

- Properties inherited from OpenMaya.MFnDagNode
 boundingBox = property(...)
 
 inModel = property(...)
 
 inUnderWorld = property(...)
 
 isInstanceable = property(...)
 
 isIntermediateObject = property(...)
 
 objectColor = property(...)
 
 objectColorRGB = property(...)
 
 objectColorType = property(...)
 
 useObjectColor = property(...)
 
- Properties inherited from OpenMaya.MFnDependencyNode
 isDefaultNode = property(...)
 
 isFromReferencedFile = property(...)
 
 isLocked = property(...)
 
 isShared = property(...)
 
 namespace = property(...)
 
 pluginName = property(...)
 
 typeId = property(...)
 
 typeName = property(...)
 

Detailed Description

Function set for operation on meshes (polygonal surfaces).

__init__()
Initializes a new, empty MFnMesh object.

__init__(MDagPath path)
Initializes a new MFnMesh object and attaches it to the DAG path
of a mesh node.

__init__(MObject nodeOrData)
Initializes a new MFnMesh object and attaches it to a mesh
node or mesh data object.

Method resolution order:
-   MFnMesh
-   MFnDagNode
-   MFnDependencyNode
-   MFnBase
-   builtins.object

Base Class

MFnDagNode

Constructors

Signature Parameters Description
Name Type

Description

MFnMesh()      

Default constructor. Returns a new MFnMesh functionset with no Maya object attached.

MFnMesh(mesh) mesh MObject Mesh node or mesh geometry data.

Returns a new MFnMesh object attached to the given mesh node or mesh geometry data.

Only available in Maya 2012 HotFix 1 or later:

MFnMesh(path) path MDagPath Dag path of a mesh node.

Returns a new MFnMesh object attached to the given mesh node.

str() Support

Default.

repr() Support

Default.

 


Constructor & Destructor Documentation

def OpenMaya.MFnMesh.__init__ ( )
Initialize self.  See help(type(self)) for accurate signature.

Member Function Documentation

def OpenMaya.MFnMesh.__new__ ( )
static
Create and return a new object.  See help(type) for accurate signature.
def OpenMaya.MFnMesh.addHoles ( )
addHoles(faceIndex, vertices, loopCounts, mergeVertices=True, pointTolerance=kPointTolerance) -> self

Adds holes to a mesh polygon.
loopCounts is an array of vertex counts.
The first entry gives the count of vertices that make up the
first hole to add to the polygon (using that many entries in vertexArray). The following
entries in loopCounts give the count of vertices that make up each remaining hole,
using the following entries in vertexArray.
Therefore the sum of the entries of loopCounts should equal the total
length of vertexArray.
Note that holes should normally be specified with the opposite winding order
to the exterior polygon.
OpenMaya.MFnMesh.addPolygon ( )
addPolygon(vertices, mergeVertices=True, pointTolerance=kPointTolerance, loopCounts=None) -> faceId

Adds a new polygon to the mesh, returning the index of the new
polygon. If mergeVertices is True and a new vertex is within
pointTolerance of an existing one, then they are 'merged' by reusing
the existing vertex and discarding the new one.

loopCounts allows for polygons with holes. If supplied, it is an array of integer vertex
counts. The first entry gives the count of vertices that make up the
exterior of the polygon (using that many entries in vertexArray). The following
entries in loopCounts give the count of vertices that make up each hole,
using the following entries in vertexArray.
Therefore the sum of the entries of loopCounts should equal the total
length of vertexArray.
Note that holes should normally be specified with the opposite winding order
to the exterior polygon.
Signature: addPolygon(vertices, mergeVertices=True, pointTolerance=kPointTolerance)
Parameters:
NameTypeDescription
vertices sequence of MPoints Positions of the new polygon's vertices.
mergeVertices bool If True, reuse an existing vertex if it is within the specified tolerance of a new one.
pointTolerance float How close must an existing vertex be to a new one before they are merged.
Returns: int
Description: Adds a new polygon to the mesh, returning the index of the new polygon. If mergeVertices is True and a new vertex is within pointTolerance of an existing one, then they are "merged" by reusing the existing vertex and discarding the new one.
OpenMaya.MFnMesh.allIntersections ( )
allIntersections(raySource, rayDirection, space, maxParam,
    testBothDirections, faceIds=None, triIds=None, idsSorted=False,
    accelParams=None, tolerance=kIntersectTolerance, sortHits=False)
  -> (hitPoints, hitRayParams, hitFaces, hitTriangles, hitBary1s, hitBary2s)

Finds all intersection of a ray starting at raySource and travelling
in rayDirection with the mesh.

If faceIds is specified, then only those faces will be considered
for intersection. If both faceIds and triIds are given, then the
triIds will be interpreted as face-relative and each pair of entries
will be taken as a (face, triangle) pair to be considered for
intersection. Thus, the face-triangle pair (10, 0) means the first
triangle on face 10. If neither faceIds nor triIds is given, then
all face-triangles in the mesh will be considered.

The maxParam and testBothDirections flags can be used to control the
radius of the search around the raySource point.

The search proceeds by testing all applicable face-triangles looking
for intersections. If the accelParams parameter is given then the
mesh builds an intersection acceleration structure based on it. This
acceleration structure is used to speed up the intersection
operation, sometimes by a factor of several hundred over the non-
accelerated case. Once created, the acceleration structure is cached
and will be reused the next time this method (or anyIntersection()
or allIntersections()) is called with an identically-configured
MMeshIsectAccelParams object. If a different MMeshIsectAccelParams
object is used, then the acceleration structure will be deleted and
re-created according to the new settings. Once created, the
acceleration structure will persist until either the object is
destroyed (or rebuilt by a construction history operation), or the
freeCachedIntersectionAccelerator() method is called. The
cachedIntersectionAcceleratorInfo() and
globalIntersectionAcceleratorsInfo() methods provide useful
information about the resource usage of individual acceleration
structures, and of all such structures in the system.
If the ray hits the mesh, the details of the intersection points
will be returned as a tuple containing the following:
* hitPoints (MFloatPointArray) - coordinates of the points hit, in
  the space specified by the caller.* hitRayParams (MFloatArray) - parametric distances along the ray to
  the points hit.* hitFaces (MIntArray) - IDs of the faces hit
* hitTriangles (MIntArray) - face-relative IDs of the triangles hit
* hitBary1s (MFloatArray) - first barycentric coordinate of the
  points hit. If the vertices of the hitTriangle are (v1, v2, v3)
  then the barycentric coordinates are such that the hitPoint =
  (*hitBary1)*v1 + (*hitBary2)*v2 + (1-*hitBary1-*hitBary2)*v3.* hitBary2s (MFloatArray) - second barycentric coordinate of the
  points hit.
If no point was hit then the arrays will all be empty.
Signature: allIntersections(raySource, rayDirection, space, maxParam, testBothDirections, faceIds=None, triIds=None, idsSorted=False, accelParams=None, tolerance=kIntersectTolerance, sortHits=False)
Parameters:
NameTypeDescription
raySource MFloatPoint Ray starting point.
rayDirection MFloatVector Direction of the ray.
space MSpace constant Coordinate space in which the raySource, rayDirection and the returned hitPoint are specified.
maxParam float Specifies the maximum radius within which hits will be considered. This radius is specified as a multiple of the length of the rayDirection vector, so any hits beyond raySource+maxParam*rayDirection will not be considered. This value must be positive.
testBothDirections bool Specifies that hits in the negative rayDirection should also be considered. The maxParam value still applies to limit the search radius, which means that if testBothDirections is true, then only hits that lie between raySource-maxParam*rayDirection and raySource+maxParam*rayDirection will be considered.
faceIds sequence of ints If present, restricts the search to the specified faces.
triIds sequence of ints Face-relative triangle IDs. If present, faceIds must also be present and the two form (face, triangle) pairs to which the search is restricted.
idsSorted bool Set this to True if the faceIds or faceIds/triIds arrays are properly sorted into ascending order. For face-triangle pairs, the arrays must be sorted by ascending face ids, then by ascending triangle ids within each face. The routine sortIntersectionFaceTriIds() can be used to perform this task. It is not important to sort ids unless an acceleration structure is being used. When using an acceleration structure in conjunction with a limited set of faces or face-triangles, it is ESSENTIAL to sort the indices, otherwise performance will be severely degraded.
accelParams MMeshIsectAccelParams Optional parameters for accelerating the search.
tolerance float Numerical tolerance for the intersection operation. For numerical reasons, it is wise to allow the intersection routine to consider hits that lie a tiny bit outside mesh triangles. This parameter defines how close a ray has to be to hitting a triangle in order for a hit to register. Obviously, hits within the triangle are always considered, but we also consider hits that are up to a distance of tol*edgeLength away from the triangle, where "edgeLength" is the length of the edge of the triangle that is closest to the ray. This tolerance value is also used to collapse multiple nearly-identical hits that may arise due to numerical imprecision when a ray passes extremely close to a mesh vertex. Any two hits that are less than tol multiplied by the length of rayDirection apart will be considered the same hit, and treated interchangeably.
sortHits bool If True, then hits will be sorted in ascending ray-parametric order, so hits behind the raySource will be first (if testBothDirections is true), moving proceeding closer to the raySource, followed by hits in front of the raySource, proceeding by increasing distance from the raySource. If False, hits will be presented in no particular order in the returned arrays.
Returns: (hitPoints, hitRayParams, hitFaces, hitTriangles, hitBary1s, hitBay2s)
Description:

Finds all intersection of a ray starting at raySource and travelling in rayDirection with the mesh.

If faceIds is specified, then only those faces will be considered for intersection. If both faceIds and triIds are given, then the triIds will be interpreted as face-relative and each pair of entries will be taken as a (face,triangle) pair to be considered for intersection. Thus, the face-triangle pair (10,0) means the first triangle on face 10. If neither faceIds nor triIds is given, then all face-triangles in the mesh will be considered.

The maxParam and testBothDirections flags can be used to control the radius of the search around the raySource point.

The search proceeds by testing all applicable face-triangles looking for intersections. If the accelParams parameter is given then the mesh builds an intersection acceleration structure based on it. This acceleration structure is used to speed up the intersection operation, sometimes by a factor of several hundred over the non-accelerated case. Once created, the acceleration structure is cached, and will be reused the next time this method (or anyIntersection() or allIntersections()) is called with an identically-configured MMeshIsectAccelParams object. If a different MMeshIsectAccelParams object is used, then the acceleration structure will be deleted and re-created according to the new settings. Once created, the acceleration structure will persist until either the object is destroyed (or rebuilt by a construction history operation), or the freeCachedIntersectionAccelerator() method is called. The cachedIntersectionAcceleratorInfo() and globalIntersectionAcceleratorsInfo() methods provide useful information about the resource usage of individual acceleration structures, and of all such structures in the system.

If the ray hits the mesh, the details of the intersection points will be returned as a tuple containing the following:

  • hitPoints (MFloatPointArray) - coordinates of the points hit, in the space specified by the caller.
  • hitRayParams (MFloatArray) - parametric distances along the ray to the points hit.
  • hitFaces (MIntArray) - IDs of the faces hit
  • hitTriangles (MIntArray) - face-relative IDs of the triangles hit
  • hitBary1s (MFloatArray) - first barycentric coordinate of the points hit. If the vertices of the hitTriangle are (v1, v2, v3) then the barycentric coordinates are such that the hitPoint = (*hitBary1)*v1 + (*hitBary2)*v2 + (1-*hitBary1-*hitBary2)*v3.
  • hitBary2s (MFloatArray) - second barycentric coordinate of the points hit.

If no point was hit then the arrays will all be empty.

OpenMaya.MFnMesh.anyIntersection ( )
anyIntersection(raySource, rayDirection, space, maxParam,
    testBothDirections, faceIds=None, triIds=None, idsSorted=False,
    accelParams=None, tolerance=kIntersectTolerance)
  -> (hitPoint, hitRayParam, hitFace, hitTriangle, hitBary1, hitBary2)

Finds any intersection of a ray starting at raySource and travelling
in rayDirection with the mesh.

If faceIds is specified, then only those faces will be considered
for intersection. If both faceIds and triIds are given, then the
triIds will be interpreted as face-relative and each pair of entries
will be taken as a (face, triangle) pair to be considered for
intersection. Thus, the face-triangle pair (10, 0) means the first
triangle on face 10. If neither faceIds nor triIds is given, then
all face-triangles in the mesh will be considered.

The maxParam and testBothDirections flags can be used to control the
radius of the search around the raySource point.

The search proceeds by testing all applicable face-triangles looking
for intersections. If the accelParams parameter is given then the
mesh builds an intersection acceleration structure based on it. This
acceleration structure is used to speed up the intersection
operation, sometimes by a factor of several hundred over the non-
accelerated case. Once created, the acceleration structure is cached
and will be reused the next time this method (or anyIntersection()
or allIntersections()) is called with an identically-configured
MMeshIsectAccelParams object. If a different MMeshIsectAccelParams
object is used, then the acceleration structure will be deleted and
re-created according to the new settings. Once created, the
acceleration structure will persist until either the object is
destroyed (or rebuilt by a construction history operation), or the
freeCachedIntersectionAccelerator() method is called. The
cachedIntersectionAcceleratorInfo() and
globalIntersectionAcceleratorsInfo() methods provide useful
information about the resource usage of individual acceleration
structures, and of all such structures in the system.
If the ray hits the mesh, the details of the intersection point
will be returned as a tuple containing the following:
* hitPoint (MFloatPoint) - coordinates of the point hit, in
  the space specified by the caller.* hitRayParam (float) - parametric distance along the ray to
  the point hit.* hitFace (int) - ID of the face hit
* hitTriangle (int) - face-relative ID of the triangle hit
* hitBary1 (float) - first barycentric coordinate of the
  point hit. If the vertices of the hitTriangle are (v1, v2, v3)
  then the barycentric coordinates are such that the hitPoint =
  (*hitBary1)*v1 + (*hitBary2)*v2 + (1-*hitBary1-*hitBary2)*v3.* hitBary2 (float) - second barycentric coordinate of the point hit.
If no point was hit then the arrays will all be empty.
Signature: anyIntersection(raySource, rayDirection, space, maxParam, testBothDirections, faceIds=None, triIds=None, idsSorted=False, accelParams=None, tolerance=kIntersectTolerance)
Parameters:
NameTypeDescription
raySource MFloatPoint Ray starting point.
rayDirection MFloatVector Direction of the ray.
space MSpace constant Coordinate space in which the raySource, rayDirection and the returned hitPoint are specified.
maxParam float Specifies the maximum radius within which hits will be considered. This radius is specified as a multiple of the length of the rayDirection vector, so any hits beyond raySource+maxParam*rayDirection will not be considered. This value must be positive.
testBothDirections bool Specifies that hits in the negative rayDirection should also be considered. The maxParam value still applies to limit the search radius, which means that if testBothDirections is true, then only hits that lie between raySource-maxParam*rayDirection and raySource+maxParam*rayDirection will be considered.
faceIds sequence of ints If present, restricts the search to the specified faces.
triIds sequence of ints Face-relative triangle IDs. If present, faceIds must also be present and the two form (face, triangle) pairs to which the search is restricted.
idsSorted bool Set this to True if the faceIds or faceIds/triIds arrays are properly sorted into ascending order. For face-triangle pairs, the arrays must be sorted by ascending face ids, then by ascending triangle ids within each face. The routine sortIntersectionFaceTriIds() can be used to perform this task. It is not important to sort ids unless an acceleration structure is being used. When using an acceleration structure in conjunction with a limited set of faces or face-triangles, it is ESSENTIAL to sort the indices, otherwise performance will be severely degraded.
accelParams MMeshIsectAccelParams Optional parameters for accelerating the search.
tolerance float Numerical tolerance for the intersection operation. For numerical reasons, it is wise to allow the intersection routine to consider hits that lie a tiny bit outside mesh triangles. This parameter defines how close a ray has to be to hitting a triangle in order for a hit to register. Obviously, hits within the triangle are always considered, but we also consider hits that are up to a distance of tol*edgeLength away from the triangle, where "edgeLength" is the length of the edge of the triangle that is closest to the ray. This tolerance value is also used to collapse multiple nearly-identical hits that may arise due to numerical imprecision when a ray passes extremely close to a mesh vertex. Any two hits that are less than tol multiplied by the length of rayDirection apart will be considered the same hit, and treated interchangeably.
Returns: (hitPoint, hitRayParam, hitFace, hitTriangle, hitBary1, hitBay2) or None
Description:

Finds any intersection of a ray starting at raySource and travelling in rayDirection with the mesh.

If faceIds is specified, then only those faces will be considered for intersection. If both faceIds and triIds are given, then the triIds will be interpreted as face-relative and each pair of entries will be taken as a (face,triangle) pair to be considered for intersection. Thus, the face-triangle pair (10,0) means the first triangle on face 10. If neither faceIds nor triIds is given, then all face-triangles in the mesh will be considered.

The maxParam and testBothDirections flags can be used to control the radius of the search around the raySource point.

The search proceeds by testing all applicable face-triangles looking for intersections. If the accelParams parameter is given then the mesh builds an intersection acceleration structure based on it. This acceleration structure is used to speed up the intersection operation, sometimes by a factor of several hundred over the non-accelerated case. Once created, the acceleration structure is cached, and will be reused the next time this method (or anyIntersection() or allIntersections()) is called with an identically-configured MMeshIsectAccelParams object. If a different MMeshIsectAccelParams object is used, then the acceleration structure will be deleted and re-created according to the new settings. Once created, the acceleration structure will persist until either the object is destroyed (or rebuilt by a construction history operation), or the freeCachedIntersectionAccelerator() method is called. The cachedIntersectionAcceleratorInfo() and globalIntersectionAcceleratorsInfo() methods provide useful information about the resource usage of individual acceleration structures, and of all such structures in the system.

If the ray hits the mesh, the details of the intersection point will be returned as a tuple containing the following:

  • hitPoint (MFloatPoint) - coordinate of the point hit, in the space specified by the caller.
  • hitRayParam (float) - parametric distance along the ray to the point hit.
  • hitFace (int) - ID of the face hit
  • hitTriangle (int) - face-relative ID of the triangle hit
  • hitBary1 (float) - first barycentric coordinate of the point hit. If the vertices of the hitTriangle are (v1, v2, v3) then the barycentric coordinates are such that hitPoint = (*hitBary1)*v1 + (*hitBary2)*v2 + (1-*hitBary1-*hitBary2)*v3.
  • hitBary2 (float) - second barycentric coordinate of the point hit.

If no point was hit then None will be returned.

OpenMaya.MFnMesh.assignColor ( )
assignColor(faceId, vertexIndex, colorId, colorSet='') -> self

Assigns a color from a colorSet to a specified vertex of a face.
Signature: assignColor(faceId, vertexIndex, colorId, colorSet='')
Parameters:
NameTypeDescription
faceId int ID of face.
vertexIndex int Face-relative/local index of vertex.
colorId int ID of the color.
colorSet string Color set to use. If not specified then the mesh's current color set will be used.
Returns: Reference to self
Description: Assigns a color from a colorSet to a specified vertex of a face.
OpenMaya.MFnMesh.assignColors ( )
assignColors(colorIds, colorSet=') -> self

Assigns colors to all of the mesh's face-vertices. The colorIds
sequence must contain an entry for every vertex of every face, in
face order, meaning that the entries for all the vertices of face 0
come first, followed by the entries for the vertices of face 1, etc.
Signature: assignColors(colorIds, colorSet='')
Parameters:
NameTypeDescription
colorIds sequence of ints IDs of the colors.
colorSet string Color set to use. If not specified then the mesh's current color set will be used.
Returns: Reference to self
Description: Assigns colors to all of the mesh's face-vertices. The colorIds sequence must contain an entry for every vertex of every face, in face order, meaning that the entries for all the vertices of face 0 come first, followed by the entries for the vertices of face 1, etc.
OpenMaya.MFnMesh.assignUV ( )
assignUV(faceId, vertexIndex, uvId, uvSet='') -> self

Assigns a UV coordinate from a uvSet to a specified vertex of a face.
Signature: assignUV(faceId, vertexIndex, uvId, uvSet='')
Parameters:
NameTypeDescription
faceId int ID of face.
vertexIndex int Face-relative/local index of vertex.
uvId int ID of the UV to assign to the vertex.
uvSet string UV set to use. If not specified then the mesh's current UV set will be used.
Returns: Reference to self
Description: Assigns a UV coordinate to a specified vertex of a polygon.
OpenMaya.MFnMesh.assignUVs ( )
assignUVs(uvCounts, uvIds, uvSet='') -> self

Assigns UV coordinates to the mesh's face-vertices.

uvCounts contains the number of UVs to assign for each of the mesh's
faces. That number must equal the number of vertices in the
corresponding face or be 0 to indicate that no UVs will be assigned
to that face.
Signature: assignUVs(uvCounts, uvIds, uvSet='')
Parameters:
NameTypeDescription
uvCounts sequence of ints Number of UVs to assign for each of the mesh's faces. Must equal the number of vertices in that face or be 0 to indicate that no UVs will be assigned to that face.
uvIds sequence of ints IDs of the UVs to assign.
uvSet string UV set to use. If not specified then the mesh's current UV set will be used.
Returns: Reference to self
Description: Assigns UV coordinates to the mesh's face-vertices.
OpenMaya.MFnMesh.autoUniformGridParams ( )
static
autoUniformGridParams() -> MMeshIsectAccelParams

Creates an object which specifies a uniform voxel grid structure
which can be used by the intersection routines to speed up their
operation. The number of voxel cells to use will be determined
automatically based on the density of triangles in the mesh. The
grid acceleration structure will be cached with the mesh, so that
if the same MMeshIsectAccelParams configuration is used on the next
intersect call, the acceleration structure will not need to be rebuilt.
Signature: autoUniformGridParams()
Parameters: None.
Returns: MMeshIsectAccelParams
Description: Creates an object which specifies a uniform voxel grid structure which can be used by the intersection routines to speed up their operation. The number of voxel cells to use will be determined automatically based on the density of triangles in the mesh. The grid acceleration structure will be cached with the mesh, so that if the same MMeshIsectAccelParams configuration is used on the next intersect call, the acceleration structure will not need to be rebuilt.
OpenMaya.MFnMesh.booleanOp ( )
(Deprecated: Please use booleanOps instead) booleanOp(Boolean Operation constant, MFnMesh, MFnMesh) -> self

Replaces this mesh's geometry with the result of a boolean operation
on the two specified meshes.
Signature: booleanOp(op, mesh1, mesh2)
Parameters:
NameTypeDescription
op Boolean Operation constant Operation to perform.
mesh1 MFnMesh Functionset attached to the first mesh in the operation.
mesh2 MFnMesh Functionset attached to the second mesh in the operation.
Returns: Reference to self
Description: Replaces this mesh's geometry with the result of a boolean operation on the two specified meshes.
def OpenMaya.MFnMesh.booleanOps ( )
booleanOps(Boolean Operation constant, MObjectArray, bool) -> self

Replaces this mesh's geometry with the result of a boolean operation
on the specified meshes.
OpenMaya.MFnMesh.cachedIntersectionAcceleratorInfo ( )
cachedIntersectionAcceleratorInfo() -> string

Retrieves a string that describes the intersection acceleration
structure for this object, if any. The string will be of the
following form:

  10x10x10 uniform grid, (build time 0.5s), (memory footprint 2000KB)

It describes the configuration of the cached intersection
accelerator, as well as how long it took to build it, and how much
memory it is currently occupying. If the mesh has no cached
intersection accelerator, the empty string is returned.
Signature: cachedIntersectionAcceleratorInfo()
Parameters: None.
Returns: string
Description:

Retrieves a string that describes the intersection acceleration structure for this object, if any. The string will be of the following form:

10x10x10 uniform grid, (build time 0.5s), (memory footprint 2000KB)

It describes the configuration of the cached intersection accelerator, as well as how long it took to build it, and how much memory it is currently occupying. If the mesh has no cached intersection accelerator, the empty string is returned.

OpenMaya.MFnMesh.cleanupEdgeSmoothing ( )
cleanupEdgeSmoothing() -> self

Updates the mesh after setEdgeSmoothing has been done. This should
be called only once, after all the desired edges have been had their
smoothing set. If you don't call this method, the normals may not be
correct, and the object will look odd in shaded mode.
Signature: cleanupEdgeSmoothing()
Parameters: None.
Returns: Reference to self
Description:

Updates the mesh after setEdgeSmoothing has been done.

This should be called only once, after all the desired edges have been had their smoothing set. If you don't call this method, the normals may not be correct, and the object will look odd in shaded mode

OpenMaya.MFnMesh.clearBlindData ( )
clearBlindData(compType) -> self
clearBlindData(compType, blindDataId, compId=None, attr='') -> self


The first version deletes all blind data from all the mesh's
components of the given type (an MFn Type constant).

The second version deletes values of the specified blind data type
from the mesh's components of a given type. If a component ID is
provided then the data is only deleted from that component,
otherwise it is deleted from all of the mesh's components of the
specified type. If a blind data attribute name is provided then only
data for that attribute is deleted, otherwise data for all of the
blind data type's attributes is deleted.
Signature: clearBlindData(compType)
Parameters:
NameTypeDescription
compType MFn Type constant Mesh component type.
Returns: Reference to self
Description: Deletes all blind data from all the mesh's components of a given type.
Signature: clearBlindData(compType, blindDataId, compId=None, attr='')
Parameters:
NameTypeDescription
compType MFn Type constant Mesh component type.
blindDataId int Blind data type ID.
compId int Mesh component ID.
attr string Attribute name.
Returns: Reference to self
Description: Deletes values of the specified blind data type from the mesh's components of a given type. If a component ID is provided then the data is only deleted from that component, otherwise it is deleted from all of the mesh's components of the specified type. If a blind data attribute name is provided then only data for that attribute is deleted, otherwise data for all of the blind data type's attributes is deleted.
OpenMaya.MFnMesh.clearColors ( )
clearColors(colorSet='') -> self

Clears out all colors from a colorSet, and leaves behind an empty
colorset. This method should be used if it is needed to shrink the
actual size of the color set. In this case, the user should call
clearColors(), setColors() and then assignColors() to rebuild the
mapping info.

When called on mesh data, the colors are removed. When called on a
shape with no history, the colors are removed and the attributes are
set on the shape. When called on a shape with history, the
polyColorDel command is invoked and a polyColorDel node is created.

If no colorSet is specified the mesh's current color set will be used.
Signature: clearColors(colorSet='')
Parameters:
NameTypeDescription
colorSet string Color set to use. If not specified then the mesh's current color set will be used.
Returns: Reference to self
Description:

Clears out all colors from a colorSet, and leaves behind an empty colorset. This method should be used if it is needed to shrink the actual size of the color set. In this case, the user should call clearColors(), setColors() and then assignColors() to rebuild the mapping info.

When called on mesh data, the colors are removed. When called on a shape with no history, the colors are removed and the attributes are set on the shape. When called on a shape with history, the polyColorDel command is invoked and a polyColorDel node is created.

OpenMaya.MFnMesh.clearGlobalIntersectionAcceleratorInfo ( )
static
clearGlobalIntersectionAcceleratorInfo()

Clears the 'total count', 'total build time', and 'peak memory'
fields from the information string returned by
globalIntersectionAcceleratorsInfo(). It will not cause information
about currently existing accelerators to be lost.
Signature: clearGlobalIntersectionAcceleratorInfo()
Parameters: None.
Returns:  
Description: Clears the "total count", "total build time", and "peak memory" fields from the information string returned by globalIntersectionAcceleratorsInfo(). It will not cause information about currently existing accelerators to be lost.
OpenMaya.MFnMesh.clearUVs ( )
clearUVs(uvSet='') -> self

Clears out all uvs from a uvSet, and leaves behind an empty
uvset. This method should be used if it is needed to shrink the
actual size of the uv set. In this case, the user should call
clearUVs(), setUVs() and then assignUVs() to rebuild the
mapping info.

When called on mesh data, the uvs are removed. When called on a
shape with no history, the uvs are removed and the attributes are
set on the shape. When called on a shape with history, the
polyMapDel command is invoked and a polyMapDel node is created.

If no uvSet is specified the mesh's current uv set will be used.
Signature: clearUVs(uvSet='')
Parameters:
NameTypeDescription
uvSet string UV set to use. If not specified then the mesh's current UV set will be used.
Returns: Reference to self
Description:

Clears out all texture coordinates from the mesh, and leaves behind an empty UVset. This method should be used if it is needed to shrink the actual size of the UV table. In this case, the user should call clearUVs(), setUVs() and then assignUVs() to rebuild the mapping info.

When called on mesh data, the UVs are removed. When called on a shape with no history, the UVs are removed and the attributes are set on the shape. When called on a shape with history, the polyMapDel command is invoked and a polyMapDel node is created.

OpenMaya.MFnMesh.closestIntersection ( )
closestIntersection(raySource, rayDirection, space, maxParam,
    testBothDirections, faceIds=None, triIds=None, idsSorted=False,
    accelParams=None, tolerance=kIntersectTolerance)
  -> (hitPoint, hitRayParam, hitFace, hitTriangle, hitBary1, hitBary2)

Finds the closest intersection of a ray starting at raySource and
travelling in rayDirection with the mesh.

If faceIds is specified, then only those faces will be considered
for intersection. If both faceIds and triIds are given, then the
triIds will be interpreted as face-relative and each pair of entries
will be taken as a (face, triangle) pair to be considered for
intersection. Thus, the face-triangle pair (10, 0) means the first
triangle on face 10. If neither faceIds nor triIds is given, then
all face-triangles in the mesh will be considered.

The maxParam and testBothDirections flags can be used to control the
radius of the search around the raySource point.

The search proceeds by testing all applicable face-triangles looking
for intersections. If the accelParams parameter is given then the
mesh builds an intersection acceleration structure based on it. This
acceleration structure is used to speed up the intersection
operation, sometimes by a factor of several hundred over the non-
accelerated case. Once created, the acceleration structure is cached
and will be reused the next time this method (or anyIntersection()
or allIntersections()) is called with an identically-configured
MMeshIsectAccelParams object. If a different MMeshIsectAccelParams
object is used, then the acceleration structure will be deleted and
re-created according to the new settings. Once created, the
acceleration structure will persist until either the object is
destroyed (or rebuilt by a construction history operation), or the
freeCachedIntersectionAccelerator() method is called. The
cachedIntersectionAcceleratorInfo() and
globalIntersectionAcceleratorsInfo() methods provide useful
information about the resource usage of individual acceleration
structures, and of all such structures in the system.
If the ray hits the mesh, the details of the intersection point
will be returned as a tuple containing the following:
* hitPoint (MFloatPoint) - coordinates of the point hit, in
  the space specified by the caller.* hitRayParam (float) - parametric distance along the ray to
  the point hit.* hitFace (int) - ID of the face hit
* hitTriangle (int) - face-relative ID of the triangle hit
* hitBary1 (float) - first barycentric coordinate of the
  point hit. If the vertices of the hitTriangle are (v1, v2, v3)
  then the barycentric coordinates are such that the hitPoint =
  (*hitBary1)*v1 + (*hitBary2)*v2 + (1-*hitBary1-*hitBary2)*v3.* hitBary2 (float) - second barycentric coordinate of the point hit.
If no point was hit then the arrays will all be empty.
Signature: closestIntersection(raySource, rayDirection, space, maxParam, testBothDirections, faceIds=None, triIds=None, idsSorted=False, accelParams=None, tolerance=kIntersectTolerance)
Parameters:
NameTypeDescription
raySource MFloatPoint Ray starting point.
rayDirection MFloatVector Direction of the ray.
space MSpace constant Coordinate space in which the raySource, rayDirection and the returned hitPoint are specified.
maxParam float Specifies the maximum radius within which hits will be considered. This radius is specified as a multiple of the length of the rayDirection vector, so any hits beyond raySource+maxParam*rayDirection will not be considered. This value must be positive.
testBothDirections bool Specifies that hits in the negative rayDirection should also be considered. The maxParam value still applies to limit the search radius, which means that if testBothDirections is true, then only hits that lie between raySource-maxParam*rayDirection and raySource+maxParam*rayDirection will be considered.
faceIds sequence of ints If present, restricts the search to the specified faces.
triIds sequence of ints Face-relative triangle IDs. If present, faceIds must also be present and the two form (face, triangle) pairs to which the search is restricted.
idsSorted bool Set this to True if the faceIds or faceIds/triIds arrays are properly sorted into ascending order. For face-triangle pairs, the arrays must be sorted by ascending face ids, then by ascending triangle ids within each face. The routine sortIntersectionFaceTriIds() can be used to perform this task. It is not important to sort ids unless an acceleration structure is being used. When using an acceleration structure in conjunction with a limited set of faces or face-triangles, it is ESSENTIAL to sort the indices, otherwise performance will be severely degraded.
accelParams MMeshIsectAccelParams Optional parameters for accelerating the search.
tolerance float Numerical tolerance for the intersection operation. For numerical reasons, it is wise to allow the intersection routine to consider hits that lie a tiny bit outside mesh triangles. This parameter defines how close a ray has to be to hitting a triangle in order for a hit to register. Obviously, hits within the triangle are always considered, but we also consider hits that are up to a distance of tol*edgeLength away from the triangle, where "edgeLength" is the length of the edge of the triangle that is closest to the ray. This tolerance value is also used to collapse multiple nearly-identical hits that may arise due to numerical imprecision when a ray passes extremely close to a mesh vertex. Any two hits that are less than tol multiplied by the length of rayDirection apart will be considered the same hit, and treated interchangeably.
Returns: (hitPoint, hitRayParam, hitFace, hitTriangle, hitBary1, hitBay2) or None
Description:

Finds the closest intersection of a ray starting at raySource and travelling in rayDirection with the mesh.

If faceIds is specified, then only those faces will be considered for intersection. If both faceIds and triIds are given, then the triIds will be interpreted as face-relative and each pair of entries will be taken as a (face,triangle) pair to be considered for intersection. Thus, the face-triangle pair (10,0) means the first triangle on face 10. If neither faceIds nor triIds is given, then all face-triangles in the mesh will be considered.

The maxParam and testBothDirections flags can be used to control the radius of the search around the raySource point.

The search proceeds by testing all applicable face-triangles looking for intersections. If the accelParams parameter is given then the mesh builds an intersection acceleration structure based on it. This acceleration structure is used to speed up the intersection operation, sometimes by a factor of several hundred over the non-accelerated case. Once created, the acceleration structure is cached, and will be reused the next time this method (or anyIntersection() or allIntersections()) is called with an identically-configured MMeshIsectAccelParams object. If a different MMeshIsectAccelParams object is used, then the acceleration structure will be deleted and re-created according to the new settings. Once created, the acceleration structure will persist until either the object is destroyed (or rebuilt by a construction history operation), or the freeCachedIntersectionAccelerator() method is called. The cachedIntersectionAcceleratorInfo() and globalIntersectionAcceleratorsInfo() methods provide useful information about the resource usage of individual acceleration structures, and of all such structures in the system.

If the ray hits the mesh, the details of the closest intersection point to the raySource will be returned as a tuple containing the following:

  • hitPoint (MFloatPoint) - coordinate of the point hit, in the space specified by the caller.
  • hitRayParam (float) - parametric distance along the ray to the point hit.
  • hitFace (int) - ID of the face hit
  • hitTriangle (int) - face-relative ID of the triangle hit
  • hitBary1 (float) - first barycentric coordinate of the point hit. If the vertices of the hitTriangle are (v1, v2, v3) then the barycentric coordinates are such that hitPoint = (*hitBary1)*v1 + (*hitBary2)*v2 + (1-*hitBary1-*hitBary2)*v3.
  • hitBary2 (float) - second barycentric coordinate of the point hit.

If no point was hit then None will be returned.

OpenMaya.MFnMesh.collapseEdges ( )
collapseEdges(seq of int) -> self

Collapses edges into vertices. The two vertices that create each
given edge are replaced in turn by one vertex placed at the average
of the two initial vertex.
Signature: collapseEdges(edges)
Parameters:
NameTypeDescription
edges sequence of ints IDs of edges to be collapsed.
Returns: Reference to self
Description: Collapses edges into vertices. The two vertices that create each given edge are replaced in turn by one vertex placed at the average of the two initial vertex.
OpenMaya.MFnMesh.collapseFaces ( )
collapseFaces(seq of int) -> self

Collapses faces into vertices. Adjacent faces will be collapsed
together into a single vertex. Non-adjacent faces will be collapsed
into their own, separate vertices.
Signature: collapseFaces(faces)
Parameters:
NameTypeDescription
faces sequence of ints IDs of faces to be collapsed.
Returns: Reference to self
Description: Collapses faces into vertices. Adjacent faces will be collapsed together into a single vertex. Non-adjacent faces will be collapsed into their own, separate vertices.
OpenMaya.MFnMesh.copy ( )
copy(MObject, parent=kNullObj) -> MObject

Creates a new mesh with the same geometry as the source. Raises
TypeError if the source is not a mesh node or mesh data object or it
contains an empty mesh.

If the parent is a kMeshData wrapper (e.g. from MFnMeshData.create())
then a mesh data object will be created and returned and the wrapper
will be set to reference it.

If the parent is a transform type node then a mesh node will be
created and parented beneath it and the return value will be the
mesh node.

If the parent is any other type of node a TypeError will be raised.

If no parent is provided then a transform node will be created and
returned and a mesh node will be created and parented under the
transform.
Signature: copy(source, parent=kNullObj)
Parameters:
NameTypeDescription
source MObject Mesh node or mesh data object to be copied.
parent MObject Parent of the new mesh.
Returns: MObject
Description:

Creates a new mesh with the same geometry as the source. Raises TypeError if the source is not a mesh node or mesh data object or it contains an empty mesh.

If the parent is a kMeshData wrapper (e.g. from MFnMeshData.create() ) then a mesh data object will be created and returned and the wrapper will be set to reference it.

If the parent is a transform type node then a mesh node will be created and parented beneath it and the return value will be the mesh node.

If the parent is any other type of node a TypeError will be raised.

If no parent is provided then a transform node will be created and returned and a mesh node will be created and parented under the transform.

OpenMaya.MFnMesh.copyInPlace ( )
copyInPlace(MObject) -> self

Replaces the current mesh's geometry with that from the source.
Raises TypeError if the source is not a mesh node or mesh data
object or it contains an empty mesh.
Signature: copyInPlace(source)
Parameters:
NameTypeDescription
source MObject Mesh node or mesh data object to be copied.
Returns: Reference to self.
Description: Replaces the current mesh's geometry with that from the source. Raises TypeError if the source is not a mesh node or mesh data object or it contains an empty mesh.
OpenMaya.MFnMesh.copyUVSet ( )
copyUVSet(fromName, toName, modifier=None) -> string

Copies the contents of one UV set into another.

If the source UV set does not exist, or if it has the same name as
the destination, then no copy will be made.

If the destination UV set exists then its contents will be replace
by a copy of the source UV set.

If the destination UV set does not exist then a new UV set will be
created and the source UV set will be copied into it. The name of
the UV set will be that provided with a number appended to the end
to ensure uniqueness.
The final name of the destination UV set will be returned.

This method is only valid for functionsets which are attached to
mesh nodes, not mesh data.
Signature: copyUVSet(fromName, toName, modifier=None)
Parameters:
NameTypeDescription
fromName string Name of source UV set.
toName string Name of destination UV set.
modifier MDGModifier If provided then the copy operation will be added to the modifier and won't take effect until the modifier's doIt() is called. Otherwise it will take effect immediately.
Returns: string
Description:

Copies the contents of one UV set into another.

If the source UV set does not exist, or if it has the same name as the destination, then no copy will be made.

If the destination UV set exists then its contents will be replace by a copy of the source UV set.

If the destination UV set does not exist then a new UV set will be created and the source UV set will be copied into it. The name of the UV set will be that provided with a number appended to the end to ensure uniqueness.

The final name of the destination UV set will be returned.

This method is only valid for functionsets which are attached to mesh nodes, not mesh data.

OpenMaya.MFnMesh.create ( )
create(vertices, polygonCounts, polygonConnects, uValues=None, vValues=None, parent=kNullObj) -> MObjectcreate(vertices, edges, edgeConnectsCount, edgeFaceConnects, edgeFaceDesc, storeDoubles=False, parent=kNullObj) -> MObjectcreate(vertices, edges, polygonCounts, polygonConnects, uValues=None, vValues=None, parent=kNullObj) -> MObject

Creates a new polygonal mesh and sets this function set to operate
on it. This method is meant to be as efficient as possible and thus
assumes that all the given data is topologically correct.
If edges are supplied, edges must be an integer array containingconsecutive sets of 3 integers (startVertex, endVertex, smooth) peredge. polygonConnects then references edges by index into the edgearray, where the ID == edge array index / 3.
If UV values are supplied both parameters must be given and they
must contain the same number of values, otherwise IndexError will be
raised. Note that the UVs are simply stored in the mesh, not
assigned to any vertices. To assign them use assignUVs().
If the parent is a kMeshData wrapper (e.g. from MFnMeshData.create())
then a mesh data object will be created and returned and the wrapper
will be set to reference it.
If the parent is a transform type node then a mesh node will be
created and parented beneath it and the return value will be the
mesh node.
If the parent is any other type of node a TypeError will be raised.

If no parent is provided then a transform node will be created and
returned and a mesh node will be created and parented under the
transform.
Signature: create(vertices, polygonCounts, polygonConnects, uValues=None, vValues=None, parent=kNullObj)
Parameters:
NameTypeDescription
vertices sequence of MPoints or MFloatPoints. Positions of the mesh's unique vertices. Shared vertices should only appear once. For example, a cube has 6 faces of 4 vertices each, but each vertex is shared by three faces, so there would only be 8 unique vertices in the mesh.
polygonCounts sequence of ints One element per polygon in the mesh, giving the number of vertices in the polygon. So if the mesh consists of a triangle and a rectangle then the counts would be [3, 4].
polygonConnects sequence of ints Indices into the sequence of vertices, mapping them onto the individual polygons. This sequence is partitioned according to the polygonCounts. So if the counts were [3, 4] then the first 3 elements of polygonConnects would be the indices for the first polygon's vertices and the next 4 elements would be the indices for the second polygon's vertices.
uValues sequence of floats U values for the mesh's unique UVs. If this parameter is provided then vValues must be provided as well and must contain the same number of elements.
vValues sequence of floats V values for the mesh's unique UVs. If this parameter is provided then uValues must be provided as well and must contain the same number of elements.
parent MObject Parent of the new mesh.
Returns: MObject
Description:

Creates a new polygonal mesh and sets this function set to operate on it. This method is meant to be as efficient as possible and thus assumes that all the given data is topologically correct.

If UV values are supplied both parameters must be given and they must contain the same number of values, otherwise IndexError will be raised. Note that the UVs are simply stored in the mesh, not assigned to any vertices. To assign them use assignUVs().

If the parent is a kMeshData wrapper (e.g. from MFnMeshData.create() ) then a mesh data object will be created and returned and the wrapper will be set to reference it.

If the parent is a transform type node then a mesh node will be created and parented beneath it and the return value will be the mesh node.

If the parent is any other type of node a TypeError will be raised.

If no parent is provided then a transform node will be created and returned and a mesh node will be created and parented under the transform.

OpenMaya.MFnMesh.createBlindDataType ( )
createBlindDataType(blindDataId, ((longName, shortName, typeName), ...)) -> self

Create a new blind data type with the specified attributes.

Each element of the attrs sequence is a tuple containing the long
name, short name and type name of the attribute. Valid type names
are 'int', 'float', 'double', 'boolean', 'string' or 'binary'.

Raises RuntimeError if the blind data id is already in use or an
invalid format was specified.
Signature: createBlindDataType(blindDataId, attrs)
Parameters:
NameTypeDescription
blindDataId int Blind data type ID.
attrs sequence of tuples containing (longName, shortName, typeName) Attribute definitions.
Returns: Reference to self.
Description:

Create a new blind data type with the specified attributes.

Each element of the attrs sequence is a tuple containing the long name, short name and type name of the attribute. Valid type names are "int", "float", "double", "boolean", "string" or "binary".

Raises RuntimeError if the blind data id is already in use or an invalid format was specified.

OpenMaya.MFnMesh.createColorSet ( )
createColorSet(name, clamped, rep=kRGBA, modifier=None, instances=None) -> string

Creates a new, empty color set for this mesh.

If no name is provided 'colorSet#' will be used, where # is a number
that makes the name unique for this mesh. If a name is provided but
it conflicts with that of an existing color set then a number will
be appended to the proposed name to make it unique.
The return value is the final name used for the new color set.

This method will only work when the functionset is attached to a
mesh node, not mesh data.
Signature: createColorSet(name, clamped, rep=kRGBA, modifier=None, instances=None)
Parameters:
NameTypeDescription
name string Proposed name for set.
clamped bool If True then each color channel is limited to the range 0.0 to 1.0, otherwise there is no limit.
rep Color Representation constant Specifies the color channels supported by the color set.
modifier MDGModifier If provided then the create operation will be added to the modifier and won't take effect until the modifier's doIt() is called. Otherwise it will take effect immediately.
instances sequence of ints Instance numbers for the instances of the mesh to which the color set will apply. If this parameter is not provided then the color set will apply to all instances of the mesh.
Returns: string
Description:

Creates a new, empty color set for this mesh.

If no name is provided "colorSet#" will be used, where # is a number that makes the name unique for this mesh. If a name is provided but it conflicts with that of an existing color set then a number will be appended to the proposed name to make it unique.

The return value is the final name used for the new color set.

This method will only work when the functionset is attached to a mesh node, not mesh data.

OpenMaya.MFnMesh.createInPlace ( )
createInPlace(vertices, polygonCounts, polygonConnects) -> selfcreateInPlace(vertices, edges, polygonCounts, polygonConnects) -> self

Replaces the existing polygonal mesh with a new one. This method is
meant to be as efficient as possible and thus assumes that all the
given data is topologically correct.

If edges are supplied, edges must be an integer array containingconsecutive sets of 3 integers (startVertex, endVertex, smooth) peredge. polygonConnects then references edges by index into the edgearray, where the ID == edge array index / 3.
The vertices may be given as a sequence of MFloatPoint's or a
sequence of MPoint's, but not a mix of the two.
Signature: createInPlace(vertices, polygonCounts, polygonConnects)
Parameters:
NameTypeDescription
vertices sequence of MPoints or MFloatPoints. Positions of the mesh's unique vertices. Shared vertices should only appear once. For example, a cube has 6 faces of 4 vertices each, but each vertex is shared by three faces, so there would only be 8 unique vertices in the mesh.
polygonCounts sequence of ints One element per polygon in the mesh, giving the number of vertices in the polygon. So if the mesh consists of a triangle and a rectangle then the counts would be [3, 4].
polygonConnects sequence of ints Indices into the sequence of vertices, mapping them onto the individual polygons. This sequence is partitioned according to the polygonCounts. So if the counts were [3, 4] then the first 3 elements of polygonConnects would be the indices for the first polygon's vertices and the next 4 elements would be the indices for the second polygon's vertices.
Returns: Reference to self
Description: Replaces the existing polygonal mesh with a new one. This method is meant to be as efficient as possible and thus assumes that all the given data is topologically correct.
OpenMaya.MFnMesh.createUVSet ( )
createUVSet(name, modifier=None, instances=None) -> string

Creates a new, empty UV set for this mesh.

If a UV set with proposed name already exists then a number will be
appended to the proposed name to name it unique.

If the proposed name is empty then a name of the form uvSet# will be
used where '#' is a number chosen to ensure that the name is unique.

The name used for the UV set will be returned.

This method is only valid for functionsets which are attached to
mesh nodes, not mesh data.
Signature: createUVSet(name, modifier=None, instances=None)
Parameters:
NameTypeDescription
name
string Proposed name of the uv set.
modifier MDGModifier If provided then the create operation will be added to the modifier and won't take effect until the modifier's doIt() is called. Otherwise it will take effect immediately.
instances sequence of ints Instance numbers for the instances of the mesh to which the UV set will apply. If this parameter is not provided then the UV set will apply to all instances of the mesh.
Returns: string
Description:

Creates a new, empty UV set for this mesh.

If a UV set with proposed name already exists then a number will be appended to the proposed name to name it unique.

If the proposed name is empty then a name of the form uvSet# will be used where '#' is a number chosen to ensure that the name is unique.

The name used for the UV set will be returned.

This method is only valid for functionsets which are attached to mesh nodes, not mesh data.

OpenMaya.MFnMesh.currentColorSetName ( )
currentColorSetName(instance=kInstanceUnspecified) -> string

Get the name of the 'current' color set. The current color set is
the one used for color operations when no color set is explicitly
specified.
On instanced meshes, color sets may be applied on a per-instance
basis or may be shared across all instances. When the color sets are
per-instance, the concept of the current color set has two levels of
granularity. Namely, the current color set applies to one or more
instances, plus there are other color sets in the same color set
family that apply to different instances. The instance arguement is
used to indicate that if this is a per-instance color set, you are
interested in the name of the color set that applies to the
specified instance. When the index is not specified, the current
color set will be returned regardless of which instance it is for.
If there is no current color set, then an empty string will be
returned.
Signature: currentColorSetName(instance=kInstanceUnspecified)
Parameters:
NameTypeDescription
instance int Instance of the mesh to change.
Returns: string
Description:

Get the name of the "current" color set. The current color set is the one used for color operations when no color set is explicitly specified.

On instanced meshes, color sets may be applied on a per-instance basis or may be shared across all instances. When the color sets are per-instance, the concept of the current color set has two levels of granularity. Namely, the current color set applies to one or more instances, plus there are other color sets in the same color set family that apply to different instances. The instance arguement is used to indicate that if this is a per-instance color set, you are interested in the name of the color set that applies to the specified instance. When the index is not specified, the current color set will be returned regardless of which instance it is for.

If there is no current color set, then an empty string will be returned.

OpenMaya.MFnMesh.currentUVSetName ( )
currentUVSetName(instance=kInstanceUnspecified) -> string

Get the name of the 'current' uv set. The current uv set is
the one used for uv operations when no uv set is explicitly
specified.
On instanced meshes, uv sets may be applied on a per-instance
basis or may be shared across all instances. When the uv sets are
per-instance, the concept of the current uv set has two levels of
granularity. Namely, the current uv set applies to one or more
instances, plus there are other uv sets in the same uv set
family that apply to different instances. The instance arguement is
used to indicate that if this is a per-instance uv set, you are
interested in the name of the uv set that applies to the
specified instance. When the index is not specified, the current
uv set will be returned regardless of which instance it is for.
If there is no current uv set, then an empty string will be
returned.
Signature: currentUVSetName(instance=kInstanceUnspecified)
Parameters:
NameTypeDescription
instance int Instance of the mesh to change.
Returns: string
Description:

Get the name of the "current" uv set. The current uv set is the one used for uv operations when no uv set is explicitly specified.

On instanced meshes, uv sets may be applied on a per-instance basis or may be shared across all instances. When the uv sets are per-instance, the concept of the current uv set has two levels of granularity. Namely, the current uv set applies to one or more instances, plus there are other uv sets in the same uv set family that apply to different instances. The instance arguement is used to indicate that if this is a per-instance uv set, you are interested in the name of the uv set that applies to the specified instance. When the index is not specified, the current uv set will be returned regardless of which instance it is for.

If there is no current uv set, then an empty string will be returned.

OpenMaya.MFnMesh.deleteColorSet ( )
deleteColorSet(colorSet, modifier=None, currentSelection=None) -> self

Deletes a color set from the mesh.

This method is only valid for functionsets which are attached to
mesh nodes, not mesh data.
Signature: deleteColorSet(colorSet, modifier=None, currentSelection=None)
Parameters:
NameTypeDescription
colorSet string Name of the color set to delete.
modifier MDGModifier If provided then the deletion will be added to the modifier and won't take effect until the modifier's doIt() is called. Otherwise it will take effect immediately.
currentSelection MSelectionList This method may change the selection list. To aid in supporting undo, if this parameter is supplied it will be set to the active selection prior to the change.
Returns: Reference to self
Description:

Deletes a color set from the mesh.

This method is only valid for functionsets which are attached to mesh nodes, not mesh data.

OpenMaya.MFnMesh.deleteEdge ( )
deleteEdge(edgeId, modifier=None) -> self

Deletes the specified edge.
Signature: deleteEdge(edgeId, modifier=None)
Parameters:
NameTypeDescription
edgeId int Edge to delete.
modifier MDGModifier If specified, the deletion will be added to the modifier and won't take effect until the modifier's doIt() is called. Otherwise it will take effect immediately.
Returns: Reference to self
Description: Deletes the specified edge.
OpenMaya.MFnMesh.deleteFace ( )
deleteFace(faceId, modifier=None) -> self

Deletes the specified face.
Signature: deleteFace(faceId, modifier=None)
Parameters:
NameTypeDescription
faceId int Face to delete.
modifier MDGModifier If specified, the deletion will be added to the modifier and won't take effect until the modifier's doIt() is called. Otherwise it will take effect immediately.
Returns: Reference to self
Description: Deletes the specified face.
OpenMaya.MFnMesh.deleteUVSet ( )
deleteUVSet(uvSet, modifier=None, currentSelection=None) -> self

Deletes a uv set from the mesh.

This method is only valid for functionsets which are attached to
mesh nodes, not mesh data.
Signature: deleteUVSet(uvSet, modifier=None, currentSelection=None)
Parameters:
NameTypeDescription
uvSet string Name of the uv set to delete.
modifier MDGModifier If provided then the deletion will be added to the modifier and won't take effect until the modifier's doIt() is called. Otherwise it will take effect immediately.
currentSelection MSelectionList This method may change the selection list. To aid in supporting undo, if this parameter is supplied it will be set to the active selection prior to the change.
Returns: Reference to self
Description:

Deletes a named uv set from the mesh.

This method is only valid for functionsets which are attached to mesh nodes, not mesh data.

OpenMaya.MFnMesh.deleteVertex ( )
deleteVertex(vertexId, modifier=None) -> self

Deletes the specified vertex.
Signature: deleteVertex(vertexId, modifier=None)
Parameters:
NameTypeDescription
vertexId int Vertex to delete.
modifier MDGModifier If specified, the deletion will be added to the modifier and won't take effect until the modifier's doIt() is called. Otherwise it will take effect immediately.
Returns: Reference to self
Description: Deletes the specified vertex.
OpenMaya.MFnMesh.duplicateFaces ( )
duplicateFaces(faces, translation=None) -> self

Duplicates a set of faces and detaches them from the rest of the
mesh. The resulting mesh will contain one more independant piece of
geometry.
Signature: duplicateFaces(faces, translation=None)
Parameters:
NameTypeDescription
faces sequence of ints IDs of faces to be duplicated.
translation MFloatVector World-space translation vector to apply to the duplicated elements.
Returns: Reference to self
Description: Duplicates a set of faces and detaches them from the rest of the mesh. The resulting mesh will contain one more independant piece of geometry.
def OpenMaya.MFnMesh.edgeBorderInfo ( )
edgeBorderInfo(edgeId, setId=0) -> MFnMesh::BorderInfo

Returns if the specified edge is on geom/UV shell border or has shared/unshared UVs.
OpenMaya.MFnMesh.extractFaces ( )
extractFaces(faces, translation=None) -> self

Detaches a set of faces from the rest of the mesh. The resulting
mesh will contain one more independant piece of geometry.
Signature: extractFaces(faces, translation=None)
Parameters:
NameTypeDescription
faces sequence of ints IDs of faces to be extracted.
translation MFloatVector World-space translation vector to apply to the extracted elements.
Returns: Reference to self
Description: Detaches a set of faces from the rest of the mesh. The resulting mesh will contain one more independant piece of geometry.
OpenMaya.MFnMesh.extrudeEdges ( )
extrudeEdges(edges, extrusionCount=1, translation=None, extrudeTogether=True, thickness=0.0, offset=0.0) -> self

Extrude the given edges along a vector. The resulting mesh will have
extra parallelograms coming out of the given edges and going to the
new extruded edges. The length of the new polygon is determined by
the length of the vector. The extrusionCount parameter is the number
of subsequent extrusions per edges and represents the number of
polygons that will be created from each given edge to the extruded
edges.
The difference between using thickness or offset instead of providing
a vector with the translation variable is that the translation will
be applied to each vertex in the extrusion along its local direction.  This
can result in vertices being moved the same distance, but the angles between
the original components are not maintained so the overall shape is not the
same.
Both the thickness and offset variables will attempt to move the components
a distance that will maintain angles between edges at the border of the
extrusion.
Signature: extrudeEdges(edges, extrusionCount=1, translation=None, extrudeTogether=True)
Parameters:
NameTypeDescription
edges sequence of ints IDs of edges to be extruded.
extrusionCount int Number of subsequent extrusions to do.
translation MFloatVector World-space translation vector which determines the direction of the extrusion and the length of the created polygon(s).
extrudeTogether bool Sets whether the components should be extruded individually or together, as if one complex component was being extruded.
Returns: Reference to self
Description: Extrude the given edges along a vector. The resulting mesh will have extra parallelograms coming out of the given edges and going to the new extruded edges. The length of the new polygon is determined by the length of the vector. The extrusionCount parameter is the number of subsequent extrusions per edges and represents the number of polygons that will be created from each given edge to the extruded edges.
OpenMaya.MFnMesh.extrudeFaces ( )
extrudeFaces(faces, extrusionCount=1, translation=None, extrudeTogether=True, thickness=0.0, offset=0.0) -> self

Extrude the given faces along a vector. The resulting mesh will have
extra parallelograms coming out of the given faces and going to the
new extruded faces. The length of the new polygon is determined by
the length of the vector. The extrusionCount parameter is the number
of subsequent extrusions per faces and represents the number of
polygons that will be created from each given face to the extruded
faces.
The difference between using thickness or offset instead of providing
a vector with the translation variable is that the translation will
be applied to each vertex in the extrusion along its local direction.  This
can result in vertices being moved the same distance, but the angles between
the original components are not maintained so the overall shape is not the
same.
Both the thickness and offset variables will attempt to move the components
a distance that will maintain angles between edges at the border of the
extrusion.
Signature: extrudeFaces(faces, extrusionCount=1, translation=None, extrudeTogether=True)
Parameters:
NameTypeDescription
faces sequence of ints IDs of faces to be extruded.
extrusionCount int Number of subsequent extrusions to do.
translation MFloatVector World-space translation vector which determines the direction of the extrusion and the length of the created polygon(s).
extrudeTogether bool Sets whether the components should be extruded individually or together, as if one complex component was being extruded.
Returns: Reference to self
Description: Extrude the given faces along a vector. The resulting mesh will have extra parallelograms coming out of the given faces and going to the new extruded faces. The length of the new polygon is determined by the length of the vector. The extrusionCount parameter is the number of subsequent extrusions per faces and represents the number of polygons that will be created from each given face to the extruded faces.
OpenMaya.MFnMesh.freeCachedIntersectionAccelerator ( )
freeCachedIntersectionAccelerator() -> self

If the mesh has a cached intersection accelerator structure, then
this routine forces it to be deleted. Ordinarily, these structures
are cached so that series of calls to the closestIntersection(),
allIntersections(), and anyIntersection() methods can reuse the same
structure. Once the client is finished with these intersection
operations, however, they are responsible for freeing the acceleration
structure, which is what this method does.
Signature: freeCachedIntersectionAccelerator()
Parameters: None.
Returns: Reference to self
Description: If the mesh has a cached intersection accelerator structure, then this routine forces it to be deleted. Ordinarily, these structures are cached so that series of calls to the closestIntersection(), allIntersections(), and anyIntersection() methods can reuse the same structure. Once the client is finished with these intersection operations, however, they are responsible for freeing the acceleration structure, which is what this method does.
OpenMaya.MFnMesh.generateSmoothMesh ( )
generateSmoothMesh(parent=kNullObj, options=None) -> MObject

Creates a new polygonal mesh which is a smoothed version of the one
to which the functionset is attached. If an options object is supplied
it will be used to direct the smoothing operation, otherwise the
mesh's Smooth Mesh Preview attributes will be used.

If the parent is a kMeshData wrapper (e.g. from MFnMeshData.create())
then a mesh data object will be created and returned.
If the parent is a transform type node then a mesh node will be
created and parented beneath it and the return value will be the
mesh node.
If the parent is any other type of node a TypeError will be raised.

If no parent is provided then a transform node will be created and
returned and a mesh node will be created and parented under the
transform.

Note that, unlike the create functions, this function does not set
the functionset to operate on the new mesh, but leaves it attached
to the original mesh.
Signature: generateSmoothMesh(parent=kNullObj, options=None)
Parameters:
NameTypeDescription
parent MObject Parent of the new mesh.
options MMeshSmoothOptions Options to use when generating the smoothed mesh.
Returns: MObject
Description:

Creates a new polygonal mesh which is a smoothed version of the one to which the functionset is attached. If an options object is supplied it will be used to direct the smoothing operation, otherwise the mesh's Smooth Mesh Preview attributes will be used.

If the parent is a kMeshData wrapper (e.g. from MFnMeshData.create() ) then a mesh data object will be created and returned.

If the parent is a transform type node then a mesh node will be created and parented beneath it and the return value will be the mesh node.

If the parent is any other type of node a TypeError will be raised.

If no parent is provided then a transform node will be created and returned and a mesh node will be created and parented under the transform.

Note that, unlike the create functions, this function does not set the functionset to operate on the new mesh, but leaves it attached to the original mesh.

OpenMaya.MFnMesh.getAssignedUVs ( )
getAssignedUVs(uvSet='') -> (counts, uvIds)

Returns a tuple containing all of the UV assignments for the specified
UV set. The first element of the tuple is an array of counts giving
the number of UVs assigned to each face of the mesh. The count will
either be zero, indicating that that face's vertices do not have UVs
assigned, or else it will equal the number of the face's vertices.
The second element of the tuple is an array of UV IDs for all of the
face-vertices which have UVs assigned.
Signature: getAssignedUVs(uvSet='')
Parameters:
NameTypeDescription
uvSet string UV set to use. If not specified then the mesh's current UV set will be used.
Returns: (MIntArray, MIntArray)
Description: Returns a tuple containing all of the UV assignments for the specified UV set. The first element of the tuple is an array of counts giving the number of UVs assigned to each face of the mesh. The count will either be zero, indicating that that face's vertices do not have UVs assigned, or else it will equal the number of the face's vertices. The second element of the tuple is an array of UV IDs for all of the face-vertices which have UVs assigned.
OpenMaya.MFnMesh.getAssociatedColorSetInstances ( )
getAssociatedColorSetInstances(colorSet) -> MIntArray

Returns the instance numbers associated with the specified Color set.
If the color map is shared across all instances, an empty array will
be returned.

This method will only work if the functionset is attached to a mesh
node. It will raise RuntimeError if the functionset is attached to
mesh data.
Signature: getAssociatedColorSetInstances(colorSet)
Parameters:
NameTypeDescription
colorSet string Color set name.
Returns: MIntArray
Description:

Returns the instance numbers associated with the specified Color set. If the color map is shared across all instances, an empty array will be returned.

This method will only work if the functionset is attached to a mesh node. It will raise RuntimeError if the functionset is attached to mesh data.

OpenMaya.MFnMesh.getAssociatedUVSetInstances ( )
getAssociatedUVSetInstances(uvSet) -> MIntArray

Returns the instance numbers associated with the specified UV set.
If the uv map is shared across all instances, an empty array will be
returned.

This method will only work if the functionset is attached to a mesh
node. It will raise RuntimeError if the functionset is attached to
mesh data.
Signature: getAssociatedUVSetInstances(uvSet)
Parameters:
NameTypeDescription
uvSet string UV set name.
Returns: MIntArray
Description:

Returns the instance numbers associated with the specified UV set. If the uv map is shared across all instances, an empty array will be returned.

This method will only work if the functionset is attached to a mesh node. It will raise RuntimeError if the functionset is attached to mesh data.

OpenMaya.MFnMesh.getAssociatedUVSetTextures ( )
getAssociatedUVSetTextures(uvSet) -> MObjectArray

Returns the texture nodes which are using the specified UV set. If
the texture has a 2d texture placement, the texture, and not the
placement will be returned.

This method will only work if the functionset is attached to a mesh
node. It will raise RuntimeError if the functionset is attached to
mesh data.
Signature: getAssociatedUVSetTextures(uvSet)
Parameters:
NameTypeDescription
uvSet string UV set name.
Returns: MObjectArray
Description:

Returns the texture nodes which are using the specified UV set. If the texture has a 2d texture placement, the texture, and not the placement will be returned.

This method will only work if the functionset is attached to a mesh node. It will raise RuntimeError if the functionset is attached to mesh data.

OpenMaya.MFnMesh.getBinaryBlindData ( )
getBinaryBlindData(compId, compType, blindDataId, attr) -> string
getBinaryBlindData(compType, blindDataId, attr)
  -> (MIntArray, [string, string, ...])

The first version returns the value of the specified blind data
attribute from the specified mesh component.

The second version returns a tuple containing an array of component
IDs and an array of values for the specified blind data attribute
for all of the mesh's components of the specified type.

Both versions raise RuntimeError if the attribute is not of 'binary'
type.
Signature: getBinaryBlindData(compId, compType, blindDataId, attr)
Parameters:
NameTypeDescription
compId int ID of mesh component.
compType MFn Type constant Mesh component type.
blindDataId int Blind data type ID.
attr string Attribute name.
Returns: string
Description: Returns the value of the specified blind data attribute from the specified mesh component. Raises RuntimeError if the attribute is not of "binary" type.
Signature: getBinaryBlindData(compType, blindDataId, attr)
Parameters:
NameTypeDescription
compType MFn Type constant Mesh component type.
blindDataId int Blind data type ID.
attr string Attribute name.
Returns: (MIntArray, [string, string, ...])
Description: Returns a tuple containing an array of component IDs and an array of values for the specified blind data attribute for all of the mesh's components of the specified type. Raises RuntimeError if the attribute is not of "binary" type.
OpenMaya.MFnMesh.getBinormals ( )
getBinormals(space=MSpace.kObject, uvSet='') -> MFloatVectorArray

Returns the binormal vectors for all face-vertices.

This method is not threadsafe.
Signature: getBinormals(space=MSpace.kObject, uvSet='')
Parameters:
NameTypeDescription
space MSpace constant Coordinate space to use.
uvSet string UV set to use. If not specified then the mesh's current UV set will be used.
Returns: MFloatVectorArray
Description:

Returns the binormal vectors for all face vertices.

This method is not threadsafe.

OpenMaya.MFnMesh.getBlindDataAttrNames ( )
getBlindDataAttrNames(blindDataId) -> ((longName, shortName, typeName), ...)

Returns a tuple listing the attributes of the given blind data type.
Each element of the tuple is itself a tuple containing the long
name, short name and type name of the attribute. Type names can be
'int', 'float', 'double', 'boolean', 'string' or 'binary'.
Signature: getBlindDataAttrNames(blindDataId)
Parameters:
NameTypeDescription
blindDataId int Blind data type ID.
Returns: ((longName, shortName, typeName), ...)
Description: Returns a tuple listing the attributes of the given blind data type. Each element of the tuple is itself a tuple containing the long name, short name and type name of the attribute. Type names can be "int", "float", "double", "boolean", "string" or "binary"
OpenMaya.MFnMesh.getBlindDataTypes ( )
getBlindDataTypes(MFn Type constant) -> MIntArray

Returns all the blind data ID's associated with the given component
type on this mesh.
Signature: getBlindDataTypes(compType)
Parameters:
NameTypeDescription
compType MFn Type constant Component type.
Returns: MIntArray
Description: Returns all the blind data ID's associated with the given component type on this mesh.
OpenMaya.MFnMesh.getBoolBlindData ( )
getBoolBlindData(compId, compType, blindDataId, attr) -> bool
getBoolBlindData(compType, blindDataId, attr) -> (MIntArray, MIntArray)

The first version returns the value of the specified blind data
attribute from the specified mesh component.

The second version returns a tuple containing an array of component
IDs and an array of values for the specified blind data attribute
for all of the mesh's components of the specified type.

Both versions raise RuntimeError if the attribute is not of
'boolean' type.
Signature: getBoolBlindData(compId, compType, blindDataId, attr)
Parameters:
NameTypeDescription
compId int ID of mesh component.
compType MFn Type constant Mesh component type.
blindDataId int Blind data type ID.
attr string Attribute name.
Returns: bool
Description: Returns the value of the specified blind data attribute from the specified mesh component. Raises RuntimeError if the attribute is not of "bool" type.
Signature: getBoolBlindData(compType, blindDataId, attr)
Parameters:
NameTypeDescription
compType MFn Type constant Mesh component type.
blindDataId int Blind data type ID.
attr string Attribute name.
Returns: (MIntArray, MIntArray)
Description: Returns a tuple containing an array of component IDs and an array of values for the specified blind data attribute for all of the mesh's components of the specified type. Raises RuntimeError if the attribute is not of "bool" type.
OpenMaya.MFnMesh.getClosestNormal ( )
getClosestNormal(MPoint, space=MSpace.kObject) -> (MVector, int)

Returns a tuple containing the normal at the closest point on the
mesh to the given point and the ID of the face in which that closest
point lies.
Signature: getClosestNormal(point, space=MSpace.kObject)
Parameters:
NameTypeDescription
point MPoint Point to be compared.
space MSpace constant Coordinate space to use.
Returns: (MVector, int)
Description: Returns a tuple containing the normal at the closest point on the mesh to the given point and the ID of the face in which that closest point lies.
OpenMaya.MFnMesh.getClosestPoint ( )
getClosestPoint(MPoint, space=MSpace.kObject) -> (MPoint, int)

Returns a tuple containing the closest point on the mesh to the
given point and the ID of the face in which that closest point lies.

This method is not threadsafe.
Signature: getClosestPoint(point, space=MSpace.kObject)
Parameters:
NameTypeDescription
point MPoint Point to be compared.
space MSpace constant Coordinate space to use.
Returns: (MPoint, int)
Description:

Returns a tuple containing the closest point on the mesh to the given point and the ID of the face in which that closest point lies.

This method is not threadsafe.

OpenMaya.MFnMesh.getClosestPointAndNormal ( )
getClosestPointAndNormal(MPoint, space=MSpace.kObject)
  -> (MPoint, MVector, int)

Returns a tuple containing the closest point on the mesh to the
given point, the normal at that point, and the ID of the face in
which that point lies.

This method is not threadsafe.
Signature: getClosestPointAndNormal(point, space=MSpace.kObject)
Parameters:
NameTypeDescription
point MPoint Point to be compared.
space MSpace constant Coordinate space to use.
Returns: (MPoint, MVector,int)
Description:

Returns a tuple containing the closest point on the mesh to the given point, the normal at that point, and the ID of the face in which that point lies.

This method is not threadsafe.

def OpenMaya.MFnMesh.getClosestUVs ( )
getClosestUVs(u, v, uvSet='') -> MIntArray

Returns the IDs of the UVs which are nearest in uv space to the
given texture coordinate in the specified UV set. All these UVs
locate at the same distance to the given coordinate.
OpenMaya.MFnMesh.getColor ( )
getColor(colorId, colorSet='') -> MColor

Returns a color from a colorSet. Raises IndexError if the colorId is
out of range.
Signature: getColor(colorId, colorSet='')
Parameters:
NameTypeDescription
colorId int Index of colorSet entry to retrieve.
colorSet string Name of color set.
Returns: MColor
Description: Returns a color from a colorSet. Raises IndexError if the colorId is out of range.
OpenMaya.MFnMesh.getColorIndex ( )
getColorIndex(faceId, localVertexId, colorSet='') -> int

Returns the index into the specified colorSet of the color used by a
specific face-vertex. This can be used to index into the sequence
returned by getColors().
Signature: getColorIndex(faceId, localVertexIndex, colorSet='')
Parameters:
NameTypeDescription
faceId int ID of face.
localVertexIndex int Face-relative/local vertex index.
colorSet string Name of color set.
Returns: int
Description: Returns the index into the specified colorSet of the color used by a specific face-vertex. This can be used to index into the sequence returned by getColors().
OpenMaya.MFnMesh.getColorRepresentation ( )
getColorRepresentation(colorSet) -> Color Representation constant

Returns the Color Representation used by the specified color set.
Signature: getColorRepresentation(colorSet)
Parameters:
NameTypeDescription
colorSet string Name of color set.
Returns: Color Representation constant
Description: Returns the Color Representation used by the specified color set.
OpenMaya.MFnMesh.getColors ( )
getColors(colorSet='') -> MColorArray

Returns all of the colors in a colorSet. If no colorSet is specified
then the default colorSet is used.

Use the index returned by getColorIndex() to access the returned
array.
Signature: getColors(colorSet='')
Parameters:
NameTypeDescription
colorSet string Name of color set.
Returns: MColorArray
Description:

Returns all of the colors in a colorSet. If no colorSet is specified then the default colorSet is used.

Use the index returned by getColorIndex() to access the returned array.

OpenMaya.MFnMesh.getColorSetFamilyNames ( )
getColorSetFamilyNames() -> (string, ...)

Returns the names of all of the color set families on this object. A
color set family is a set of per-instance sets with the same name
with each individual set applying to one or more instances. A set
which is shared across all instances will be the sole member of its
family.

Given a color set family name, getColorSetsInFamily() may be used to
determine the names of the associated individual sets.
Signature: getColorSetFamilyNames()
Parameters: None.
Returns: tuple of strings
Description:

Returns the names of all of the color set families on this object. A color set family is a set of per-instance sets with the same name with each individual set applying to one or more instances. A set which is shared across all instances will be the sole member of its family.

Given a color set family name, getColorSetsInFamily() may be used to determine the names of the associated individual sets.

OpenMaya.MFnMesh.getColorSetNames ( )
getColorSetNames() -> (string, ...)

Returns the names of all the color sets on this object.
Signature: getColorSetNames()
Parameters: None.
Returns: tuple of strings
Description: Returns the names of all the color sets on this object.
OpenMaya.MFnMesh.getColorSetsInFamily ( )
getColorSetsInFamily(familyName) -> (string, ...)

Returns the names of all of the color sets that belong to the
specified family. Per-instance sets will have multiple sets in a
family, with each individual set applying to one or more instances.
A set which is shared across all instances will be the sole member
of its family and will share the same name as its family.
Signature: getColorSetsInFamily(familyName)
Parameters:
NameTypeDescription
familyName string Name of a Color set family.
Returns: tuple of strings
Description: Returns the names of all of the color sets that belong to the specified family. Per-instance sets will have multiple sets in a family, with each individual set applying to one or more instances. A set which is shared across all instances will be the sole member of its family and will share the same name as its family.
OpenMaya.MFnMesh.getConnectedShaders ( )
getConnectedShaders(instance) -> (MObjectArray, MIntArray)

Returns a tuple containing an array of shaders (sets) and an array
of ints mapping the mesh's polygons onto those shaders. For each
polygon in the mesh there will be corresponding value in the second
array. If it is -1 that means that the polygon is not assigned to a
shader, otherwise it indicates the index into the first array of the
shader to which that polygon is assigned.

This method will only work if the functionset is attached to a mesh
node. It will raise RuntimeError if the functionset is attached to
mesh data.
Signature: getConnectedShaders(instance)
Parameters:
NameTypeDescription
instance int Instance of the mesh to query.
Returns: (MObjectArray, MIntArray)
Description:

Returns a tuple containing an array of shaders (sets) and an array of ints mapping the mesh's polygons onto those shaders. For each polygon in the mesh there will be corresponding value in the second array. If it is -1 that means that the polygon is not assigned to a shader, otherwise it indicates the index into the first array of the shader to which that polygon is assigned.

This method will only work if the functionset is attached to a mesh node. It will raise RuntimeError if the functionset is attached to mesh data.

OpenMaya.MFnMesh.getCreaseEdges ( )
getCreaseEdges() -> (MUintArray, MDoubleArray)

Returns a tuple containing two arrays. The first contains the mesh-
relative/global IDs of the mesh's creased edges and the second
contains the associated crease data.

Please note that to make effective use of the creasing variable in
software outside of Maya may require a license under patents owned
by Pixar(R).
Signature: getCreaseEdges()
Parameters: None.
Returns: (MUintArray, MDoubleArray)
Description:

Returns a tuple containing two arrays. The first contains the mesh-relative/global IDs of the mesh's creased edges and the second contains the associated crease data.

Please note that to make effective use of the creasing variable in software outside of Maya may require a license under patents owned by Pixar(R).

OpenMaya.MFnMesh.getCreaseVertices ( )
getCreaseVertices() -> (MUintArray, MDoubleArray)

Returns a tuple containing two arrays. The first contains the mesh-
relative/global IDs of the mesh's creased vertices and the second
contains the associated crease data.

Please note that to make effective use of the creasing variable in
software outside of Maya may require a license under patents owned
by Pixar(R).
Signature: getCreaseVertices()
Parameters: None.
Returns: (MUintArray, MDoubleArray)
Description:

Returns a tuple containing two arrays. The first contains the mesh-relative/global IDs of the mesh's creased vertices and the second contains the associated crease data.

Please note that to make effective use of the creasing variable in software outside of Maya may require a license under patents owned by Pixar(R).

OpenMaya.MFnMesh.getDoubleBlindData ( )
getDoubleBlindData(compId, compType, blindDataId, attr) -> float
getDoubleBlindData(compType, blindDataId, attr) -> (MIntArray, MDoubleArray)

The first version returns the value of the specified blind data
attribute from the specified mesh component.

The second version returns a tuple containing an array of component
IDs and an array of values for the specified blind data attribute
for all of the mesh's components of the specified type.

Both versions raise RuntimeError if the attribute is not of
'double' type.
Signature: getDoubleBlindData(compId, compType, blindDataId, attr)
Parameters:
NameTypeDescription
compId int ID of mesh component.
compType MFn Type constant Mesh component type.
blindDataId int Blind data type ID.
attr string Attribute name.
Returns: float
Description: Returns the value of the specified blind data attribute from the specified mesh component. Raises RuntimeError if the attribute is not of "double" type.
Signature: getDoubleBlindData(compType, blindDataId, attr)
Parameters:
NameTypeDescription
compType MFn Type constant Mesh component type.
blindDataId int Blind data type ID.
attr string Attribute name.
Returns: (MIntArray, MDoubleArray)
Description: Returns a tuple containing an array of component IDs and an array of values for the specified blind data attribute for all of the mesh's components of the specified type. Raises RuntimeError if the attribute is not of "double" type.
OpenMaya.MFnMesh.getEdgeVertices ( )
getEdgeVertices(edgeId) -> (int, int)

Returns a tuple containing the mesh-relative/global IDs of the
edge's two vertices. The indices can be used to refer to the
elements in the array returned by the getPoints() method.
Signature: getEdgeVertices(edgeId)
Parameters:
NameTypeDescription
edgeId int Mesh-relative/global ID of edge.
Returns: (int, int)
Description: Returns a tuple containing the mesh-relative/global IDs of the edge's two vertices. The indices can be used to refer to the elements in the array returned by the getPoints() method.
OpenMaya.MFnMesh.getFaceAndVertexIndices ( )
getFaceAndVertexIndices(faceVertexIndex, localVertex=True) -> (int, int)

Returns a tuple containg the faceId and vertexIndex represented by
the given face-vertex index. This is the reverse of the operation
performed by getFaceVertexIndex().

If localVertex is True then the returned vertexIndex is the face-
relative/local index, otherwise it is the mesh-relative/global index.
Signature: getFaceAndVertexIndices(faceVertexIndex, localVertex=True)
Parameters:
NameTypeDescription
faceVertexIndex int ID of face-vertex.
localVertex bool Determines if returned vertexIndex be face-relative/local or mesh-relative/global.
Returns: (faceId, vertexIndex)
Description:

Returns a tuple containg the faceId and vertexIndex represented by the given face-vertex index. This is the reverse of the operation performed by getFaceVertexIndex().

If localVertex is True then the returned vertexIndex is the face-relative/local index, otherwise it is the mesh-relative/global index.

OpenMaya.MFnMesh.getFaceNormalIds ( )
getFaceNormalIds(faceId) -> MIntArray

Returns the IDs of the normals for all the vertices of a given face.
These IDs can be used to index into the arrays returned by getNormals().
Signature: getFaceNormalIds(faceId)
Parameters:
NameTypeDescription
faceId int ID of the face.
Returns: MIntArray
Description: Returns the IDs of the normals for all the vertices of a given face. These IDs can be used to index into the arrays returned by getNormals().
OpenMaya.MFnMesh.getFaceUVSetNames ( )
getFaceUVSetNames(faceId) -> (string, ...)

Returns the names of all of the uv sets mapped to the specified face.

This method is not threadsafe.
Signature: getFaceUVSetNames(faceId)
Parameters:
NameTypeDescription
faceId int ID of face.
Returns: tuple of strings
Description:

Returns the names of all of the uv sets mapped to the specified face.

This method is not threadsafe.

OpenMaya.MFnMesh.getFaceVertexBinormal ( )
getFaceVertexBinormal(faceId, vertexId, space=MSpace.kObject, uvSet='') -> MVector

Returns the binormal vector at a given face vertex.

This method is not threadsafe.
Signature: getFaceVertexBinormal(faceId, vertexId, space=MSpace.kObject, uvSet='')
Parameters:
NameTypeDescription
faceId int ID of face.
vertexId int Mesh-relative/global ID of vertex.
space MSpace constant Coordinate space to use.
uvSet string UV set to use. If not specified then the mesh's current UV set will be used.
Returns: MVector
Description:

Returns the binormal vector at a given face vertex.

This method is not threadsafe.

OpenMaya.MFnMesh.getFaceVertexBinormals ( )
getFaceVertexBinormals(faceId, space=MSpace.kObject, uvSet='') -> MFloatVectorArray

Returns all the per-vertex-per-face binormals for a given face.

This method is not threadsafe.
Signature: getFaceVertexBinormals(faceId, space=MSpace.kObject, uvSet='')
Parameters:
NameTypeDescription
faceId int ID of face.
space MSpace constant Coordinate space to use.
uvSet string UV set to use. If not specified then the mesh's current UV set will be used.
Returns: MFloatVectorArray
Description:

Returns all the per-vertex-per-face binormals for a given face.

This method is not threadsafe.

OpenMaya.MFnMesh.getFaceVertexColors ( )
getFaceVertexColors(colorSet='', defaultUnsetColor=None) -> MColorArray

Returns colors for all the mesh's face-vertices.

The colors are returned in face order: e.g. F0V0, F0V1.. F0Vn, F1V0,
etc... Use the index returned by getFaceVertexIndex() if you wish to
index directly into the returned color array.

If no face has color for that vertex, the entry returned will be
defaultUnsetColor. If a color was set for some but not all the faces
for that vertex, the ones where the color has not been explicitly set
will return (0,0,0). If a vertex has shared color, the same value
will be set for all its vertes/faces.

If the colorSet is not specified, the default color set will be used.
If the defaultUnsetColor is not given, then (-1, -1, -1, -1) will be
used.
Signature: getFaceVertexColors(colorSet='', defaultUnsetColor=None)
Parameters:
NameTypeDescription
colorSet string Name of color set.
defaultUnsetColor MColor Color to return for vertices which have no color set.
Returns: MColorArray
Description:

Returns colors for all the mesh's face-vertices.

The colors are returned in face order: e.g. F0V0, F0V1.. F0Vn, F1V0, etc... Use the index returned by getFaceVertexIndex() if you wish to index directly into the returned color array.

If no face has color for that vertex, the entry returned will be defaultUnsetColor. If a color was set for some but not all the faces for that vertex, the ones where the color has not been explicitly set will return (0,0,0). If a vertex has shared color, the same value will be set for all its vertes/faces.

If the colorSet is not specified, the default color set will be used. If the defaultUnsetColor is not given, then (-1, -1, -1, -1) will be used.

OpenMaya.MFnMesh.getFaceVertexIndex ( )
getFaceVertexIndex(faceId, vertexIndex, localVertex=True) -> int

Returns the index for a specific face-vertex into an array of face-
vertex values, such as those returned by getFaceVertexBinormals(),
getFaceVertexColors(), getFaceVertexNormals(), etc.

The values in the target arrays are presumed to be in face order:
F0V0, F0V1.. F0Vn, F1V0, etc...
If localVertex is True then vertexIndex must be a face-relative/local
index. If localVertex is False then vertexIndex must be a mesh-
relative/global index.

The opposite operation is performed by the getFaceAndVertexIndices()
method.
Signature: getFaceVertexIndex(faceId, vertexIndex, localVertex=True)
Parameters:
NameTypeDescription
faceId int ID of face.
vertexIndex int Vertex index. Face-relative/local or mesh-relative/global, depending on localVertex.
localVertex bool Determines whether the vertexIndex is face-relative/local or mesh-relative/global.
Returns: int
Description:

Returns the index for a specific face-vertex into an array of face-vertex values, such as those returned by getFaceVertexBinormals(), getFaceVertexColors(), getFaceVertexNormals(), etc.

The values in the target arrays are presumed to be in face order: e.g. F0V0, F0V1.. F0Vn, F1V0, etc...

If localVertex is True then vertexIndex must be a face-relative/local index. If localVertex is False then vertexIndex must be a mesh-relative/global index.

The opposite operation is performed by the getFaceAndVertexIndices() method.

OpenMaya.MFnMesh.getFaceVertexNormal ( )
getFaceVertexNormal(faceId, vertexId, space=MSpace.kObject) -> MVector

Returns the per-vertex-per-face normal for a given face and vertex.

This method is not threadsafe.
Signature: getFaceVertexNormal(faceId, vertexId, space=MSpace.kObject)
Parameters:
NameTypeDescription
faceId int ID of the face of interest.
vertexId int Mesh-relative/global vertex ID.
space MSpace constant Coordinate space to use.
Returns: MVector
Description:

Returns the per-vertex-per-face normal for a given face and vertex.

This method is not threadsafe.

OpenMaya.MFnMesh.getFaceVertexNormals ( )
getFaceVertexNormals(faceId, space=MSpace.kObject) -> MFloatVectorArray

Returns the normals for a given face.

This method is not threadsafe.
Signature: getFaceVertexNormals(faceId, space=MSpace.kObject)
Parameters:
NameTypeDescription
faceId int ID of the face of interest.
space MSpace constant Coordinate space to use.
Returns: MFloatVectorArray
Description:

Returns the normals for a given face.

This method is not threadsafe.

OpenMaya.MFnMesh.getFaceVertexTangent ( )
getFaceVertexTangent(faceId, vertexId, space=MSpace.kObject, uvSet='') -> MVector

Return the normalized tangent vector at a given face vertex.

The tangent is defined as the surface tangent of the polygon running
in the U direction defined by the uv map.
This method is not threadsafe.
Signature: getFaceVertexTangent(faceId, vertexId, space=MSpace.kObject, uvSet='')
Parameters:
NameTypeDescription
faceId int ID of face.
vertexId int Mesh-relative/global ID of vertex.
space MSpace constant Coordinate space to use.
uvSet string UV set to use. If not specified then the mesh's current UV set will be used.
Returns: MVector
Description:

Return the normalized tangent vector at a given face vertex.

The tangent is defined as the surface tangent of the polygon running in the U direction defined by the uv map.

This method is not threadsafe.

OpenMaya.MFnMesh.getFaceVertexTangents ( )
getFaceVertexTangents(faceId, space=MSpace.kObject, uvSet='') -> MFloatVectorArray

Returns all the per-vertex-per-face tangents for a given face.

The tangent is defined as the surface tangent of the polygon running
in the U direction defined by the uv map.

This method is not threadsafe.
Signature: getFaceVertexTangents(faceId, space=MSpace.kObject, uvSet='')
Parameters:
NameTypeDescription
faceId int ID of face.
space MSpace constant Coordinate space to use.
uvSet string UV set to use. If not specified then the mesh's current UV set will be used.
Returns: MFloatVectorArray
Description:

Returns all the per-vertex-per-face tangents for a given face.

The tangent is defined as the surface tangent of the polygon running in the U direction defined by the uv map.

This method is not threadsafe.

OpenMaya.MFnMesh.getFloatBlindData ( )
getFloatBlindData(compId, compType, blindDataId, attr) -> float
getFloatBlindData(compType, blindDataId, attr) -> (MIntArray, MFloatArray)

The first version returns the value of the specified blind data
attribute from the specified mesh component.

The second version returns a tuple containing an array of component
IDs and an array of values for the specified blind data attribute
for all of the mesh's components of the specified type.

Both versions raise RuntimeError if the attribute is not of
'float' type.
Signature: getFloatBlindData(compId, compType, blindDataId, attr)
Parameters:
NameTypeDescription
compId int ID of mesh component.
compType MFn Type constant Mesh component type.
blindDataId int Blind data type ID.
attr string Attribute name.
Returns: float
Description: Returns the value of the specified blind data attribute from the specified mesh component. Raises RuntimeError if the attribute is not of "float" type.
Signature: getFloatBlindData(compType, blindDataId, attr)
Parameters:
NameTypeDescription
compType MFn Type constant Mesh component type.
blindDataId int Blind data type ID.
attr string Attribute name.
Returns: (MIntArray, MFloatArray)
Description: Returns a tuple containing an array of component IDs and an array of values for the specified blind data attribute for all of the mesh's components of the specified type. Raises RuntimeError if the attribute is not of "float" type.
OpenMaya.MFnMesh.getFloatPoints ( )
getFloatPoints(space=MSpace.kObject) -> MFloatPointArray

Returns an MFloatPointArray containing the mesh's vertices.
Signature: getFloatPoints(space=MSpace.kObject)
Parameters:
NameTypeDescription
space MSpace constant Coordinate system to use.
Returns: MFloatPointArray
Description: Returns a copy of the mesh's vertex positions as an MFloatPointArray.
OpenMaya.MFnMesh.getHoles ( )
getHoles() -> ((face, (v1, v2, ...)), (face, (v1, v2, ...)), ...)

Returns a tuple describing the holes in the mesh. Each element of the
tuple is itself a tuple. The first element of the sub-tuple is the
integer ID of the face in which the hole occurs. The second element
of the sub-tuple is another tuple containing the mesh-relative/global
IDs of the vertices which make up the hole.

Take the following return value as an example:

    ((3, (7, 2, 6)), (5, (11, 10, 3, 4)))

This says that the mesh has two holes. The first hole is in face 3
and consists of vertices 7, 2 and 6. The second hole is in face 5 and
consists of vertices 11, 10, 3 and 4.
Signature: getHoles()
Parameters: None.
Returns: ((face, (v1, v2, ...)), (face, (v1, v2, ...)), ...)
Description:

Returns a tuple describing the holes in the mesh. Each element of the tuple is itself a tuple. The first element of the sub-tuple is the integer ID of the face in which the hole occurs. The second element of the sub-tuple is another tuple containing the mesh-relative/global IDs of the vertices which make up the hole.

Take the following return value as an example:

((3, (7, 2, 6)), (5, (11, 10, 3, 4)))

This says that the mesh has two holes. The first hole is in face 3 and consists of vertices 7, 2 and 6. The second hole is in face 5 and consists of vertices 11, 10, 3 and 4.

OpenMaya.MFnMesh.getIntBlindData ( )
getIntBlindData(compId, compType, blindDataId, attr) -> int
getIntBlindData(compType, blindDataId, attr) -> (MIntArray, MIntArray)

The first version returns the value of the specified blind data
attribute from the specified mesh component.

The second version returns a tuple containing an array of component
IDs and an array of values for the specified blind data attribute
for all of the mesh's components of the specified type.

Both versions raise RuntimeError if the attribute is not of
'int' type.
Signature: getIntBlindData(compId, compType, blindDataId, attr)
Parameters:
NameTypeDescription
compId int ID of mesh component.
compType MFn Type constant Mesh component type.
blindDataId int Blind data type ID.
attr string Attribute name.
Returns: int
Description: Returns the value of the specified blind data attribute from the specified mesh component. Raises RuntimeError if the attribute is not of "int" type.
Signature: getIntBlindData(compType, blindDataId, attr)
Parameters:
NameTypeDescription
compType MFn Type constant Mesh component type.
blindDataId int Blind data type ID.
attr string Attribute name.
Returns: (MIntArray, MIntArray)
Description: Returns a tuple containing an array of component IDs and an array of values for the specified blind data attribute for all of the mesh's components of the specified type. Raises RuntimeError if the attribute is not of "int" type.
OpenMaya.MFnMesh.getInvisibleFaces ( )
getInvisibleFaces() -> MUintArray

Returns the invisible faces of the mesh. Invisible faces are like
lightweight holes in that they are not rendered but do not require
additional geometry the way that holes do. They have the advantage
over holes that if the mesh is smoothed then their edges will be
smoothed as well, while holes will retain their hard edges.

Invisible faces can be set using the setInvisibleFaces() method or
the polyHole command.
Signature: getInvisibleFaces()
Parameters: None.
Returns: MUintArray
Description:

Returns the invisible faces of the mesh. Invisible faces are like lightweight holes in that they are not rendered but do not require additional geometry the way that holes do. They have the advantage over holes that if the mesh is smoothed then their edges will be smoothed as well, while holes will retain their hard edges.

Invisible faces can be set using the setInvisibleFaces() method or the polyHole command.

def OpenMaya.MFnMesh.getMeshShellsIds ( )
getMeshShellsIds(compType) -> (int, MIntArray)

Returns a tuple containing describing how the specified component type items
are grouped into shells. The first element of the tuple is the number
of distinct shells. The second element of the tuple is an array of
shell indices, one per component, indicating which shell that component is part of.
OpenMaya.MFnMesh.getNormalIds ( )
getNormalIds() -> (MIntArray, MIntArray)

Returns the normal IDs for all of the mesh's polygons as a tuple of
two int arrays. The first array contains the number of vertices for
each polygon and the second contains the normal IDs for each polygon-
vertex. These IDs can be used to index into the array returned by
getNormals().
Signature: getNormalIds()
Parameters: None.
Returns: (MIntArray, MIntArray)
Description: Returns the normal IDs for all of the mesh's polygons as a tuple of two int arrays. The first array contains the number of vertices for each polygon and the second contains the normal IDs for each polygon-vertex. These IDs can be used to index into the array returned by getNormals().
OpenMaya.MFnMesh.getNormals ( )
getNormals(space=MSpace.kObject) -> MFloatVectorArray

Returns a copy of the mesh's normals. The normals are the per-polygon
per-vertex normals. To find the normal for a particular vertex-face,
use getFaceNormalIds() to get the index into the array.

This method is not threadsafe.
Signature: getNormals(space=MSpace.kObject)
Parameters:
NameTypeDescription
space MSpace constant Coordinate system to use.
Returns: MFloatVectorArray
Description:

Returns a copy of the mesh's normals. The normals are the per-polygon per-vertex normals. To find the normal for a particular vertex-face, use getFaceNormalIds() to get the index into the array.

This method is not threadsafe.

OpenMaya.MFnMesh.getPoint ( )
getPoint(vertexId, space=MSpace.kObject) -> MPoint

Returns the position of specified vertex.
Signature: getPoint(vertexId, space=MSpace.kObject)
Parameters:
NameTypeDescription
vertexId int Mesh-relative/global index of the vertex to be changed.
space MSpace constant Coordinate system in which the point is to be returned.
Returns: MPoint
Description: Returns the position of specified vertex.
OpenMaya.MFnMesh.getPointAtUV ( )
getPointAtUV(faceId, u, v, space=MSpace.kObject, uvSet='', tolerance=0.0) -> MPoint

Returns the position of the point at the give UV value in the
specified face.

This method is not threadsafe.
Signature: getPointAtUV(faceId, u, v, space=MSpace.kObject, uvSet='', tolerance=0.0)
Parameters:
NameTypeDescription
faceId int ID of face in which to find the point.
u float U component of UV.
v float V component of UV.
space MSpace constant Coordinate system in which the point is to be returned.
uvSet string Name of UV set to use. If not provided, the current UV set will be used.
tolerance float Tolerance value.
Returns: MPoint
Description:

Returns the position of the point at the give UV value in the specified face.

This method is not threadsafe.

OpenMaya.MFnMesh.getPoints ( )
getPoints(space=MSpace.kObject) -> MPointArray

Returns a copy of the mesh's vertex positions as an MPointArray.
Signature: getPoints(space=MSpace.kObject)
Parameters:
NameTypeDescription
space MSpace constant Coordinate system to use.
Returns: MPointArray
Description: Returns a copy of the mesh's vertex positions as an MPointArray.
def OpenMaya.MFnMesh.getPointsAtUV ( )
getPointsAtUV(u, v, space=MSpace.kObject, uvSet='', tolerance=0.001) -> (MIntArray, MPointArray)

Returns the polygon ids and positions of points at the given UV position on the mesh.
OpenMaya.MFnMesh.getPolygonNormal ( )
getPolygonNormal(polygonId, space=MSpace.kObject) -> MVector

Returns the per-polygon normal for the given polygon.

This method is not threadsafe.
Signature: getPolygonNormal(polygonId, space=MSpace.kObject)
Parameters:
NameTypeDescription
polygonId int ID of polygon to get normal from.
space MSpace constant Coordinate system to use.
Returns: MVector
Description:

Returns the per-polygon normal for the given polygon.

This method is not threadsafe.

OpenMaya.MFnMesh.getPolygonTriangleVertices ( )
getPolygonTriangleVertices(polygonId, triangleId) -> (int, int, int)

Returns the mesh-relative/global IDs of the 3 vertices of the
specified triangle of the specified polygon. These IDs can be used
to index into the arrays returned by getPoints() and getFloatPoints().
Signature: getPolygonTriangleVertices(polygonId, triangleId)
Parameters:
NameTypeDescription
polygonId int ID of the polygon.
triangleId int Face-relative ID of the triangle.
Returns: (int, int, int)
Description: Returns the mesh-relative/global IDs of the 3 vertices of the specified triangle of the specified polygon. These IDs can be used to index into the arrays returned by getPoints() and getFloatPoints().
OpenMaya.MFnMesh.getPolygonUV ( )
getPolygonUV(polygonId, vertexId, uvSet='') -> (float, float)

Returns a tuple containing the U and V values at a specified vertex
of a specified polygon.

This method is not threadsafe.
Signature: getPolygonUV(polygonId, vertexId, uvSet='')
Parameters:
NameTypeDescription
polygonId int ID of the polygon.
vertexId int Face-relative/local index of the vertex.
uvSet string Name of UV set to use. If not provided, the current UV set will be used.
Returns: (float, float)
Description:

Returns a tuple containing the U and V values at a specified vertex of a specified polygon.

This method is not threadsafe.

OpenMaya.MFnMesh.getPolygonUVid ( )
getPolygonUVid(polygonId, vertexId, uvSet='') -> int

Returns the ID of the UV at a specified vertex of a specified polygon.

This method is not threadsafe.
Signature: getPolygonUVid(polygonId, vertexId, uvSet='')
Parameters:
NameTypeDescription
polygonId int ID of the polygon.
vertexId int Face-relative/local index of the vertex.
uvSet string Name of UV set to use. If not provided, the current UV set will be used.
Returns: int
Description:

Returns the ID of the UV at a specified vertex of a specified polygon.

This method is not threadsafe.

OpenMaya.MFnMesh.getPolygonVertices ( )
getPolygonVertices(polygonId) -> MIntArray

Returns the mesh-relative/global vertex IDs the specified polygon.
These IDs can be used to index into the arrays returned by getPoints()
and getFloatPoints().
Signature: getPolygonVertices(polygonId)
Parameters:
NameTypeDescription
polygonId int ID of the polygon.
Returns: MIntArray
Description: Returns the mesh-relative/global vertex IDs the specified polygon. These IDs can be used to index into the arrays returned by getPoints() and getFloatPoints().
OpenMaya.MFnMesh.getSmoothMeshDisplayOptions ( )
getSmoothMeshDisplayOptions() -> MMeshSmoothOptions

Returns the options currently in use when smoothing the mesh for display.
Signature: getSmoothMeshDisplayOptions()
Parameters: None.
Returns: MMeshSmoothOptions
Description: Returns the options currently in use when smoothing the mesh for display.
OpenMaya.MFnMesh.getStringBlindData ( )
getStringBlindData(compId, compType, blindDataId, attr) -> string
getStringBlindData(compType, blindDataId, attr)
  -> (MIntArray, [string, string, ...])

The first version returns the value of the specified blind data
attribute from the specified mesh component.

The second version returns a tuple containing an array of component
IDs and an array of values for the specified blind data attribute
for all of the mesh's components of the specified type.

Both versions raise RuntimeError if the attribute is not of 'string'
type.
Signature: getStringBlindData(compId, compType, blindDataId, attr)
Parameters:
NameTypeDescription
compId int ID of mesh component.
compType MFn Type constant Mesh component type.
blindDataId int Blind data type ID.
attr string Attribute name.
Returns: string
Description: Returns the value of the specified blind data attribute from the specified mesh component. Raises RuntimeError if the attribute is not of "string" type.
Signature: getStringBlindData(compType, blindDataId, attr)
Parameters:
NameTypeDescription
compType MFn Type constant Mesh component type.
blindDataId int Blind data type ID.
attr string Attribute name.
Returns: (MIntArray, [string, string, ...])
Description: Returns a tuple containing an array of component IDs and an array of values for the specified blind data attribute for all of the mesh's components of the specified type. Raises RuntimeError if the attribute is not of "string" type.
OpenMaya.MFnMesh.getTangentId ( )
getTangentId(faceId, vertexId) -> int

Returns the ID of the tangent for a given face and vertex.
Signature: getTangentId(faceId, vertexId)
Parameters:
NameTypeDescription
faceId int ID of the face of interest.
vertexId int Mesh-relative/global vertex ID.
Returns: int
Description: Returns the ID of the tangent for a given face and vertex.
OpenMaya.MFnMesh.getTangents ( )
getTangents(space=MSpace.kObject, uvSet='') -> MFloatVectorArray

Return the tangent vectors for all face vertices. The tangent is
defined as the surface tangent of the polygon running in the U
direction defined by the uv map.

This method is not threadsafe.
Signature: getTangents(space=MSpace.kObject, uvSet='')
Parameters:
NameTypeDescription
space MSpace constant Coordinate space to use.
uvSet string UV set to use. If not specified then the mesh's current UV set will be used.
Returns: MFloatVectorArray
Description:

Return the tangent vectors for all face vertices. The tangent is defined as the surface tangent of the polygon running in the U direction defined by the uv map.

This method is not threadsafe.

def OpenMaya.MFnMesh.getTriangleOffsets ( )
getTriangleOffsets() -> (MIntArray, MIntArray)

Returns the number of triangles for every polygon face and the
offset into the vertex indices array for each triangle vertex (see getVertices()).
The triangleVertices array holds each vertex for each triangle in sequence,
so it has three times as many elements as there are triangles.
(i.e. three times the sum of the elements of the triangleCounts array)
OpenMaya.MFnMesh.getTriangles ( )
getTriangles() -> (MIntArray, MIntArray)

Returns a tuple describing the mesh's triangulation. The first
element of the tuple is an array giving the number of triangles for
each of the mesh's polygons. The second tuple gives the ids of the
vertices of all the triangles.
Signature: getTriangles()
Parameters: None.
Returns: (MIntArray, MIntArray)
Description: Returns a tuple describing the mesh's triangulation. The first element of the tuple is an array giving the number of triangles for each of the mesh's polygons. The second tuple gives the ids of the vertices of all the triangles.
OpenMaya.MFnMesh.getUV ( )
getUV(uvId, uvSet='') -> (float, float)

Returns a tuple containing the u and v values of the specified UV.
Signature: getUV(uvId, uvSet='')
Parameters:
NameTypeDescription
uvId int Index of the UV to be returned.
uvSet string Name of UV set to use. If not provided, the current UV set will be used.
Returns: (float, float)
Description: Returns a tuple containing the u and v values of the specified UV.
OpenMaya.MFnMesh.getUVAtPoint ( )
getUVAtPoint(point, space=MSpace.kObject, uvSet='') -> (float, float, int)

Returns a tuple containing the u and v coordinates of the point on
the mesh closest to the given point, and the ID of the face
containing that closest point.

This method is not threadsafe.
Signature: getUVAtPoint(point, space=MSpace.kObject, uvSet='')
Parameters:
NameTypeDescription
point MPoint Point for which to retrieve UV.
space MSpace constant Coordinate system to use.
uvSet string Name of UV set to use. If not provided, the current UV set will be used.
Returns: (float, float, int)
Description:

Returns a tuple containing the u and v coordinates of the point on the mesh closest to the given point, and the ID of the face containing that closest point.

This method is not threadsafe.

def OpenMaya.MFnMesh.getUVBorderEdges ( )
getUVBorderEdges(setId) -> MIntArray

Retrieves the edge indices for edges lying on a UV border.
OpenMaya.MFnMesh.getUVs ( )
getUVs(uvSet='') -> (MFloatArray, MFloatArray)

Returns a tuple containing an array of U values and an array of V
values, representing all of the UVs for the given UV set.
Signature: getUVs(uvSet='')
Parameters:
NameTypeDescription
uvSet string Name of UV set to use. If not provided, the current UV set will be used.
Returns: (MFloatArray, MFloatArray)
Description: Returns a tuple containing an array of U values and an array of V values, representing all of the UVs for the given UV set.
OpenMaya.MFnMesh.getUVSetFamilyNames ( )
getUVSetFamilyNames() -> (string, ...)

Returns the names of all of the uv set families on this object. A
uv set family is a set of per-instance sets with the same name
with each individual set applying to one or more instances. A set
which is shared across all instances will be the sole member of its
family.

Given a uv set family name, getUVSetsInFamily() may be used to
determine the names of the associated individual sets.
Signature: getUVSetFamilyNames()
Parameters: None.
Returns: tuple of strings
Description:

Returns the names of all of the uv set families on this object. A uv set family is a set of per-instance sets with the same name with each individual set applying to one or more instances. A set which is shared across all instances will be the sole member of its family.

Given a uv set family name, getUVSetsInFamily() may be used to determine the names of the associated individual sets.

OpenMaya.MFnMesh.getUVSetNames ( )
getUVSetNames() -> (string, ...)

Returns the names of all the uv sets on this object.
Signature: getUVSetNames()
Parameters: None.
Returns: tuple of strings
Description: Returns the names of all the uv sets on this object.
OpenMaya.MFnMesh.getUVSetsInFamily ( )
getUVSetsInFamily(familyName) -> (string, ...)

Returns the names of all of the uv sets that belong to the
specified family. Per-instance sets will have multiple sets in a
family, with each individual set applying to one or more instances.
A set which is shared across all instances will be the sole member
of its family and will share the same name as its family.
Signature: getUVSetsInFamily(familyName)
Parameters:
NameTypeDescription
familyName string Name of a UV set family.
Returns: tuple of strings
Description: Returns the names of all of the uv sets that belong to the specified family. Per-instance sets will have multiple sets in a family, with each individual set applying to one or more instances. A set which is shared across all instances will be the sole member of its family and will share the same name as its family.
OpenMaya.MFnMesh.getUvShellsIds ( )
getUvShellsIds(uvSet='') -> (int, MIntArray)

Returns a tuple containing describing how the specified UV set's UVs
are grouped into shells. The first element of the tuple is the number
of distinct shells. The second element of the tuple is an array of
shell indices, one per uv, indicating which shell that uv is part of.
Signature: getUvShellsIds(uvSet='')
Parameters:
NameTypeDescription
uvSet string UV set to use. If not specified then the mesh's current UV set will be used.
Returns: (int, MIntArray)
Description: Returns a tuple containing describing how the specified UV set's UVs are grouped into shells. The first element of the tuple is the number of distinct shells. The second element of the tuple is an array of shell indices, one per uv, indicating which shell that uv is part of.
OpenMaya.MFnMesh.getVertexColors ( )
getVertexColors(colorSet='', defaultUnsetColor=None) -> MColorArray

Gets colors for all vertices of the given colorSet. If no face has
color for that vertex, the entry returned will be defaultUnsetColor.
If a color was set for some or all the faces for that vertex, an
average of those vertex/face values where the color has been set will
be returned.

If the colorSet is not specified, the default color set will be used.
If the defaultUnsetColor is not given, then (-1, -1, -1, -1) will be
used.
Signature: getVertexColors(colorSet='', defaultUnsetColor=None)
Parameters:
NameTypeDescription
colorSet string Name of color set.
defaultUnsetColor MColorArray Color to return for vertices which have no color set.
Returns: MColorArray
Description:

Gets colors for all vertices of the given colorSet. If no face has color for that vertex, the entry returned will be defaultUnsetColor. If a color was set for some or all the faces for that vertex, an average of those vertex/face values where the color has been set will be returned.

If the colorSet is not specified, the default color set will be used. If the defaultUnsetColor is not given, then (-1, -1, -1, -1) will be used.

OpenMaya.MFnMesh.getVertexNormal ( )
getVertexNormal(vertexId, angleWeighted, space=MSpace.kObject) -> MVector

Returns the normal at the given vertex. The returned normal is a
single per-vertex normal, so unshared normals at a vertex will be
averaged.

If angleWeighted is set to true, the normals are computed by an
average of surrounding face normals weighted by the angle subtended
by the face at the vertex. If angleWeighted is set to false, a simple
average of surround face normals is returned.

The simple average evaluation is significantly faster than the angle-
weighted average.

This method is not threadsafe.
Signature: getVertexNormal(vertexId, angleWeighted, space=MSpace.kObject)
Parameters:
NameTypeDescription
vertexId int Mesh-relative/global ID of vertex to set normal for.
angleWeighted bool Should the angle of the face at the vertex affect the normal calculation?
space MSpace constant Coordinate system to use.
Returns: MVector
Description:

Returns the normal at the given vertex.

The returned normal is a single per-vertex normal, so unshared normals at a vertex will be averaged.

If angleWeighted is set to true, the normals are computed by an average of surrounding face normals weighted by the angle subtended by the face at the vertex. If angleWeighted is set to false, a simple average of surround face normals is returned.

The simple average evaluation is significantly faster than the angle-weighted average.

This method is not threadsafe.

OpenMaya.MFnMesh.getVertexNormals ( )
getVertexNormals(angleWeighted, space=MSpace.kObject) -> MFloatVectorArray

Returns all the vertex normals. The returned normals are per-vertex
normals, so unshared normals at a vertex will be averaged.

If angleWeighted is set to True, the normals are computed by an
average of surrounding face normals weighted by the angle subtended
by the face at the vertex. If angleWeighted is set to false, a simple
average of surround face normals is returned.

The simple average evaluation is significantly faster than the angle-
weighted average.

This method is not threadsafe.
Signature: getVertexNormals(angleWeighted, space=MSpace.kObject)
Parameters:
NameTypeDescription
angleWeighted bool Should the angle of the face at the vertex affect the normal calculation?
space MSpace constant Coordinate system to use.
Returns: MFloatVectorArray
Description:

Returns all the vertex normals.

The returned normals are per-vertex normals, so unshared normals at a vertex will be averaged.

If angleWeighted is set to True, the normals are computed by an average of surrounding face normals weighted by the angle subtended by the face at the vertex. If angleWeighted is set to false, a simple average of surround face normals is returned.

The simple average evaluation is significantly faster than the angle-weighted average.

This method is not threadsafe.

OpenMaya.MFnMesh.getVertices ( )
getVertices() -> (MIntArray, MIntArray)

Returns the mesh-relative/global vertex IDs for all of the mesh's
polygons as a tuple of two int arrays. The first array contains the
number of vertices for each polygon and the second contains the mesh-
relative IDs for each polygon-vertex. These IDs can be used to index
into the arrays returned by getPoints() and getFloatPoints().
Signature: getVertices()
Parameters: None.
Returns: (MIntArray, MIntArray)
Description: Returns the mesh-relative/global vertex IDs for all of the mesh's polygons as a tuple of two int arrays. The first array contains the number of vertices for each polygon and the second contains the mesh-relative IDs for each polygon-vertex. These IDs can be used to index into the arrays returned by getPoints() and getFloatPoints().
OpenMaya.MFnMesh.globalIntersectionAcceleratorsInfo ( )
static
globalIntersectionAcceleratorsInfo() -> string

Returns a string that describes the system-wide resource usage for
cached mesh intersection accelerators. The string will be of the
following form:
  total 10 accelerators created (2 currently active - total current memory = 10000KB), total build time = 10.2s, peak memory = 14567.1KB

This means that:

* a total of 10 intersection accelerators have been created as
  instructed by calls to closestIntersection(), allIntersections(),
  or anyIntersection() with non-NULL accelParams values. Thesen  structures are destroyed and re-created when intersection requests
  with differing acceleration parameters are passed in for the same
  mesh, so it is useful to see this value, which is the total count
  of how many have been created. In this case, 8 of the 10 created
  have been destroyed, either automatically or via calls to the
  freeCachedIntersectionAccelerator() method

* the total memory footprint for the 2 accelerators currently in
  existence is 10,000KB

* the total build time for all 10 structures that have been created
  is 10.2 seconds
* the peak of total memory usage for all accelerators in the system
  was 14567.1KB
Calling clearGlobalIntersectionAcceleratorInfo() will clear the
'total count', 'total build time', and 'peak memory' fields from
this information. It will not cause information about currently
existing accelerators to be lost.
Signature: globalIntersectionAcceleratorsInfo()
Parameters: None.
Returns: string
Description:

Returns a string that describes the systemwide resource usage for cached mesh intersection accelerators. The string will be of the following form:

total 10 accelerators created (2 currently active - total current memory = 10000KB), total build time = 10.2s, peak memory = 14567.1KB

This means that:

  • a total of 10 intersection accelerators have been created as instructed by calls to closestIntersection(), allIntersections(), or anyIntersection() with non-NULL accelParams values. These structures are destroyed and re-created when intersection requests with differing acceleration parameters are passed in for the same mesh, so it is useful to see this value, which is the total count of how many have been created. In this case, 8 of the 10 created have been destroyed, either automatically or via calls to the freeCachedIntersectionAccelerator() method
  • the total memory footprint for the 2 accelerators currently in existence is 10,000KB
  • the total build time for all 10 structures that have been created is 10.2 seconds
  • the peak of total memory usage for all accelerators in the system was 14567.1KB

Calling clearGlobalIntersectionAcceleratorInfo() will clear the "total count", "total build time", and "peak memory" fields from this information. It will not cause information about currently existing accelerators to be lost.

OpenMaya.MFnMesh.hasAlphaChannels ( )
hasAlphaChannels(colorSet) -> bool

Returns True if the color set has an alpha channel.
Signature: hasAlphaChannels(colorSet)
Parameters:
NameTypeDescription
colorSet string Name of color set.
Returns: bool
Description: Returns True if the color set has an alpha channel.
OpenMaya.MFnMesh.hasBlindData ( )
hasBlindData(compType, compId=None, blindDataId=None) -> bool

Returns true if any component of the given type on this mesh has
blind data. If a component ID is provided then only that particular
component is checked. If a blind data ID is provided then only blind
data of that type is checked.
Signature: hasBlindData(compType, compId=None, blindDataId=None)
Parameters:
NameTypeDescription
compId int Component ID.
compType MFn Type constant Component type.
blindDataId int Optional blind data type ID.
Returns: bool
Description: Returns true if any component of the given type on this mesh has blind data. If a component ID is provided then only that particular component is checked. If a blind data ID is provided then only blind data of that type is checked.
OpenMaya.MFnMesh.hasColorChannels ( )
hasColorChannels(colorSet) -> bool

Returns True if the color set has RGB channels.
Signature: hasColorChannels(colorSet)
Parameters:
NameTypeDescription
colorSet string Name of color set.
Returns: bool
Description: Returns True if the color set has RGB channels.
def OpenMaya.MFnMesh.intersectFaceAtUV ( )
intersectFaceAtUV(u, v, uvSet='') -> int

Returns the IDs of the UVs on this surface which are nearest
in uv space to the given uv set and coordinate.All these UVs
locate at the same distance to the given coordinate.

This method is not threadsafe.
OpenMaya.MFnMesh.isBlindDataTypeUsed ( )
isBlindDataTypeUsed(blindDataId) -> bool

Returns True if the blind data type is already in use anywhere in the scene.
Signature: isBlindDataTypeUsed(blindDataId)
Parameters:
NameTypeDescription
blindDataId int Blind data type ID.
Returns: bool
Description: Returns True if the blind data type is already in use anywhere in the scene.
OpenMaya.MFnMesh.isColorClamped ( )
isColorClamped(colorSet) -> bool

Returns True if the color sets RGBA components are clamped to the
range 0 to 1.
Signature: isColorClamped(colorSet)
Parameters:
NameTypeDescription
colorSet string Name of color set.
Returns: bool
Description: Returns True if the color sets RGBA components are clamped to the range 0 to 1.
OpenMaya.MFnMesh.isColorSetPerInstance ( )
isColorSetPerInstance(colorSet) -> bool

Returns True if the color set is per-instance, and False if it is
shared across all instances.
Signature: isColorSetPerInstance(colorSet)
Parameters:
NameTypeDescription
name string Name of a color set or color set family.
Returns: bool
Description: Returns True if the color set is per-instance, and False if it is shared across all instances.
OpenMaya.MFnMesh.isEdgeSmooth ( )
isEdgeSmooth(edgeId) -> bool

Returns True if the edge is smooth, False if it is hard.
Signature: isEdgeSmooth(edgeId)
Parameters:
NameTypeDescription
edgeId int Edge to check.
Returns: bool
Description: Returns True if the edge is smooth, False if it is hard.
OpenMaya.MFnMesh.isNormalLocked ( )
isNormalLocked(normalId) -> bool

Returns True if the normal is locked, False otherwise.
Signature: isNormalLocked(normalId)
Parameters:
NameTypeDescription
normalId int Normal to check.
Returns: bool
Description: Returns True if the normal is locked, False otherwise.
OpenMaya.MFnMesh.isPolygonConvex ( )
isPolygonConvex(faceId) -> bool

Returns True if the polygon is convex, False if it is concave.
Signature: isPolygonConvex(faceId)
Parameters:
NameTypeDescription
faceId int Polygon to check.
Returns: bool
Description: Returns True if the polygon is convex, False if it is concave.
def OpenMaya.MFnMesh.isPolygonUVReversed ( )
isPolygonUVReversed(faceId) -> bool

Returns True if the texture coordinates (uv's) for specified polygon are
reversed (clockwise), False if they are not reversed (counter clockwise).
def OpenMaya.MFnMesh.isRightHandedTangent ( )
isRightHandedTangent(tangentId, uvSet='') -> bool

Returns True if the normal, tangent, and binormal form a right handed
coordinate system, False otherwise.
OpenMaya.MFnMesh.isUVSetPerInstance ( )
isUVSetPerInstance(uvSet) -> bool

Returns True if the UV set is per-instance, and False if it is shared
across all instances.
Signature: isUVSetPerInstance(uvSet)
Parameters:
NameTypeDescription
name string Name of a UV set or UV set family.
Returns: bool
Description: Returns True if the UV set is per-instance, and False if it is shared across all instances.
OpenMaya.MFnMesh.lockFaceVertexNormals ( )
lockFaceVertexNormals(seq of faceIds, seq of vertIds) -> self

Locks the normals for the given face/vertex pairs.
Signature: lockFaceVertexNormals(faceIds, vertexIds)
Parameters:
NameTypeDescription
faceIds sequence of ints IDs of faces.
vertexIds sequence of ints Mesh-relative/global IDs of vertices.
Returns: Reference to self
Description: Locks the normals for the given face/vertex pairs.
OpenMaya.MFnMesh.lockVertexNormals ( )
lockVertexNormals(sequence of vertIds) -> self

Locks the shared normals for the specified vertices.
Signature: lockVertexNormals(vertexIds)
Parameters:
NameTypeDescription
vertexIdx sequence of ints Mesh-relative/global indices of vertices.
Returns: Reference to self
Description: Locks the shared normals for the specified vertices.
OpenMaya.MFnMesh.numColors ( )
numColors(colorSet='') -> int

Returns the number of colors in the given color set. If no color set
is specified then the mesh's current color set will be used.
Signature: numColors(colorSet='')
Parameters:
NameTypeDescription
colorSet string Name of color set.
Returns: int
Description: Returns the number of colors in the given color set. If no color set is specified then the mesh's current color set will be used.
OpenMaya.MFnMesh.numUVs ( )
numUVs(uvSet='') -> int

Returns the number of UVs (texture coordinates) in the given UV set.
If no UV set is specified then the mesh's current UV set will be used.
Signature: numUVs(uvSet='')
Parameters:
NameTypeDescription
uvSet string Name of UV set.
Returns: int
Description: Returns the number of UVs (texture coordinates) in the given UV set. If no UV set is specified then the mesh's current UV set will be used.
OpenMaya.MFnMesh.onBoundary ( )
onBoundary(faceId) -> bool

Returns true if the face is on the border of the mesh, meaning that
one or more of its edges is a border edge.
Signature: onBoundary(faceId)
Parameters:
NameTypeDescription
faceId int ID of face.
Returns: bool
Description: Returns true if the face is on the border of the mesh, meaning that one or more of its edges is a border edge.
OpenMaya.MFnMesh.polygonVertexCount ( )
polygonVertexCount(faceId) -> int

Returns the number of vertices in the given polygon. Raises
ValueError if the polygon ID is invalid.
Signature: polygonVertexCount(faceId)
Parameters:
NameTypeDescription
faceId int ID of the polygon
Returns: int
Description: Returns the number of vertices in the given polygon. Raises ValueError if the polygon ID is invalid.
OpenMaya.MFnMesh.removeFaceColors ( )
removeFaceColors(seq of faceIds) -> self

Removes colors from all vertices of the specified faces.
Signature: removeFaceColors(faceIds)
Parameters:
NameTypeDescription
faceIds sequence of ints IDs of faces.
Returns: Reference to self
Description: Removes colors from all vertices of the specified faces.
OpenMaya.MFnMesh.removeFaceVertexColors ( )
removeFaceVertexColors(seq of faceIds, seq of vertexIds) -> self

Removes colors from the specified face/vertex pairs.
Signature: removeFaceVertexColors(faceIds, vertexIds)
Parameters:
NameTypeDescription
faceIds sequence of ints IDs of faces.
vertexIds sequence of ints Mesh-relative/global IDs of vertices.
Returns: Reference to self
Description: Removes colors from the specified face/vertex pairs.
OpenMaya.MFnMesh.removeVertexColors ( )
removeVertexColors(seq of vertexIds) -> self

Removes colors from the specified vertices in all of the faces which
share those vertices.
Signature: removeVertexColors(vertexIds)
Parameters:
NameTypeDescription
vertexIds sequence of ints Mesh-relative/global IDs of vertices.
Returns: Reference to self
Description: Removes colors from the specified vertices in all of the faces which share those vertices.
OpenMaya.MFnMesh.renameUVSet ( )
renameUVSet(origName, newName, modifier=None) -> self

Renames a UV set. The set must exist and the new name cannot be the
same as that of an existing set.

This method is only valid for functionsets which are attached to mesh
nodes, not mesh data.
Signature: renameUVSet(origName, newName, modifier=None)
Parameters:
NameTypeDescription
origName string Original name of UV set.
newName string New name of UV set.
modifier MDGModifier If provided then the rename operation will be added to the modifier and won't take effect until the modifier's doIt() is called. Otherwise it will take effect immediately.
Returns: Reference to self
Description:

Renames a UV set. The set must exist and the new name cannot be the same as that of an existing set.

This method is only valid for functionsets which are attached to mesh nodes, not mesh data.

OpenMaya.MFnMesh.setBinaryBlindData ( )
setBinaryBlindData(compId, compType, blindDataId, attr, data) -> self
setBinaryBlindData(seq of compId, compType, blindDataId, attr, data) -> self

The first version sets the value of a 'binary' blind data attribute
on a single component of the mesh. The data must be a single string.

The second version sets the value of a 'binary' blind data attribute
on multiple components of the mesh. If the data is a sequence of
strings then it must provide a value for each component in compIds.
If it is a single string then all of the specified components will
have their blind data set to that value.
Signature: setBinaryBlindData(compId, compType, blindDataId, attr, data)
Parameters:
NameTypeDescription
compId int Mesh component ID.
compType MFn Type constant Mesh component type.
blindDataId int Blind data type ID.
attr string Attribute name.
data string Data to set.
Returns: Reference to self
Description: Sets the value of a "binary" blind data attribute on a component of the mesh.
Signature: setBinaryBlindData(compIds, compType, blindDataId, attr, data)
Parameters:
NameTypeDescription
compIds sequence of ints Mesh component ID.
compType MFn Type constant Mesh component type.
blindDataId int Blind data type ID.
attr string Attribute name.
data string or sequence of strings Data to set.
Returns: Reference to self
Description: Sets the value of a "binary" blind data attribute on multiple components of the mesh. If the data is a sequence of strings then it must provide a value for each component in compIds. If it is a single string then all of the specified components will have their blind data set to that value.
OpenMaya.MFnMesh.setBoolBlindData ( )
setBoolBlindData(compId, compType, blindDataId, attr, data) -> self
setBoolBlindData(seq of compId, compType, blindDataId, attr, data) -> self

The first version sets the value of a 'boolean' blind data attribute
on a single component of the mesh. The data must be a single boolean.

The second version sets the value of a 'boolean' blind data attribute
on multiple components of the mesh. If the data is a sequence of
booleans then it must provide a value for each component in compIds.
If it is a single boolean then all of the specified components will
have their blind data set to that value.
Signature: setBoolBlindData(compId, compType, blindDataId, attr, data)
Parameters:
NameTypeDescription
compId int Mesh component ID.
compType MFn Type constant Mesh component type.
blindDataId int Blind data type ID.
attr string Attribute name.
data bool or int Data to set.
Returns: Reference to self
Description: Sets the value of a "boolean" blind data attribute on a component of the mesh.
Signature: setBoolBlindData(compIds, compType, blindDataId, attr, data)
Parameters:
NameTypeDescription
compIds sequence of ints Mesh component ID.
compType MFn Type constant Mesh component type.
blindDataId int Blind data type ID.
attr string Attribute name.
data bool or int, or sequence of bools or ints Data to set.
Returns: Reference to self
Description: Sets the value of a "boolean" blind data attribute on multiple components of the mesh. If the data is a sequence then it must provide a value for each component in compIds. If it is a single value then all of the specified components will have their blind data set to that value.
OpenMaya.MFnMesh.setColor ( )
setColor(colorId, MColor, colorSet='', rep=kRGBA) -> self

Sets a color in the specified colorSet. If no colorSet is given the
current colorSet will be used. If the colorId is greater than or
equal to numColors() then the colorSet will be grown to accommodate
the specified color.
Signature: setColor(colorId, color, colorSet='', rep=kRGBA)
Parameters:
NameTypeDescription
colors sequence of MColor's Colors to set.
color MColor Color to set.
colorSet string Name of color set.
rep Color Representation constant Specifies the color channels to set.
Returns: Reference to self
Description: Sets a color in the specified colorSet. If no colorSet is given the current colorSet will be used. If the colorId is greater than or equal to numColors() then the colorSet will be grown to accommodate the specified color.
OpenMaya.MFnMesh.setColors ( )
setColors(seq of MColor, colorSet='', rep=kRGBA) -> self

Sets all the colors of the specified colorSet. If no colorSet is
given the current colorSet will be used. After using this method to
set the color values, you can call assignColors() to assign the
corresponding color ids to the geometry.

The color sequence must be at least as large as the current color set
size. You can determine the color set size by calling numColors() for
the default color set, or numColors(colorSet) for a named color set.
If the sequence is larger than the color set size, then the color set
for this mesh will be expanded to accommodate the new color values.

In order to shrink the colorSet you have to clear its existing
colors. E.g: clearColors(), setColors( ... ), assignColors()
Signature: setColors(colors, colorSet='', rep=kRGBA)
Parameters:
NameTypeDescription
colors sequence of MColor's Colors to set.
colorSet string Name of color set.
rep Color Representation constant Specifies the color channels to set.
Returns: Reference to self
Description:

Sets all the colors of the specified colorSet. If no colorSet is given the current colorSet will be used. After using this method to set the color values, you can call assignColors() to assign the corresponding color ids to the geometry.

The color sequence must be at least as large as the current color set size. You can determine the color set size by calling numColors() for the default color set, or numColors(colorSet) for a named color set. If the sequence is larger than the color set size, then the color set for this mesh will be expanded to accommodate the new color values.

In order to shrink the colorSet you have to clear its existing colors. E.g:

OpenMaya.MFnMesh.setCreaseEdges ( )
setCreaseEdges(edgeIds, seq of float) -> self


Sets the specified edges of the mesh as crease edges.

Please note that to make effective use of the creasing variable in
software outside of Maya may require a license under patents owned by
Pixar(R).
Signature: setCreaseEdges(edgeIds, creaseData)
Parameters:
NameTypeDescription
edgeIds sequence of ints Mesh-relative/global IDs of crease edges.
creaseData sequence of floats Data related to the crease edges.
Returns: Reference to self
Description:

Sets the specified edges of the mesh as crease edges.

Please note that to make effective use of the creasing variable in software outside of Maya may require a license under patents owned by Pixar(R).

OpenMaya.MFnMesh.setCreaseVertices ( )
setCreaseVertices(edgeIds, seq of float) -> self


Sets the specified edges of the mesh as crease edges.

Please note that to make effective use of the creasing variable in
software outside of Maya may require a license under patents owned by
Pixar(R).
Signature: setCreaseVertices(vertexIds, creaseData)
Parameters:
NameTypeDescription
vertexIds sequence of ints Mesh-relative/global IDs of crease vertices.
creaseData sequence of floats Data related to the crease vertices.
Returns: Reference to self
Description:

Sets the specified vertices of the mesh as crease vertices.

Please note that to make effective use of the creasing variable in software outside of Maya may require a license under patents owned by Pixar(R).

OpenMaya.MFnMesh.setCurrentColorSetName ( )
setCurrentColorSetName(colorSet, modifier=None, currentSelection=None) -> self

Sets the 'current' color set for this object. The current color set
is the one used when no color set name is specified for a color
operation. If the specified color set does not exist then the current
color set will not be changed.

If 'modifier' (MDGModifier) is provided then the operation will be
added to the modifier and will not take effect until the modifier's
doIt() is called. Otherwise it will take effect immediately.

This method may change the current selection. If the 'currentSelection'
(MSelectionList) parameter is provided then the current selection
will be saved to it prior to the change. This is useful for
supporting full undo of the change.

This method is only valid for functionsets which are attached to mesh
nodes, not mesh data.
Signature: setCurrentColorSetName(colorSet, modifier=None, currentSelection=None)
Parameters:
NameTypeDescription
colorSet string Name of the color set.
modifier MDGModifier If provided then the deletion will be added to the modifier and won't take effect until the modifier's doIt() is called. Otherwise it will take effect immediately.
currentSelection MSelectionList This method may change the selection list. To aid in supporting undo, if this parameter is supplied it will be set to the active selection prior to the change.
Returns: Reference to self
Description:

Sets the "current" color set for this object. The current color set is the one used when no color set name is specified for a color operation. If the specified color set does not exist then the current color set will not be changed.

This method is only valid for functionsets which are attached to mesh nodes, not mesh data.

OpenMaya.MFnMesh.setCurrentUVSetName ( )
setCurrentUVSetName(uvSet, modifier=None, currentSelection=None) -> self

Sets the 'current' uv set for this object. The current uv set is the
one used when no uv set name is specified for a uv operation. If the
specified uv set does not exist then the current uv set will not be
changed.

If 'modifier' (MDGModifier) is provided then the operation will be
added to the modifier and will not take effect until the modifier's
doIt() is called. Otherwise it will take effect immediately.

This method may change the current selection. If the 'currentSelection'
(MSelectionList) parameter is provided then the current selection
will be saved to it prior to the change. This is useful for
supporting full undo of the change.

This method is only valid for functionsets which are attached to mesh
nodes, not mesh data.
Signature: setCurrentUVSetName(uvSet, modifier=None, currentSelection=None)
Parameters:
NameTypeDescription
uvSet string Name of the uv set.
modifier MDGModifier If provided then the deletion will be added to the modifier and won't take effect until the modifier's doIt() is called. Otherwise it will take effect immediately.
currentSelection MSelectionList This method may change the selection list. To aid in supporting undo, if this parameter is supplied it will be set to the active selection prior to the change.
Returns: Reference to self
Description:

Sets the "current" uv set for this object. The current uv set is the one used when no uv set name is specified for a uv set operation. If the specified uv set does not exist then the current uv set will not be changed.

This method is only valid for functionsets which are attached to mesh nodes, not mesh data.

OpenMaya.MFnMesh.setDoubleBlindData ( )
setDoubleBlindData(compId, compType, blindDataId, attr, data) -> self
setDoubleBlindData(seq of compId, compType, blindDataId, attr, data) -> self

The first version sets the value of a 'double' blind data attribute
on a single component of the mesh. The data must be a single float.

The second version sets the value of a 'double' blind data attribute
on multiple components of the mesh. If the data is a sequence of
floats then it must provide a value for each component in compIds.
If it is a single float then all of the specified components will
have their blind data set to that value.
Signature: setDoubleBlindData(compId, compType, blindDataId, attr, data)
Parameters:
NameTypeDescription
compId int Mesh component ID.
compType MFn Type constant Mesh component type.
blindDataId int Blind data type ID.
attr string Attribute name.
data float Data to set.
Returns: Reference to self
Description: Sets the value of a "double" blind data attribute on a component of the mesh.
Signature: setDoubleBlindData(compIds, compType, blindDataId, attr, data)
Parameters:
NameTypeDescription
compIds sequence of ints Mesh component ID.
compType MFn Type constant Mesh component type.
blindDataId int Blind data type ID.
attr string Attribute name.
data float or sequence of floats Data to set.
Returns: Reference to self
Description: Sets the value of a "double" blind data attribute on multiple components of the mesh. If the data is a sequence then it must provide a value for each component in compIds. If it is a single value then all of the specified components will have their blind data set to that value.
OpenMaya.MFnMesh.setEdgeSmoothing ( )
setEdgeSmoothing(edgeId, smooth=True) -> self

Sets the specified edge to be hard or smooth. You must use the
cleanupEdgeSmoothing() method after all the desired edges on your
mesh have had setEdgeSmoothing() done. Use the updateSurface() method
to indicate the mesh needs to be redrawn.
Signature: setEdgeSmoothing(edgeId, smooth=True)
Parameters:
NameTypeDescription
edgeId int Mesh-relative/global ID of edge.
smooth bool If True the edge will be smooth, otherwise it will be hard.
Returns: Reference to self
Description:

Sets the specified edge to be hard or smooth.

You must use the cleanupEdgeSmoothing() method after all the desired edges on your mesh have had setEdgeSmoothing() done. Use the updateSurface() method to indicate the mesh needs to be redrawn.

def OpenMaya.MFnMesh.setEdgeSmoothings ( )
setEdgeSmoothings(edgeIds, smooths) -> self

Sets the specified edges to be hard or smooth. You must use the
cleanupEdgeSmoothing() method after all the desired edges on your
mesh have had setEdgeSmoothings() done. Use the updateSurface() method
to indicate the mesh needs to be redrawn.
OpenMaya.MFnMesh.setFaceColor ( )
setFaceColor(color, faceId, rep=kRGBA) -> self

Sets the face-vertex color for all vertices on this face.
Signature: setFaceColor(color, faceId, rep=kRGBA)
Parameters:
NameTypeDescription
color MColor Color to set.
faceId int ID of face.
rep Color Representation constant Specifies the color channels to set.
Returns: Reference to self
Description: Sets the face-vertex color for all vertices on this face.
OpenMaya.MFnMesh.setFaceColors ( )
setFaceColors(colors, faceIds, rep=kRGBA) -> self

Sets the colors of the specified faces. For each face in the faceIds
sequence the corresponding color from the colors sequence will be
applied to all of its vertices.
Signature: setFaceColors(colors, faceIds, rep=kRGBA)
Parameters:
NameTypeDescription
colors sequence of MColor's Colors to set.
faceIds sequence of ints IDs of faces.
rep Color Representation constant Specifies the color channels to set.
Returns: Reference to self
Description: Sets the colors of the specified faces. For each face in the faceIds sequence the corresponding color from the colors sequence will be applied to all of its vertices.
OpenMaya.MFnMesh.setFaceVertexColor ( )
setFaceVertexColor(color, faceId, vertexId, modifier=None, rep=kRGBA) -> self

Sets a face-specific normal at a vertex.

If 'modifier' (MDGModifier) is provided then the operation will be
added to the modifier and will not take effect until the modifier's
doIt() is called. Otherwise it will take effect immediately.
Signature: setFaceVertexColor(color, faceId, vertexId, modifier=None, rep=kRGBA)
Parameters:
NameTypeDescription
color MColor Color to set.
faceId int ID of face.
vertexId int Mesh-relative/global ID of vertex.
modifier MDGModifier If specified, and the functionset is attached to a mesh node (as opposed to mesh data), then the operation will be added to the modifier and will not take effect until the modifier's doIt() is called. Otherwise, it will take effect immediately.
rep Color Representation constant Specifies the color channels to set.
Returns: Reference to self
Description: Sets a face-specific normal at a vertex.
OpenMaya.MFnMesh.setFaceVertexColors ( )
setFaceVertexColors(colors, faceIds, vertexIds, modifier=None, rep=kRGBA) -> self

Sets the colors of the specified face/vertex pairs.

If 'modifier' (MDGModifier) is provided then the operation will be
added to the modifier and will not take effect until the modifier's
doIt() is called. Otherwise it will take effect immediately.
Signature: setFaceVertexColors(colors, faceIds, vertexIds, modifier=None, rep=kRGBA)
Parameters:
NameTypeDescription
colors sequence of MColor's Colors to set.
faceIds sequence of ints IDs of faces.
vertexIds sequence of ints Mesh-relative/global IDs of vertices.
modifier MDGModifier If specified, and the functionset is attached to a mesh node (as opposed to mesh data), then the operation will be added to the modifier and will not take effect until the modifier's doIt() is called. Otherwise, it will take effect immediately.
rep Color Representation constant Specifies the color channels to set.
Returns: Reference to self
Description: Sets the colors of the specified face/vertex pairs.
OpenMaya.MFnMesh.setFaceVertexNormal ( )
setFaceVertexNormal(normal, faceId, vertexId, space=MSpace.kObject, modifier=None) -> self

Sets a face-specific normal at a vertex.

If 'modifier' (MDGModifier) is provided then the operation will be
added to the modifier and will not take effect until the modifier's
doIt() is called. Otherwise it will take effect immediately.
Signature: setFaceVertexNormal(normal, faceId, vertexId, space=MSpace.kObject, modifier=None)
Parameters:
NameTypeDescription
normal MVector New normal value.
faceId int Face to set normal for.
vertexId int Mesh-relative/global ID of vertex to set normal for.
space MSpace constant Coordinate system in which the normal is specified.
modifier MDGModifier If specified, and the functionset is attached to a mesh node (as opposed to mesh data), an operation will be added to the modifier and the new normal will not be set until the modifier's doIt() is called. Otherwise, the new normal will be set immediately.
Returns: Reference to self
Description: Sets a face-specific normal at a vertex.
OpenMaya.MFnMesh.setFaceVertexNormals ( )
setFaceVertexNormal(normals, faceIds, vertexIds, space=MSpace.kObject) -> self

Sets normals for the given face/vertex pairs.
Signature: setFaceVertexNormals(normals, faceIds, vertexIds, space=MSpace.kObject)
Parameters:
NameTypeDescription
normals sequence of MVector's New normal values.
faceIds sequence of ints IDs of faces to set normal for.
vertexIds sequence of ints Mesh-relative/global IDs of vertices to set normal for.
space MSpace constant Coordinate system in which the normal is specified.
Returns: Reference to self
Description: Sets normals for the given face/vertex pairs.
OpenMaya.MFnMesh.setFloatBlindData ( )
setFloatBlindData(compId, compType, blindDataId, attr, data) -> self
setFloatBlindData(seq of compId, compType, blindDataId, attr, data) -> self

The first version sets the value of a 'float' blind data attribute
on a single component of the mesh. The data must be a single float.

The second version sets the value of a 'float' blind data attribute
on multiple components of the mesh. If the data is a sequence of
floats then it must provide a value for each component in compIds.
If it is a single float then all of the specified components will
have their blind data set to that value.
Signature: setFloatBlindData(compId, compType, blindDataId, attr, data)
Parameters:
NameTypeDescription
compId int Mesh component ID.
compType MFn Type constant Mesh component type.
blindDataId int Blind data type ID.
attr string Attribute name.
data float Data to set.
Returns: Reference to self
Description: Sets the value of a "float" blind data attribute on a component of the mesh.
Signature: setFloatBlindData(compIds, compType, blindDataId, attr, data)
Parameters:
NameTypeDescription
compIds sequence of ints Mesh component ID.
compType MFn Type constant Mesh component type.
blindDataId int Blind data type ID.
attr string Attribute name.
data float or sequence of floats Data to set.
Returns: Reference to self
Description: Sets the value of a "float" blind data attribute on multiple components of the mesh. If the data is a sequence then it must provide a value for each component in compIds. If it is a single value then all of the specified components will have their blind data set to that value.
OpenMaya.MFnMesh.setIntBlindData ( )
setIntBlindData(compId, compType, blindDataId, attr, data) -> self
setIntBlindData(seq of compId, compType, blindDataId, attr, data) -> self

The first version sets the value of a 'int' blind data attribute
on a single component of the mesh. The data must be a single int.

The second version sets the value of a 'int' blind data attribute
on multiple components of the mesh. If the data is a sequence of
ints then it must provide a value for each component in compIds.
If it is a single int then all of the specified components will
have their blind data set to that value.
Signature: setIntBlindData(compId, compType, blindDataId, attr, data)
Parameters:
NameTypeDescription
compId int Mesh component ID.
compType MFn Type constant Mesh component type.
blindDataId int Blind data type ID.
attr string Attribute name.
data int Data to set.
Returns: Reference to self
Description: Sets the value of an "int" blind data attribute on a component of the mesh.
Signature: setIntBlindData(compIds, compType, blindDataId, attr, data)
Parameters:
NameTypeDescription
compIds sequence of ints Mesh component ID.
compType MFn Type constant Mesh component type.
blindDataId int Blind data type ID.
attr string Attribute name.
data int or sequence of ints Data to set.
Returns: Reference to self
Description: Sets the value of an "int" blind data attribute on multiple components of the mesh. If the data is a sequence then it must provide a value for each component in compIds. If it is a single value then all of the specified components will have their blind data set to that value.
OpenMaya.MFnMesh.setInvisibleFaces ( )
setInvisibleFaces(faceIds, makeVisible=False) -> self

Sets the specified faces of the mesh to be visible or invisible. See
the getInvisibleFaces() method for a description of invisible faces.
Signature: setInvisibleFaces(faceIds, makeVisible=False)
Parameters:
NameTypeDescription
faceIds sequence of ints IDs of faces.
makeVisible bool If True the specified faces will be made visible, otherwise they will be made invisible.
Returns: Reference to self
Description: Sets the specified faces of the mesh to be visible or invisible. See the getInvisibleFaces() method for a description of invisible faces.
OpenMaya.MFnMesh.setIsColorClamped ( )
setIsColorClamped(colorSet, clamped) -> self

Sets whether the color set's RGBA components should be clamped to the
range 0 to 1.
Signature: setIsColorClamped(colorSet, clamped)
Parameters:
NameTypeDescription
colorSet string Name of color set.
clamped bool True if the components should be clamped, False if not.
Returns: Reference to self
Description: Sets whether the color set's RGBA components should be clamped to the range 0 to 1.
OpenMaya.MFnMesh.setNormals ( )
setNormals(normals, space=MSpace.kObject) -> self

Sets the mesh's normals (user normals).
Signature: setNormals(normals, space=MSpace.kObject)
Parameters:
NameTypeDescription
normals sequence of MFloatVector New normal values.
space MSpace constant Coordinate system in which the normals are specified.
Returns: Reference to self
Description: Sets the mesh's normals (user normals).
OpenMaya.MFnMesh.setPoint ( )
setPoint(vertexId, MPoint, space=MSpace.kObject) -> self

Sets the position of specified vertex.

Note that if you modify the position of a vertex for a mesh node (as
opposed to mesh data), a tweak will be created. If you have a node
with no history, the first time that a tweak is created, the
underlying pointers under the MFnMesh object may change. You will
need to call syncObject() to make sure that the object is valid.
Subsequent calls to setPoint() on the same object do not require a
syncObject() call.
Signature: setPoint(vertexId, point, space=MSpace.kObject)
Parameters:
NameTypeDescription
vertexId int Mesh-relative/global index of the vertex to be changed.
point MPoint New position of the vertex.
space MSpace constant Coordinate system in which the point is specified.
Returns: Reference to self
Description:

Sets the position of specified vertex.

Note that if you modify the position of a vertex for a mesh node (as opposed to mesh data), a tweak will be created. If you have a node with no history, the first time that a tweak is created, the underlying pointers under the MFnMesh object may change. You will need to call syncObject() to make sure that the object is valid. Subsequent calls to setPoint() on the same object do not require a syncObject() call.

OpenMaya.MFnMesh.setPoints ( )
setPoints(points, space=MSpace.kObject) -> self

Sets the positions of the mesh's vertices. The positions may be
given as a sequence of MFloatPoint's or a sequence of MPoint's, but
not a mix of the two.
Signature: setPoints(points, space=MSpace.kObject)
Parameters:
NameTypeDescription
points sequence of MPoint or MFloatPoint Vertex positions to set.
space MSpace constant Coordinate system in which the points are specified.
Returns: Reference to self
Description: Sets the positions of the mesh's vertices.
OpenMaya.MFnMesh.setSmoothMeshDisplayOptions ( )
setSmoothMeshDisplayOptions(MMeshSmoothOptions) -> self

Sets the options to use when smoothing the mesh for display.
Signature: setSmoothMeshDisplayOptions(options)
Parameters:
NameTypeDescription
options MMeshSmoothOptions Smoothing options to set.
Returns: Reference to self
Description: Sets the options to use when smoothing the mesh for display.
OpenMaya.MFnMesh.setSomeColors ( )
setSomeColors(colorIds, colors, colorSet='', rep=kRGBA) -> self

Sets specific colors in a colorSet.

If the largest colorId in the sequence is larger than numColors()
then the colorSet will be grown to accommodate the new color values.
If you have added new colorIds, you can call assignColors to assign
the colorIds to the geometry. If you are modifying existing colors,
they will already be referenced by the existing mesh data.
Signature: setSomeColors(colorIds, colors, colorSet='', rep=kRGBA)
Parameters:
NameTypeDescription
colorIds sequence of ints IDs of colors to set.
colors sequence of MColor's Colors to set.
colorSet string Name of color set.
rep Color Representation constant Specifies the color channels to set.
Returns: Reference to self
Description:

Sets selected colors in a colorSet.

If the largest colorId in the sequence is larger than numColors() then the colorSet will be grown to accommodate the new color values. If you have added new colorIds, you can call assignColors to assign the colorIds to the geometry. If you are modifying existing colors, they will already be referenced by the existing mesh data.

OpenMaya.MFnMesh.setSomeUVs ( )
setSomeUVs(uvIds, uValues, vValues, uvSet='') -> self

Sets the specified texture coordinates (uv's) for this mesh. The uv
value sequences and the uvIds sequence must all be of equal size. If
the largest uvId in the array is larger than numUVs() then the uv
list for this mesh will be grown to accommodate the new uv values.
If a named uv set is given, the array will be grown when the largest
uvId is larger than numUVs(uvSet).

If you have added new uvIds, you must call one of the assignUV
methods to assign the uvIds to the geometry. If you are modifying
existing UVs, you do not need to call one of the assignUV methods.
Signature: setSomeUVs(uvIds, uValues, vValues, uvSet='')
Parameters:
NameTypeDescription
uvIds sequence of ints Indices of the UVs to be set.
uValues sequence of floats U components of UV values to set.
vValues sequence of floats V components of UV values to set.
uvSet string Name of UV set to use. If not provided then the current UV set will be used.
Returns: Reference to self
Description:

Sets the specified texture coordinates (uv's) for this mesh. The uv value sequences and the uvIds sequence must all be of equal size. If the largest uvId in the array is larger than numUVs() then the uv list for this mesh will be grown to accommodate the new uv values. If a named uv set is given, the array will be grown when the largest uvId is larger than numUVs(uvSet).

If you have added new uvIds, you must call one of the assignUV methods to assign the uvIds to the geometry. If you are modifying existing UVs, you do not need to call one of the assignUV methods.

OpenMaya.MFnMesh.setStringBlindData ( )
setStringBlindData(compId, compType, blindDataId, attr, data) -> self
setStringBlindData(seq of compId, compType, blindDataId, attr, data) -> self

The first version sets the value of a 'string' blind data attribute
on a single component of the mesh. The data must be a single string.

The second version sets the value of a 'string' blind data attribute
on multiple components of the mesh. If the data is a sequence of
strings then it must provide a value for each component in compIds.
If it is a single string then all of the specified components will
have their blind data set to that value.
Signature: setStringBlindData(compId, compType, blindDataId, attr, data)
Parameters:
NameTypeDescription
compId int Mesh component ID.
compType MFn Type constant Mesh component type.
blindDataId int Blind data type ID.
attr string Attribute name.
data string Data to set.
Returns: Reference to self
Description: Sets the value of a "string" blind data attribute on a component of the mesh.
Signature: setStringBlindData(compIds, compType, blindDataId, attr, data)
Parameters:
NameTypeDescription
compIds sequence of ints Mesh component ID.
compType MFn Type constant Mesh component type.
blindDataId int Blind data type ID.
attr string Attribute name.
data string or sequence of strings Data to set.
Returns: Reference to self
Description: Sets the value of a "string" blind data attribute on multiple components of the mesh. If the data is a sequence of strings then it must provide a value for each component in compIds. If it is a single string then all of the specified components will have their blind data set to that value.
OpenMaya.MFnMesh.setUV ( )
setUV(uvId, u, v, uvSet='') -> self

Sets the specified texture coordinate.

The uvId is the element in the uv list that will be set. If the uvId
is greater than or equal to numUVs() then the uv list will be grown
to accommodate the specified uv. If the UV being added is new, thenyou must call one of the assignUV methods in order to update the
geometry.
Signature: setUV(uvId, u, v, uvSet='')
Parameters:
NameTypeDescription
uvId int Index of UV to element to set.
u float New u value to set.
v float New v value to set.
uvSet string Name of UV set to use. If not provided then the current UV set will be used.
Returns: Reference to self
Description:

Sets the specified texture coordinate.

The uvId is the element in the uv list that will be set. If the uvId is greater than or equal to numUVs() then the uv list will be grown to accommodate the specified uv. If the UV being added is new, then you must call one of the assignUV methods in order to update the geometry.

OpenMaya.MFnMesh.setUVs ( )
setUVs(uValues, vValues, uvSet='') -> self

Sets all of the texture coordinates (uv's) for this mesh. The uv
value sequences must be of equal size and must be at least as large
as the current UV set size. You can determine the UV set size by
calling numUVs() for the default UV set, or numUVs(uvSet) for a
named UV set.

If the sequences are larger than the UV set size, then the uv list
for this mesh will be grown to accommodate the new uv values.

After using this method to set the UV values, you must call one of
the assignUV methods to assign the corresponding UV ids to the
geometry.

In order to shrink the uvs array, do the following: clearUVs(),
setUVs(...), assignUVs(). These steps will let you to create an
array of uvs which is smaller than the original one.
Signature: setUVs(uValues, vValues, uvSet='')
Parameters:
NameTypeDescription
uValues sequence of floats U components of UV values to set.
vValues sequence of floats V components of UV values to set.
uvSet string Name of UV set to use. If not provided then the current UV set will be used.
Returns: Reference to self
Description:

Sets all of the texture coordinates (uv's) for this mesh. The uv value sequences must be of equal size and must be at least as large as the current UV set size. You can determine the UV set size by calling numUVs() for the default UV set, or numUVs(uvSet) for a named UV set.

If the sequences are larger than the UV set size, then the uv list for this mesh will be grown to accommodate the new uv values.

After using this method to set the UV values, you must call one of the assignUV methods to assign the corresponding UV ids to the geometry.

In order to shrink the uvs array, do the following:

These steps will let you to create an array of uvs which is smaller than the original one.

OpenMaya.MFnMesh.setVertexColor ( )
setVertexColor(color, vertexId, modifier=None, rep=kRGBA) -> self

Sets the color for a vertex in all the faces which share it.

If 'modifier' (MDGModifier) is provided then the operation will be
added to the modifier and will not take effect until the modifier's
doIt() is called. Otherwise it will take effect immediately.
Signature: setVertexColor(color, vertexId, modifier=None, rep=kRGBA)
Parameters:
NameTypeDescription
color MColor Color to set.
vertexId int Mesh-relative/global ID of vertex.
modifier MDGModifier If specified, and the functionset is attached to a mesh node (as opposed to mesh data), then the operation will be added to the modifier and will not take effect until the modifier's doIt() is called. Otherwise, it will take effect immediately.
rep Color Representation constant Specifies the color channels to set.
Returns: Reference to self
Description: Sets the color for a vertex in all the faces which share it.
OpenMaya.MFnMesh.setVertexColors ( )
setVertexColors(colors, vertexIds, modifier=None, rep=kRGBA) -> self

Sets the colors of the specified vertices. For each vertex in the
vertexIds sequence, the corresponding color from the colors sequence
will be applied to the vertex in all of the faces which share it.

If 'modifier' (MDGModifier) is provided then the operation will be
added to the modifier and will not take effect until the modifier's
doIt() is called. Otherwise it will take effect immediately.
Signature: setVertexColors(colors, vertexIds, modifier=None, rep=kRGBA)
Parameters:
NameTypeDescription
color sequence of MColor's Colors to set.
vertexIds sequence of ints Mesh-relative/global IDs of vertices.
modifier MDGModifier If specified, and the functionset is attached to a mesh node (as opposed to mesh data), then the operation will be added to the modifier and will not take effect until the modifier's doIt() is called. Otherwise, it will take effect immediately.
rep Color Representation constant Specifies the color channels to set.
Returns: Reference to self
Description: Sets the colors of the specified vertices. For each vertex in the vertexIds sequence, the corresponding color from the colors sequence will be applied to the vertex in all of the faces which share it.
OpenMaya.MFnMesh.setVertexNormal ( )
setVertexNormal(normal, vertexId, space=MSpace.kObject, modifier=None) -> self

Sets the shared normal at a vertex.

If 'modifier' (MDGModifier) is provided then the operation will be
added to the modifier and will not take effect until the modifier's
doIt() is called. Otherwise it will take effect immediately.
Signature: setVertexNormal(normal, vertexId, space=MSpace.kObject, modifier=None)
Parameters:
NameTypeDescription
normal MVector New normal value.
vertexId int Mesh-relative/global ID of vertex to set normal for.
space MSpace constant Coordinate system in which the normal is specified.
modifier MDGModifier If specified, and the functionset is attached to a mesh node (as opposed to mesh data), an operation will be added to the modifier and the new normal will not be set until the modifier's doIt() is called. Otherwise, the new normal will be set immediately.
Returns: Reference to self
Description: Sets the shared normal at a vertex.
OpenMaya.MFnMesh.setVertexNormals ( )
setVertexNormal(normals, vertexIds, space=MSpace.kObject) -> self

Sets the shared normals for the given vertices.
Signature: setVertexNormals(normals, vertexIds, space=MSpace.kObject)
Parameters:
NameTypeDescription
normals sequence of MVector's New normal values.
vertexIds sequence of ints Mesh-relative/global IDs of vertices to set normals for.
space MSpace constant Coordinate system in which the normal is specified.
Returns: Reference to self
Description: Sets the shared normals for the given vertices.
OpenMaya.MFnMesh.sortIntersectionFaceTriIds ( )
sortIntersectionFaceTriIds(faceIds, triIds=none) -> self

Convenience routine for sorting faceIds or face/triangle ids before
passing them into the closestIntersection(), allIntersections(), or
anyIntersection() methods. When using an acceleration structure with
an intersection operation it is essential that any faceId or
faceId/triId arrays be sorted properly to ensure optimal performance.

Both arguments must be MIntArray's.
Signature: sortIntersectionFaceTriIds(faceIds, triIds=none)
Parameters:
NameTypeDescription
faceIds MIntArray Face IDs to be sorted.
triIds MIntArray
Face-relative triangle IDs to be sorted. If present the array must be the same length as the faceIds array and the two are taken together as (faceId, triId) pairs.
Returns: Reference to self
Description: Convenience routine for sorting faceIds or face/triangle ids before passing them into the closestIntersection(), allIntersections(), or anyIntersection() methods. When using an acceleration structure with an intersection operation it is essential that any faceId or faceId/triId arrays be sorted properly to ensure optimal performance.
OpenMaya.MFnMesh.split ( )
split(((kOnEdge, int, float), (kInternalPoint, MFloatPoint), ...)) -> self

Each tuple in the placements sequence consists of a Split Placement
constant followed by one or two parameters.

If the Split Placement is kOnEdge then the tuple will contain two
more elements giving the int id of the edge to split, and a float
value between 0 and 1 indicating how far along the edge to do the
split. The same edge cannot be split more than once per call.

If the Split Placement is kInternalPoint then the tuple will contain
just one more element giving an MFloatPoint within the face.

All splits must begin and end on an edge meaning that the first and
last tuples in the placements sequence must be kOnEdge placements.
Signature: split(placements)
Parameters:
NameTypeDescription
placements sequence of tuples Describes how to place each point of the split.
Returns: Reference to self
Description:

Each tuple in the placements sequence consists of a Split Placement constant followed by one or two parameters.

If the Split Placement is kOnEdge then the tuple will contain two more elements giving the int id of the edge to split, and a float value between 0 and 1 indicating how far along the edge to do the split. The same edge cannot be split more than once per call.

If the Split Placement is kInternalPoint then the tuple will contain just one more element giving an MFloatPoint within the face.

All splits must begin and end on an edge meaning that the first and last tuples in the placements sequence must be kOnEdge placements.

OpenMaya.MFnMesh.subdivideEdges ( )
subdivideEdges(edges, numDivisions) -> self

Subdivides edges at regular intervals. For example, if numDivisions
is 2 then two equally-spaced vertices will be added to each of the
specified edges: one 1/3 of the way along the edge and a second 2/3
of the way along the edge.
Signature: subdivideEdges(edges, numDivisions)
Parameters:
NameTypeDescription
edges sequence of ints IDs of edges to be subdivided.
numDivisions int Number of times to subdivide each edge.
Returns: Reference to self
Description:

Subdivides edges at regular intervals.

For example, if numDivisions is 2 then two equally-spaced vertices will be added to each of the specified edges: one 1/3 of the way along the edge and a second 2/3 of the way along the edge.

OpenMaya.MFnMesh.subdivideFaces ( )
subdivideFaces(faces, numDivisions) -> self

Subdivides each specified face into a grid of smaller faces.
Triangles are subdivided into a grid of smaller triangles and quads
are subdivided into a grid of smaller quads. Faces with more than
four edges are ignored.

The numDivisions parameter tells how many times to subdivide each
edge of the face. Internal points and edges are introduced as needed
to create a grid of smaller faces.
Signature: subdivideFaces(faces, numDivisions)
Parameters:
NameTypeDescription
faces sequence of ints IDs of faces to be subdivided.
numDivisions int Number of times to subdivide the edges of each face.
Returns: Reference to self
Description:

Subdivides each specified face into a grid of smaller faces. Triangles are subdivided into a grid of smaller triangles and quads are subdivided into a grid of smaller quads. Faces with more than four edges are ignored.

The numDivisions parameter tells how many times to subdivide each edge of the face. Internal points and edges are introduced as needed to create a grid of smaller faces.

OpenMaya.MFnMesh.syncObject ( )
syncObject() -> self

If a non-api operation happens that many have changed the
underlying Maya object attached to this functionset, calling this
method will make sure that the functionset picks up those changes.
In particular this call should be used after calling mel commands
which might affect the mesh. Note that this only applies when the
functionset is attached to a mesh node. If it's attached to mesh
data the it is not necessary to call this method.
Signature: syncObject()
Parameters: None.
Returns: Reference to self
Description: If a non-api operation happens that many have changed the underlying Maya object attached to this functionset, calling this method will make sure that the functionset picks up those changes. In particular this call should be used after calling mel commands which might affect the mesh. Note that this only applies when the functionset is attached to a mesh node. If it's attached to mesh data the it is not necessary to call this method.
OpenMaya.MFnMesh.uniformGridParams ( )
static
uniformGridParams(xDiv, yDiv, zDiv) -> MMeshIsectAccelParams

Creates an object which specifies a uniform voxel grid structure
which can be used by the intersection routines to speed up their
operation. This object specifies the number of voxel cells to be
used in the x, y, and z dimensions. The grid acceleration structure
will be cached with the mesh, so that if the same MMeshIsectAccelParams
configuration is used on the next intersect call, the acceleration
structure will not need to be rebuilt.
Signature: uniformGridParams(xDiv, yDiv, zDiv)
Parameters:
NameTypeDescription
xDiv int Number of voxels in x direction
yDiv int Number of voxels in y direction
zDiv int Number of voxels in z direction
Returns: MMeshIsectAccelParams
Description: Creates an object which specifies a uniform voxel grid structure which can be used by the intersection routines to speed up their operation. This object specifies the number of voxel cells to be used in the x, y, and z dimensions. The grid acceleration structure will be cached with the mesh, so that if the same MMeshIsectAccelParams configuration is used on the next intersect call, the acceleration structure will not need to be rebuilt.
OpenMaya.MFnMesh.unlockFaceVertexNormals ( )
unlockFaceVertexNormals(seq of faceIds, seq of vertIds) -> self

Unlocks the normals for the given face/vertex pairs.
Signature: unlockFaceVertexNormals(faceIds, vertexIds)
Parameters:
NameTypeDescription
faceIds sequence of ints IDs of faces.
vertexIds sequence of ints Mesh-relative/global IDs of vertices.
Returns: Reference to self
Description: Unlocks the normals for the given face/vertex pairs.
OpenMaya.MFnMesh.unlockVertexNormals ( )
unlockVertexNormals(sequence of vertIds) -> self

Unlocks the shared normals for the specified vertices.
Signature: unlockVertexNormals(vertexIds)
Parameters:
NameTypeDescription
vertexIdx sequence of ints Mesh-relative/global indices of vertices.
Returns: Reference to self
Description: Unlocks the shared normals for the specified vertices.
OpenMaya.MFnMesh.updateSurface ( )
updateSurface() -> self

Signal that this polygonal mesh has changed and needs to be redrawn.
Signature: updateSurface()
Parameters: None.
Returns: Reference to self
Description: Signal that this polygonal mesh has changed and needs to be redrawn.

Member Data Documentation

OpenMaya.MFnMesh.kAlpha = 1
static
Name: kAlpha
Type: int
Description: Alpha only.
OpenMaya.MFnMesh.kDifference = 2
static
Name: kDifference
Type: int
Description: Boolean difference.
OpenMaya.MFnMesh.kInstanceUnspecified = -1
static
Name: kInstanceUnspecified
Type: int
Description: Used to specify non-instance-specific UVSets.
OpenMaya.MFnMesh.kInternalPoint = 1
static
Name: kInternalPoint
Type: int
Description: Split at a point within a face.
OpenMaya.MFnMesh.kIntersection = 3
static
Name: kIntersection
Type: int
Description: Boolean intersection.
OpenMaya.MFnMesh.kIntersectTolerance = 1
static
Name: kIntersectTolerance
Type: float
Description: Default tolerance for mesh intersection calculations.
OpenMaya.MFnMesh.kInvalid = 2
static
Name: kInvalid
Type: int
Description: Invalid placement type.
OpenMaya.MFnMesh.kOnEdge = 0
static
Name: kOnEdge
Type: int
Description: Split at a position along an edge.
OpenMaya.MFnMesh.kPointTolerance = 1
static
Name: kPointTolerance
Type: float
Description: Default tolerance when comparing points.
OpenMaya.MFnMesh.kRGB = 3
static
Name: kRGB
Type: int
Description: Red, green and blue only.
OpenMaya.MFnMesh.kRGBA = 4
static
Name: kRGBA
Type: int
Description: Red, green, blue and alpha.
OpenMaya.MFnMesh.kUnion = 1
static
Name: kUnion
Type: int
Description: Boolean union.

Property Documentation

OpenMaya.MFnMesh.checkSamePointTwice = property(...)
static
 Controls whether polygons created or added through the functionset
 are checked for duplicate points.
Name: checkSamePointTwice
Type: bool
Access: RW
Description: Controls whether polygons created or added through the functionset are checked for duplicate points.
OpenMaya.MFnMesh.displayColors = property(...)
static
 Determines if the mesh's colors are displayed. Attempting to turn
 color display on when the functionset is attached to mesh data (as
 opposed to a mesh node) will raise TypeError.
Name: displayColors
Type: bool
Access: RW
Description: Determines if the mesh's colors are displayed. Attempting to turn color display on when the functionset is attached to mesh data (as opposed to a mesh node) will raise TypeError.
OpenMaya.MFnMesh.numColorSets = property(...)
static
 Number of color sets.
Name: numColorSets
Type: int
Access: R
Description: Number of color sets.
OpenMaya.MFnMesh.numEdges = property(...)
static
 Number of edges.
Name: numEdges
Type: int
Access: R
Description: Number of edges.
OpenMaya.MFnMesh.numFaceVertices = property(...)
static
 Total number of vertices within faces. Shared vertices are counted
 for each face which uses them.
Name: numFaceVertices
Type: int
Access: R
Description: Total number of vertices. Shared vertices are counted for each face which uses them.
OpenMaya.MFnMesh.numNormals = property(...)
static
 Number of per-polygon per-vertex normals.
Name: numNormals
Type: int
Access: R
Description: number of per-polygon per-vertex normals
OpenMaya.MFnMesh.numPolygons = property(...)
static
 Number of polygons (faces).
Name: numPolygons
Type: int
Access: R
Description: Number of polygons/faces.
OpenMaya.MFnMesh.numUVSets = property(...)
static
 Number of UV (texture coordinate) sets.
Name: numUVSets
Type: int
Access: R
Description: Number of UV sets.
OpenMaya.MFnMesh.numVertices = property(...)
static
 Number of distinct vertices. Shared vertices are only counted once.
Name: numVertices
Type: int
Access: R
Description: Number of distinct vertices. Shared vertices are only counted once.