OpenMaya.MItMeshFaceVertex Class Reference

OpenMaya.MItMeshFaceVertex Class Reference

Class Description

An iterator for traversing a mesh's face vertices.
+ Inheritance diagram for OpenMaya.MItMeshFaceVertex:

Public Member Functions

__init__ ()
 
currentItem ()
 
faceId ()
 
faceVertexId ()
 
geomChanged ()
 
getBinormal ()
 
getColor ()
 
getColorIndex ()
 
getNormal ()
 
getTangent ()
 
getUV ()
 
getUVIndex ()
 
hasColor ()
 
hasUVs ()
 
isDone ()
 
next ()
 
normalId ()
 
position ()
 
reset ()
 
setIndex ()
 
tangentId ()
 
updateSurface ()
 
vertexId ()
 

Constructor & Destructor Documentation

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

Member Function Documentation

OpenMaya.MItMeshFaceVertex.currentItem ( )
currentItem() -> MObject

Returns the current faceVertex as a double-indexed component.
OpenMaya.MItMeshFaceVertex.faceId ( )
faceId() -> int

Returns the current face index.
OpenMaya.MItMeshFaceVertex.faceVertexId ( )
faceVertexId() -> int

Returns the relative index of the vertex within the current face. This
index together with the faceId can be used for a fast access to get
various info stored per vertex (normals, uvs, colors).
OpenMaya.MItMeshFaceVertex.geomChanged ( )
geomChanged() -> self

Resets the geom pointer in the MItMeshFaceVertex. If you're using
MFnMesh to update Normals or Color per vertex while iterating, you
must call geomChanged on the iterator 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.MItMeshFaceVertex.getBinormal ( )
getBinormal(space=MSpace.kObject, uvSet='') -> MVector

Returns the face vertex binormal associated with the UV set.
OpenMaya.MItMeshFaceVertex.getColor ( )
getColor(colorSetName='') -> MColor

Returns a color of the current face vertex.
OpenMaya.MItMeshFaceVertex.getColorIndex ( )
getColorIndex(colorSetName='') -> int

Return a color index of the current face vertex.
OpenMaya.MItMeshFaceVertex.getNormal ( )
getNormal(space=MSpace.kObject) -> MVector

Returns the face vertex normal.
OpenMaya.MItMeshFaceVertex.getTangent ( )
getTangent(space=MSpace.kObject, uvSet='') -> MVector

Returns the face vertex tangent associated with the given UV set. The
tangent is defined as the surface tangent of the polygon running in
the U direction.
OpenMaya.MItMeshFaceVertex.getUV ( )
getUV(uvSet='') -> (float, float)

Returns the texture coordinate for the current face vertex.
OpenMaya.MItMeshFaceVertex.getUVIndex ( )
getUVIndex(uvSet='') -> int

Returns the index of the texture coordinate for the current face
vertex. This index refers to an element of the mesh's texture
coordinate array as returned by MFnMesh::getUVs().
OpenMaya.MItMeshFaceVertex.hasColor ( )
hasColor() -> bool

Returns whether the current face vertex has a color-per-vertex set.
OpenMaya.MItMeshFaceVertex.hasUVs ( )
hasUVs(uvSet='') -> bool

Returns whether the current face vertex has UVs mapped in the given
set.
OpenMaya.MItMeshFaceVertex.isDone ( )
isDone() -> bool

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

Advances to the next face vertex in the iteration.
OpenMaya.MItMeshFaceVertex.normalId ( )
normalId() -> int

Returns the normal index for the specified vertex. This index refers
to an element in the normal array returned by MFnMesh::getNormals().
These normals are per-face per-vertex normals.
OpenMaya.MItMeshFaceVertex.position ( )
position(space=MSpace.kObject) -> MPoint

Returns the position of the current face vertex.
OpenMaya.MItMeshFaceVertex.reset ( )
reset() -> self
reset(mesh) -> self
reset(mesh, component=None) -> self

Reset the iterator to the first face vertex of the mesh.

Reset the iterator to the first face vertex of the specified mesh.

* mesh (MObject) - The mesh for the iteration

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

* mesh (MDagPath) - The mesh to iterate over
* component (MObject) - The faces of the mesh to iterate over
OpenMaya.MItMeshFaceVertex.setIndex ( )
setIndex(faceId, faceVertexId) -> (oldFaceId, oldFaceVertexId)

Sets the index of the current face vertex to be accessed. The current
face vertex will no longer be in sync with any previous iteration.

Returns the indices of the old face and vertex.


* faceId (int) - Index of desired face to access.
* faceVertexId (int) - Face-relative index of desired vertex to access.
* oldFaceId (int) - Index of the face which was current before the change.
* oldFaceVertexId (int) - Face-relative index of the vertex which was current before the change.
OpenMaya.MItMeshFaceVertex.tangentId ( )
tangentId() -> int

Returns the tangent index for the current face vertex. This index
refers to an element in the array returned by MFnMesh::getTangents.
These tangents are per-face per-vertex.
OpenMaya.MItMeshFaceVertex.updateSurface ( )
updateSurface() -> self

Tells Maya that mesh has been changed and needs to redraw itself.
OpenMaya.MItMeshFaceVertex.vertexId ( )
vertexId() -> int

Returns the global (as opposed to face-relative) index of the
current vertex.