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

Public Member Functions

def __init__ ()
 
def __iter__ ()
 
def allPositions ()
 
def component ()
 
def count ()
 
def currentItem ()
 
def exactCount ()
 
def index ()
 
def isDone ()
 
def iter ()
 
def iternext ()
 
def next ()
 
def normal ()
 
def position ()
 
def reset ()
 
def setAllPositions ()
 
def setPosition ()
 
def weight ()
 

Detailed Description

Geometry iterator.

This class is the iterator class for geometry data, and can be used to
loop over the CVs of NURBS, the points of subds & lattices, and the
vertices of polygonal meshes.

Constructor & Destructor Documentation

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

Member Function Documentation

def OpenMaya.MItGeometry.__iter__ ( )
x.__iter__() <==> iter(x)
def OpenMaya.MItGeometry.allPositions ( )
allPositions() -> MStatus

Return the position of all the points/CVs/vertices.  This
operation is faster than using the iterator to get values one by
one, but uses more memory as it requires an array to hold all the
values to be returned.
def OpenMaya.MItGeometry.component ( )
component() -> MObject

    DEPRECATED in 2019, use currentItem instead.
This method returns the current component in the iteration.
def OpenMaya.MItGeometry.count ( )
count() -> int


Return the number of items in this iteration. This number will
always be at least as large as the number of items, however in
some cases it may be larger. It is useful if allocating space in
an array to hold the results, since it will always be of
sufficient size. If the exact number of items is required, use the
exactCount method instead. The exactCount method is however
significantly slower than this method.
def OpenMaya.MItGeometry.currentItem ( )
currentItem() -> MObject

This method returns the current component in the iteration.
def OpenMaya.MItGeometry.exactCount ( )
exactCount() -> int


Return the exact number of items in this iteration. This method is
significantly slower than the count() method, so use if only if
the precise number is required.
def OpenMaya.MItGeometry.index ( )
index() -> int


This method returns the index of the current point/CV/vertex
component in the iteration.
def OpenMaya.MItGeometry.isDone ( )
isDone() -> Bool

Indicates end of the iteration.
def OpenMaya.MItGeometry.iter ( )
iter() -> self

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

Used in pythonic iteration to move the iterator
def OpenMaya.MItGeometry.next ( )
x.next() -> the next value, or raise StopIteration
def OpenMaya.MItGeometry.normal ( )
normal() -> MVector

Return the normal of the current point/CV/vertex component.
def OpenMaya.MItGeometry.position ( )
position() -> MPoint

Return the position of the current point/CV/vertex component.
def OpenMaya.MItGeometry.reset ( )
reset() -> self


Resets the iterator.
def OpenMaya.MItGeometry.setAllPositions ( )
setAllPositions() -> MStatus

Set the position of all the points/CVs/vertices at once. This
operation is faster than using the iterator to set values one by
one, but uses more memory as it requires an array to hold all the
values to be set.
def OpenMaya.MItGeometry.setPosition ( )
setPosition() -> MStatus

Set the position of the current point/CV/vertex.
def OpenMaya.MItGeometry.weight ( )
weight() -> MWeight

Return the weight of the current point/CV/vertex component.