OpenMaya.MItMeshVertex Class Reference

Class Description

This class is the iterator for polygonal surfaces (meshes).
+ Inheritance diagram for OpenMaya.MItMeshVertex:

Public Member Functions

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

Constructor & Destructor Documentation

OpenMaya.MItMeshVertex.__init__ ( )
x.__init__(...) initializes x; see help(type(x)) for signature

Member Function Documentation

OpenMaya.MItMeshVertex.connectedToEdge ( )
connectedToEdge(index) -> bool

This method determines whether the given edge contains the current vertex

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

This method determines whether the given face contains the current vertex

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

Return the number of vertices in the iteration
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.
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.
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.
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.
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.
OpenMaya.MItMeshVertex.getConnectedEdges ( )
getConnectedEdges() -> MIntArray

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

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

This method gets the indices of the vertices surrounding the current vertex.
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
OpenMaya.MItMeshVertex.getNormalIndices ( )
getNormalIndices() -> MIntArray

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

Return the normals of the current vertex for all faces

* space (int) - The transformation space
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
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
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.
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
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
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.
OpenMaya.MItMeshVertex.isDone ( )
isDone() -> bool

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

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

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

This Method checks for the number of Connected Faces
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
OpenMaya.MItMeshVertex.onBoundary ( )
onBoundary() -> bool

This method determines whether the current vertex is on a Boundary
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
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
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.
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
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
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
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
OpenMaya.MItMeshVertex.updateSurface ( )
updateSurface() -> self

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

The documentation for this class was generated from the following file:
  • D:/Maya-MD-Merge/input/python/2.0/OpenMaya.py