The Mesh class provides wrapped access to many API methods for querying and modifying meshes. Be aware that modifying meshes using API commands outside of the context of a plugin is still somewhat uncharted territory, so proceed at our own risk.
The component types can be accessed from the Mesh type (or it’s transform) using the names you are familiar with from MEL:
>>> from pymel.core import *
>>> p = polySphere( name='theMoon', sa=7, sh=7 )[0]
>>> p.vtx
MeshVertex(u'theMoonShape.vtx[0:43]')
>>> p.e
MeshEdge(u'theMoonShape.e[0:90]')
>>> p.f
MeshFace(u'theMoonShape.f[0:48]')
They are also accessible from their more descriptive alternatives:
>>> p.verts
MeshVertex(u'theMoonShape.vtx[0:43]')
>>> p.edges
MeshEdge(u'theMoonShape.e[0:90]')
>>> p.faces
MeshFace(u'theMoonShape.f[0:48]')
As you’d expect, these components are all indexible:
>>> p.vtx[0]
MeshVertex(u'theMoonShape.vtx[0]')
The classes themselves contain methods for getting information about the component.
>>> p.vtx[0].connectedEdges()
MeshEdge(u'theMoonShape.e[0,6,42,77]')
This class provides support for python’s extended slice notation. Typical maya ranges express a start and stop value separated by a colon. Extended slices add a step parameter and can also represent multiple ranges separated by commas. Thus, a single component object can represent any collection of indices.
This includes start, stop, and step values.
>>> # do every other edge between 0 and 10
>>> for edge in p.e[0:10:2]:
... print edge
...
theMoonShape.e[0]
theMoonShape.e[2]
theMoonShape.e[4]
theMoonShape.e[6]
theMoonShape.e[8]
theMoonShape.e[10]
Negative indices can be used for getting indices relative to the end:
>>> p.edges # the full range
MeshEdge(u'theMoonShape.e[0:90]')
>>> p.edges[5:-10] # index 5 through to 10 from the last
MeshEdge(u'theMoonShape.e[5:80]')
Just like with python ranges, you can leave an index out, and the logical result will follow:
>>> p.edges[:-10] # from the beginning
MeshEdge(u'theMoonShape.e[0:80]')
>>> p.edges[20:]
MeshEdge(u'theMoonShape.e[20:90]')
Or maybe you want the position of every tenth vert:
>>> for x in p.vtx[::10]:
... print x, x.getPosition()
...
theMoonShape.vtx[0] [0.270522117615, -0.900968849659, -0.339223951101]
theMoonShape.vtx[10] [-0.704405844212, -0.623489797115, 0.339223951101]
theMoonShape.vtx[20] [0.974927902222, -0.222520858049, 0.0]
theMoonShape.vtx[30] [-0.704405784607, 0.623489797115, -0.339224010706]
theMoonShape.vtx[40] [0.270522087812, 0.900968849659, 0.339223980904]
To be compatible with Maya’s range notation, these slices are inclusive of the stop index.
>>> # face at index 8 will be included in the sequence
>>> for f in p.f[4:8]: print f
...
theMoonShape.f[4]
theMoonShape.f[5]
theMoonShape.f[6]
theMoonShape.f[7]
theMoonShape.f[8]
>>> from pymel.core import *
>>> obj = polyTorus()[0]
>>> colors = []
>>> for i, vtx in enumerate(obj.vtx):
... edgs=vtx.toEdges()
... totalLen=0
... edgCnt=0
... for edg in edgs:
... edgCnt += 1
... l = edg.getLength()
... totalLen += l
... avgLen=totalLen / edgCnt
... #print avgLen
... currColor = vtx.getColor(0)
... color = datatypes.Color.black
... # only set blue if it has not been set before
... if currColor.b<=0.0:
... color.b = avgLen
... color.r = avgLen
... colors.append(color)
Adds holes to a mesh polygon.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnMesh.addHoles
Undo is not currently supported for this method
returns the surface area of the object’s faces in local space as a float
Derived from mel command maya.cmds.polyEvaluate
Maps a color value to a specified vertex of a polygon.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnMesh.assignColor
Undo is not currently supported for this method
This method maps all colors for the mesh. The setColor/setColors method is used to create a color table for the mesh. After the table is created, this method is used to map those values to each polygon on a per-vertex basis. The setColor/setColors method should be called before the assignColors method.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnMesh.assignColors
Undo is not currently supported for this method
Maps a texture coordinate to a specified vertex of a polygon.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnMesh.assignUV
Undo is not currently supported for this method
This method maps all texture coordinates for the mesh. The setUV/setUVs method is used to create the texture coordinate table for the mesh. After the table is created, this method is used to map those values to each polygon on a per-vertex basis. The setUV/setUVs method should be called before the assignUVs method.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnMesh.assignUVs
Undo is not currently supported for this method
This method updates the mesh after setEdgeSmoothing has been done. This should be called only once, after all the desired edges have been had their soothing set. If you don’t call this method, the normals may not be correct, and the object will look odd in shaded mode. Derived from api method maya.OpenMaya.MFnMesh.cleanupEdgeSmoothing
Undo is not currently supported for this method
This method clears out all color for the mesh, and leaves behind an empty color set.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnMesh.clearColors
Undo is not currently supported for this method
This method clears out all texture coordinates for the mesh, and leaves behind an empty UVset.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnMesh.clearUVs
Undo is not currently supported for this method
Create a new empty color set for this mesh. If the name passed in is empty (zero length), or a color set with the same name already exists, then a new unique name is generated and used as the new color set’s name.
Parameters : |
|
---|---|
Return type: | unicode |
Derived from api method maya.OpenMaya.MFnMesh.createColorSetWithName
Create a new empty uv set for this mesh. If the name passed in is empty (zero length), or a uv set with the same name already exists, then a new unique name is generated and used as the new uvset’s name.
Parameters : |
|
---|---|
Return type: | unicode |
Derived from api method maya.OpenMaya.MFnMesh.createUVSetWithName
Deletes a named color set from the object. If a color set with the given name cannot be found, then no color set will be deleted.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnMesh.deleteColorSet
Undo is not currently supported for this method
Deletes a named uv set from the object. If a uv set with the given name cannot be found, then no uv set will be deleted.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnMesh.deleteUVSet
Undo is not currently supported for this method
Get assigned UVs. This method finds all texture coordinates for the mesh that have been mapped, and returns them in the same format as the assignUVs.
Parameters : |
|
---|---|
Return type: | (int list, int list) |
Derived from api method maya.OpenMaya.MFnMesh.getAssignedUVs
Get a list of texture nodes which are using a given uv set. If the texture has a 2d texture placement, the texture, and not the placement will be returned.
Parameters : |
|
---|---|
Return type: | PyNode list |
Derived from api method maya.OpenMaya.MFnMesh.getAssociatedUVSetTextures
Return the binormal vectors for all face vertices.
Parameters : |
|
---|---|
Return type: | FloatVector list |
Derived from api method maya.OpenMaya.MSpace.getBinormals
Return true if checking for duplicate points is turned on. Return false otherwise.
Return type: | bool |
---|
Derived from api method maya.OpenMaya.MFnMesh.getCheckSamePointTwice
Returns the closest point on this surface to the given point. This method also returns the surface normal at that point.
Parameters : |
|
---|---|
Return type: | (Vector, int) |
Derived from api method maya.OpenMaya.MSpace.getClosestNormal
Returns the closest point on this surface to the given point.
Parameters : |
|
---|---|
Return type: | (Point, int) |
Derived from api method maya.OpenMaya.MSpace.getClosestPoint
Returns the closest point on this surface to the given point. This method also returns the surface normal at that point.
Parameters : |
|
---|---|
Return type: | (Point, Vector, int) |
Derived from api method maya.OpenMaya.MSpace.getClosestPointAndNormal
Get the value of the specified texture coordinate from this mesh’s color list. The colorId is the element in the color list that will be retrieved. If the color is not set, defaultUnsetColor will be return. If defaultUnsetColor is not set, (0,0,0,1) will be return.
Parameters : |
|
---|---|
Return type: | Color |
Derived from api method maya.OpenMaya.MFnMesh.getColor
This method returns the color representation (RGB/RGBA/A) of a color set.
Parameters : |
|
---|---|
Return type: |
Derived from api method maya.OpenMaya.MFnMesh.getColorRepresentation
Get 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.
Return type: | list list |
---|
Derived from api method maya.OpenMaya.MFnMesh.getColorSetFamilyNames
Get the names of all of the colors sets on this object.
Return type: | list list |
---|
Derived from api method maya.OpenMaya.MFnMesh.getColorSetNames
This method copies the color array for this mesh into the given color array. Use the index returned by getColorIndex to access the array. If the color is not set for a vertex, defaultUnsetColor will be return. If defaultUnsetColor is not set, (0,0,0,1) will be return.
Parameters : |
|
---|---|
Return type: | Color list |
Derived from api method maya.OpenMaya.MFnMesh.getColors
Get the name of the “current” or “working” color set. The “current” color set is the color set which is used for color operations when no color set is explcitly specified.
Parameters : |
|
---|---|
Return type: | unicode |
Derived from api method maya.OpenMaya.MFnMesh.currentColorSetName
Get the name of the “current” uv set. The “current” uv set is the uv set which is used for uv operations when no uv set is explicitly specified.
Parameters : |
|
---|---|
Return type: | unicode |
Derived from api method maya.OpenMaya.MFnMesh.currentUVSetName
Determine if the mesh node is set to display vertex colors.
Return type: | bool |
---|
Derived from api method maya.OpenMaya.MFnMesh.displayColors
This method retrieves the object-relative (mesh-relative/global) vertex indices corresponding to the specified edge. The indices can be used to refer to the elements in the array returned by the ‘getPoints’ method.
Parameters : |
|
---|---|
Return type: | (int, int) |
Derived from api method maya.OpenMaya.MFnMesh.getEdgeVertices
Return normal indices for all vertices for a given face. The normalIds can be used to index into an array returned by MFnMesh::getNormals() ;
Parameters : |
|
---|---|
Return type: | int list |
Derived from api method maya.OpenMaya.MFnMesh.getFaceNormalIds
This method returns the list of UV sets mapped to a face.
Parameters : |
|
---|---|
Return type: | list list |
Derived from api method maya.OpenMaya.MFnMesh.getFaceUVSetNames
Return the binormal vector at a given face vertex.
Parameters : |
|
---|---|
Return type: | Vector |
Derived from api method maya.OpenMaya.MSpace.getFaceVertexBinormal
Return all per-vertex-per-face binormals for a given face.
Parameters : |
|
---|---|
Return type: | FloatVector list |
Derived from api method maya.OpenMaya.MSpace.getFaceVertexBinormals
Get an index into the array returned by getFaceVertexColors. So that you can index into the array directly, instead of walking it in face-vertex order.
Parameters : |
|
---|---|
Return type: | int |
Derived from api method maya.OpenMaya.MFnMesh.getFaceVertexColorIndex
Get colors for all vertex/faces of the given color set. If the color set is not specified, the default color set will be used. If no vertex/face has color for that vertex, the entry returned will be defaultUnsetColor. If defaultUnsetColor is not given, then (-1, -1, -1, -1) will be used. 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 have (0,0,0). If a vertex has shared color, the same value will be set for all its vertes/faces.
Parameters : |
|
---|---|
Return type: | Color list |
Derived from api method maya.OpenMaya.MFnMesh.getFaceVertexColors
Return a per-vertex-per-face normal for a given face (polygon) and given vertex.
Parameters : |
|
---|---|
Return type: | Vector |
Derived from api method maya.OpenMaya.MSpace.getFaceVertexNormal
Return the normalized tangent vector at a given face vertex.
Parameters : |
|
---|---|
Return type: | Vector |
Derived from api method maya.OpenMaya.MSpace.getFaceVertexTangent
Return all per-vertex-per-face tangents for a given face.
Parameters : |
|
---|---|
Return type: | FloatVector list |
Derived from api method maya.OpenMaya.MSpace.getFaceVertexTangents
Retrieves a list of the holes in the polygon.
Return type: | (int, int list, int list) |
---|
Derived from api method maya.OpenMaya.MFnMesh.getHoles
Return normal indices for all vertices for a all faces. The normalIds can be used to index into an array returned by MFnMesh::getNormals() ;
Return type: | (int list, int list) |
---|
Derived from api method maya.OpenMaya.MFnMesh.getNormalIds
This method copies the normal list for this mesh into the given array. The normals are the per-polygon per-vertex normals. To find the normal for a particular vertex-face, use getFaceNormalIds() or MItMeshPolygon::normalIndex to get the index into the array.
Parameters : |
|
---|---|
Return type: | FloatVector list |
Derived from api method maya.OpenMaya.MSpace.getNormals
Get the position of the specified vertex in this mesh’s vertex list.
Parameters : |
|
---|---|
Return type: | Point |
Derived from api method maya.OpenMaya.MSpace.getPoint
Return the position of the point at the given UV value in the current polygon.
Parameters : |
|
---|---|
Return type: | Point |
Derived from api method maya.OpenMaya.MSpace.getPointAtUV
This method copies the vertex list for this mesh into the given point array.
Parameters : |
|
---|---|
Return type: | Point list |
Derived from api method maya.OpenMaya.MSpace.getPoints
Return the normal at the given polygon. The returned normal is a per-polygon normal. See the class description for more information on normals.
Parameters : |
|
---|---|
Return type: | Vector |
Derived from api method maya.OpenMaya.MSpace.getPolygonNormal
This method retrieves the object-relative (mesh-relative/global) vertex indices for the specified triangle in the specified polygon. The indices refer to the elements in the array returned by the ‘getPoints’ method.
Parameters : |
|
---|---|
Return type: | (int, int, int) |
Derived from api method maya.OpenMaya.MFnMesh.getPolygonTriangleVertices
Get the value of the specified texture coordinate for a vertex in a polygon. Since texture coordinates (uv’s) are stored per-polygon per-vertex you must specify both the polygon and the vertex that the u and v values are mapped to.
Parameters : |
|
---|---|
Return type: | (float, float) |
Derived from api method maya.OpenMaya.MFnMesh.getPolygonUV
Get the id of the specified texture coordinate for a vertex in a polygon.
Parameters : |
|
---|---|
Return type: | int |
Derived from api method maya.OpenMaya.MFnMesh.getPolygonUVid
This method retrieves the object-relative (mesh-relative/global) vertex indices for the specified polygon. The indices refer to the elements in the array returned by the ‘getPoints’ method.
Parameters : |
|
---|---|
Return type: | int list |
Derived from api method maya.OpenMaya.MFnMesh.getPolygonVertices
Return the tangent index for a given face vertex.
Parameters : |
|
---|---|
Return type: | int |
Derived from api method maya.OpenMaya.MFnMesh.getTangentId
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.
Parameters : |
|
---|---|
Return type: | FloatVector list |
Derived from api method maya.OpenMaya.MSpace.getTangents
Returns the number of triangles for every polygon face and the vertex Ids of each triangle vertex. The triangleVertices array holds each vertex for each triangle in sequence, so is three times longer than the triangleCounts array
Return type: | (int list, int list) |
---|
Derived from api method maya.OpenMaya.MFnMesh.getTriangles
Get the value of the specified texture coordinate from this mesh’s uv list. The uvId is the element in the uv list that will be retrieved.
Parameters : |
|
---|---|
Return type: | (float, float) |
Derived from api method maya.OpenMaya.MFnMesh.getUV
Find the point closet to the given point, and return the UV value at that point.
Parameters : |
|
---|---|
Return type: | (float, float) |
Derived from api method maya.OpenMaya.MSpace.getUVAtPoint
Get 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.
Return type: | list list |
---|
Derived from api method maya.OpenMaya.MFnMesh.getUVSetFamilyNames
Get the names of all of the uv sets on this object.
Return type: | list list |
---|
Derived from api method maya.OpenMaya.MFnMesh.getUVSetNames
This method copies the texture coordinate list for this mesh into the given uv arrays.
Parameters : |
|
---|---|
Return type: | (float list, float list) |
Derived from api method maya.OpenMaya.MFnMesh.getUVs
Constructs an array of unique integer for each UV shell. This method let the user identify each connected piece of UV.
Parameters : |
|
---|---|
Return type: | (int list, int) |
Derived from api method maya.OpenMaya.MFnMesh.getUvShellsIds
Return the normal at the given vertex. The returned normal is a single per-vertex normal, so unshared normals at a vertex will be averaged. See the class description for more information on normals.
Parameters : |
|
---|---|
Return type: | Vector |
Derived from api method maya.OpenMaya.MSpace.getVertexNormal
This method retrieves the object-relative (mesh-relative/global) vertex indices for all polygons. The indices refer to the elements in the array returned by the ‘getPoints’ method.
Return type: | (int list, int list) |
---|
Derived from api method maya.OpenMaya.MFnMesh.getVertices
This method returns true if the color set has Alpha component.
Parameters : |
|
---|---|
Return type: | bool |
Derived from api method maya.OpenMaya.MFnMesh.hasAlphaChannels
This method returns if the color set has RGB components.
Parameters : |
|
---|---|
Return type: | bool |
Derived from api method maya.OpenMaya.MFnMesh.hasColorChannels
Determines whether the given ray intersects this polygon and if so, returns the points of intersection. The points of intersection will be in order of closest point to the raySource.
Parameters : |
|
---|---|
Return type: | (bool, Point list, int list) |
Derived from api method maya.OpenMaya.MSpace.intersect
This method returns if the color set has its R,G,B,and A components clamped in the range from 0 to 1.
Parameters : |
|
---|---|
Return type: | bool |
Derived from api method maya.OpenMaya.MFnMesh.isColorClamped
Return true if this color set is per-instance, and false if it is shared across all instances. The name provided may be an individual set name or a set family name.
Parameters : |
|
---|---|
Return type: | bool |
Derived from api method maya.OpenMaya.MFnMesh.isColorSetPerInstance
This method determines if the specified edge is smooth (soft).
Parameters : |
|
---|---|
Return type: | bool |
Derived from api method maya.OpenMaya.MFnMesh.isEdgeSmooth
Test if the normal for a face/vertex pairs is locked (user defined).
Parameters : |
|
---|---|
Return type: | bool |
Derived from api method maya.OpenMaya.MFnMesh.isNormalLocked
This method determines if the specified polygon is convex.
Parameters : |
|
---|---|
Return type: | bool |
Derived from api method maya.OpenMaya.MFnMesh.isPolygonConvex
Return true if this set is per-instance, and false if it is shared across all instances. The name provided may be an individual set name or a set family name.
Parameters : |
|
---|---|
Return type: | bool |
Derived from api method maya.OpenMaya.MFnMesh.isUVSetPerInstance
Lock Normals for these face/vertex pairs
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnMesh.lockFaceVertexNormals
Undo is not currently supported for this method
Lock Shared Normals for these vertices.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnMesh.lockVertexNormals
Undo is not currently supported for this method
Returns the number of color sets for an object.
Return type: | int |
---|
Derived from api method maya.OpenMaya.MFnMesh.numColorSets
Returns the number of (vertex) color for this mesh. The color are stored in a list which is referenced by polygons requiring color on a per-polygon per-vertex basis. This method returns the number of elements in this list.
Return type: | int |
---|
Derived from api method maya.OpenMaya.MFnMesh.numColors
returns the number of edges as an int
Derived from mel command maya.cmds.polyEvaluate
Returns the number of face-vertices for this mesh.
Return type: | int |
---|
Derived from api method maya.OpenMaya.MFnMesh.numFaceVertices
returns the number of faces as an int
Derived from mel command maya.cmds.polyEvaluate
Returns the number of per-polygon per-vertex normals for this mesh. This number will correspond to the length of the normal array returned by getNormals( normalArray, space ).
Return type: | int |
---|
Derived from api method maya.OpenMaya.MFnMesh.numNormals
Returns the number of vertices for the specified polygon.
Parameters : |
|
---|---|
Return type: | int |
Derived from api method maya.OpenMaya.MFnMesh.polygonVertexCount
returns the object’s number of selected edges as an int
Derived from mel command maya.cmds.polyEvaluate
returns the object’s number of selected faces as an int
Derived from mel command maya.cmds.polyEvaluate
returns the number of triangles of selected components as an int
Derived from mel command maya.cmds.polyEvaluate
returns the object’s number of selected vertices as an int
Derived from mel command maya.cmds.polyEvaluate
Returns the number of uv sets for an object.
Return type: | int |
---|
Derived from api method maya.OpenMaya.MFnMesh.numUVSets
Returns the number of texture (uv) coordinates for this mesh. The uv’s are stored in a list which is referenced by polygons requiring textures on a per-polygon per-vertex basis. This method returns the number of elements in this list.
Return type: | int |
---|
Derived from api method maya.OpenMaya.MFnMesh.numUVs
returns the number of vertices as an int
Derived from mel command maya.cmds.polyEvaluate
A method to determines whether the specified face in the mesh is a boundary face.
Parameters : |
|
---|---|
Return type: | bool |
Derived from api method maya.OpenMaya.MFnMesh.onBoundary
Triangulates a polygon. The polygon consists of 2D positions with optional 3D normals and holes. These 2D positions can be in any coordinate system. 3D positions can be projected to a 2D plane by its face normal. 3D normals are references to help triangulation. This function can work without normals but normals can improve the quality. This function works with pointers and is more efficient than the other variant.
Parameters : |
|
---|---|
Return type: | (int, int) |
Derived from api method maya.OpenMaya.MFnMesh.polyTriangulate
Remove previously set color these faces. For each face, the color will be unset for each vertex-face component in the face.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnMesh.removeFaceColors
Undo is not currently supported for this method
Remove colors for these face/vertex pairs
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnMesh.removeFaceVertexColors
Undo is not currently supported for this method
Remove color from these vertices.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnMesh.removeVertexColors
Undo is not currently supported for this method
Renames a uv set from one name to another for this mesh. The original name must exist, and the new name cannot be the same name as one that already exists. In these cases the uv set will not be renamed.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnMesh.renameUVSet
Undo is not currently supported for this method
This method allows the turning on or off of duplicate point checking when polygons are created or added using this class. Checking for duplicates, is the default state.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnMesh.setCheckSamePointTwice
Sets the specified color values. The colorId is the element in the color list that will be set. If the colorId is greater than or equal to numColors() then the color list will be grown to accommodate the specified color.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnMesh.setColor
Set the color set to be clamped.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnMesh.setIsColorClamped
Sets all of the colors for this mesh. The color array 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.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnMesh.setColors
Set the “current” or “working” color set for this object. The “current” color set is the set to use by functions that do not have a specific color set defined.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnMesh.setCurrentColorSetName
Set the “current” uv set for this object. The “current” uv set is the uv set to use when no uv set name is specified for a uv set operation. If the uv set does not exist then the “current” uv set will not be changed.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnMesh.setCurrentUVSetName
Set whether the mesh node should display vertex colors.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnMesh.setDisplayColors
This method sets the specified edge to be hard or smooth (soft). 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.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnMesh.setEdgeSmoothing
Undo is not currently supported for this method
Set vertex-face Color for all vertices on this face.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnMesh.setFaceColor
Undo is not currently supported for this method
Set color for these faces. The color will be set for each vertex-face component of a face.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnMesh.setFaceColors
Undo is not currently supported for this method
Set color for this vertex in this face.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnMesh.setFaceVertexColor
Undo is not currently supported for this method
Set Normal for this face/vertex pair
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MSpace.setFaceVertexNormal
Undo is not currently supported for this method
Set the normal array (user normals)
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MSpace.setNormals
Sets the position of specified vertex in the vertex list for this mesh.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MSpace.setPoint
This method copies the points in the given point array to the vertices of this mesh.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MSpace.setPoints
Sets the specified colors for this mesh. If the largest colorId in the array is larger than numColors() then the color list for this mesh will be grown to accommodate the new color values.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnMesh.setSomeColors
Undo is not currently supported for this method
Sets the specified texture coordinates (UV’s) for this mesh. The uv arrays and uvId array must 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).
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnMesh.setSomeUVs
Undo is not currently supported for this method
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 a named uv set is given, the largest uvId must be larger than numUVs(uvSet).
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnMesh.setUV
Sets all of the texture coordinates (uv’s) for this mesh. The uv arrays 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.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnMesh.setUVs
Set color for this vertex. The color is set for the vertex-face in each face that the vertex belongs to.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnMesh.setVertexColor
Undo is not currently supported for this method
Set Shared Normal for this vertex
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MSpace.setVertexNormal
If a non-api operation happens that many have changed the underlying Maya object wrapped by this api object, make sure that the api object references a valid maya object. In particular this call should be used if you are calling mel commands from your plugin. Note that this only applies for mesh shapes: in a plugin node where the dataMesh is being accessed directly this is not necessary. Derived from api method maya.OpenMaya.MFnMesh.syncObject
Undo is not currently supported for this method
Unlock Normals for these face/vertex pairs
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnMesh.unlockFaceVertexNormals
Undo is not currently supported for this method
Unlock Shared Normals for these vertices
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnMesh.unlockVertexNormals
Undo is not currently supported for this method
Signal that this polygonal mesh has changed and needs to redraw itself. Derived from api method maya.OpenMaya.MFnMesh.updateSurface
Undo is not currently supported for this method
returns the surface area of the object’s faces in world space as a floatFlag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list.
Derived from mel command maya.cmds.polyEvaluate