Python API 2.0 Reference: OpenMaya.MItGeometry Class Reference

+ Inheritance diagram for OpenMaya.MItGeometry:

Public Member Functions

__init__ ()
 
__iter__ ()
 
allPositions ()
 
component ()
 
count ()
 
currentItem ()
 
exactCount ()
 
index ()
 
isDone ()
 
iter ()
 
iternext ()
 
next ()
 
normal ()
 
position ()
 
reset ()
 
setAllPositions ()
 
setPosition ()
 
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

OpenMaya.MItGeometry.__init__ ( )
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Member Function Documentation

OpenMaya.MItGeometry.__iter__ ( )
x.__iter__() <==> iter(x)
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.
OpenMaya.MItGeometry.component ( )
component() -> MObject

    DEPRECATED in 2019, use currentItem instead.
This method returns the current component in the iteration.
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.
OpenMaya.MItGeometry.currentItem ( )
currentItem() -> MObject

This method returns the current component in the iteration.
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.
OpenMaya.MItGeometry.index ( )
index() -> int


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

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

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

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

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

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


Resets the iterator.
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.
OpenMaya.MItGeometry.setPosition ( )
setPosition() -> MStatus

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

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