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

Public Member Functions

def __init__ ()
 
def __iter__ ()
 
def __next__ ()
 
def connectedToEdge ()
 
def connectedToFace ()
 
def count ()
 
def currentItem ()
 
def geomChanged ()
 
def getColor ()
 
def getColorIndices ()
 
def getColors ()
 
def getConnectedEdges ()
 
def getConnectedFaces ()
 
def getConnectedVertices ()
 
def getNormal ()
 
def getNormalIndices ()
 
def getNormals ()
 
def getOppositeVertex ()
 
def getUV ()
 
def getUVIndices ()
 
def getUVs ()
 
def hasColor ()
 
def index ()
 
def isDone ()
 
def iter ()
 
def iternext ()
 
def next ()
 
def numConnectedEdges ()
 
def numConnectedFaces ()
 
def numUVs ()
 
def onBoundary ()
 
def position ()
 
def reset ()
 
def setIndex ()
 
def setPosition ()
 
def setUV ()
 
def setUVs ()
 
def translateBy ()
 
def updateSurface ()
 

Static Public Member Functions

def __new__ ()
 

Detailed Description

This class is the iterator for polygonal surfaces (meshes).

Constructor & Destructor Documentation

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

Member Function Documentation

def OpenMaya.MItMeshVertex.__iter__ ( )
Implement iter(self).
def OpenMaya.MItMeshVertex.__new__ ( )
static
Create and return a new object.  See help(type) for accurate signature.
def OpenMaya.MItMeshVertex.__next__ ( )
Implement next(self).
def OpenMaya.MItMeshVertex.connectedToEdge ( )
connectedToEdge(index) -> bool

This method determines whether the given edge contains the current vertex

* index (int) - Index of edge to check.
def OpenMaya.MItMeshVertex.connectedToFace ( )
connectedToFace(index) -> bool

This method determines whether the given face contains the current vertex

* index (int) - Index of face to check.
def OpenMaya.MItMeshVertex.count ( )
count() -> int

Return the number of vertices in the iteration
def OpenMaya.MItMeshVertex.currentItem ( )
currentItem() -> MObject

Get the current vertex in the iteration as a component.

Components are used to specify one or more vertices and are usefull in operating on groups of non-contiguous vertices for a surface.
Components do not contain any information about the surface that they refer to so an MDagPath must be specified when dealing with components.
def OpenMaya.MItMeshVertex.geomChanged ( )
geomChanged() -> self

Reset the geom pointer in the MItMeshVertex. If you're using MFnMesh to
update Normals or Color per vertex while iterating, you must call geomChanged
on the iteratior immediately after the MFnMesh call to make sure that your
geometry is up to date. A crash may result if this method is not called.
A similar approach must be taken for updating upstream vertex tweaks
with an MPlug. After the update, call this method.
def OpenMaya.MItMeshVertex.getColor ( )
getColor(colorSetName=None) -> MColor
getColor(faceIndex, colorSetName=None) -> MColor

This method gets the average color of the vertex

* colorSetName (string) - Name of the color set.

This method gets the color of the current vertex in the specified face

* index (int) - The face to get the color for this vertex for* colorSetName (string) - Name of the color set.
def OpenMaya.MItMeshVertex.getColorIndices ( )
getColorIndices(colorSetName=None) -> MIntArray

This method returns the colorIndices into the color array see MFnMesh::getColors()
of the current vertex.

* colorSetName (string) - Name of the color set.
def OpenMaya.MItMeshVertex.getColors ( )
getColors(colorSetName=None) -> MColorArray

This method gets the colors of the current vertex for each face it
belongs to. If no colors are assigned to the vertex at all, the
return values will be (-1 -1 -1 1). If some but not all of the
vertex/face colors have been explicitly set, the ones that have not
been set will be (0, 0, 0, 1).

* colorSetName (string) - Name of the color set.
def OpenMaya.MItMeshVertex.getConnectedEdges ( )
getConnectedEdges() -> MIntArray

This method gets the indices of the edges contained in the current vertex.
def OpenMaya.MItMeshVertex.getConnectedFaces ( )
getConnectedFaces() -> MIntArray

This method gets the indices of the faces connected to the current vertex.
def OpenMaya.MItMeshVertex.getConnectedVertices ( )
getConnectedVertices() -> MIntArray

This method gets the indices of the vertices surrounding the current vertex.
def OpenMaya.MItMeshVertex.getNormal ( )
getNormal(space=kObject) -> MVector
getNormal(faceIndex, space=kObject) -> MVector

Return the normal or averaged normal if unshared of the current vertex.

* space (int) - The transformation space

Return the normal of the current vertex in the specified face.

* faceIndex (int) - face index to get normal for
* space (int) - The transformation space
def OpenMaya.MItMeshVertex.getNormalIndices ( )
getNormalIndices() -> MIntArray

This method returns the normal indices of the face/vertex associated
with the current vertex.
def OpenMaya.MItMeshVertex.getNormals ( )
getNormals(space=kObject) -> MVectorArray

Return the normals of the current vertex for all faces

* space (int) - The transformation space
def OpenMaya.MItMeshVertex.getOppositeVertex ( )
getOppositeVertex(edgeId) -> int

This method gets the other vertex of the given edge

* edgeId (int) - The edge to get the other vertex for
def OpenMaya.MItMeshVertex.getUV ( )
getUV(uvSet=None) -> [float, float]getUV(faceId, uvSet=None) -> [float, float]

Get the shared UV value at this vertex.

* uvSet (string) - Name of the uv set to work with.

Get the UV value for the give facen at the current vertex.

* faceId (int) - Index of the required face
* uvSet (string) - Name of the uv set to work with
def OpenMaya.MItMeshVertex.getUVIndices ( )
getUVIndices(uvSet=None) -> MIntArray

This method returns the uv indices into the normal array see MFnMesh::getUVs()
of the current vertex.

* uvSet (string) - Name of the uv set.
def OpenMaya.MItMeshVertex.getUVs ( )
getUVs(uvSet=None) -> [MFloatArray, MFloatArray, MIntArray]

Get the UV values for all mapped faces at the current vertex.
If at least one face was mapped the method will succeed.

* uvSet (string) - Name of the uv set to work with
def OpenMaya.MItMeshVertex.hasColor ( )
hasColor() -> bool
hasColor(index) -> bool

This method determines whether the current Vertex has a color set
for one or more faces.

* index (int) - Index of face to check
def OpenMaya.MItMeshVertex.index ( )
index() -> int

Returns the index of the current vertex in the vertex list for this
polygonal object.
Polygonal objects contain a list of vertices. Faces and edges are
specified as indicies from this list, in this way vertices can
be shared amoung faces and edges.
def OpenMaya.MItMeshVertex.isDone ( )
isDone() -> bool

Indicates if all of the vertices have been traversed yet.
def OpenMaya.MItMeshVertex.iter ( )
iter() -> self

Initializes the iterator object for pythonic iteration.
def OpenMaya.MItMeshVertex.iternext ( )
iternext() -> self

Used in pythonic iteration to move the iterator
def OpenMaya.MItMeshVertex.next ( )
next() -> self

Advance to the next edge in the iteration.
def OpenMaya.MItMeshVertex.numConnectedEdges ( )
numConnectedEdges() -> int

This Method checks for the number of connected Edges on this vertex
def OpenMaya.MItMeshVertex.numConnectedFaces ( )
numConnectedFaces() -> int

This Method checks for the number of Connected Faces
def OpenMaya.MItMeshVertex.numUVs ( )
numUVs(uvSet=None) -> int

This method returns the number of unique UVs mapped on this vertex

* uvSet (string) - Name of the uv set to work with
def OpenMaya.MItMeshVertex.onBoundary ( )
onBoundary() -> bool

This method determines whether the current vertex is on a Boundary
def OpenMaya.MItMeshVertex.position ( )
position(space=kObject) -> MPoint

Return the position of the current vertex in the specified space.
Object space ignores all transformations for the polygon, world space
includes all such transformations.

* space (int) - The  transformation space
def OpenMaya.MItMeshVertex.reset ( )
reset() -> self
reset(polyObject) -> self
reset(polyObject, component=None) -> self

Reset the iterator to the first polygon

Reset the iterator to the first polygon in the supplied polygon

* polyObject (MObject) - The polygon for the iteration

Reset the iterator with the given surface and component.
If component is None then the iteration will be for all vertices in the given polygon.

* polyObject (MDagPath) - The surface (mesh) to iterate over
* component (MObject) - The vertices of the polyObject to iterate over
def OpenMaya.MItMeshVertex.setIndex ( )
setIndex(index) -> int

This method sets the index of the current vertex to be accessed.
The current vertex will no longer be in sync with any previous iteration.

* index (int) - The index of desired vertex to access.
def OpenMaya.MItMeshVertex.setPosition ( )
setPosition(point, space=kObject) -> self

Set the position of the current vertex in the given space.

* point (MPoint) - The new position for the current vertex
* space (int) - The Transformation space
def OpenMaya.MItMeshVertex.setUV ( )
setUV(uvPoint, uvSet=None) -> selfsetUV(faceId, uvPoint, uvSet=None) -> self

Set the shared UV value at this vertex

* uvPoint ([float, float]) - The UV values to set
* uvSet (string) - Name of the UV set to work with

Set the UV value for the given face at the current vertex

* faceId (int) - Index of required face
* uvPoint ([float, float]) - The UV values to set
* uvSet (string) - Name of the UV set to work with
def OpenMaya.MItMeshVertex.setUVs ( )
setUVs(uArray, vArray, faceIds, uvSet=None) -> self

Set the UV value for the specified faces at the current vertex.
If the face is not already mapped, the value will not be set.
If at least ne face was previously mapped, the method should succeed.
If no faces were mapped, the method will fail.

* uArray (MFloatArray) - All the U values - in local face order
* vArray (MFloatArray) - The corresponding V values
* faceIds (MIntArray) - The corresponding face Ids
* uvSet (string) - UV set to work with
def OpenMaya.MItMeshVertex.translateBy ( )
translateBy(vector, space=kObject) -> self

Translate the current vertex by the amount specified
by the given vector.

* vector (MVector) - The amount of translation
* space (int) - The Transformation space
def OpenMaya.MItMeshVertex.updateSurface ( )
updateSurface() -> self

Signal that this polygonal surface has changed and needs to redraw itself.