You can still create the geometry iterator. From the docs:
MStatus
exampleDeformer::compute(const MPlug& plug, MDataBlock& dataBlock)
{
MStatus status = MS::kUnknownParameter;
if (plug.attribute() == outputGeom) {
// get the input corresponding to this output
//
unsigned int index = plug.logicalIndex();
MObject thisNode = this->thisMObject();
MPlug inPlug(thisNode,input);
inPlug.selectAncestorLogicalIndex(index,input);
MDataHandle hInput = dataBlock.inputValue(inPlug);
// get the input geometry and input groupId
//
MDataHandle hGeom = hInput.child(inputGeom);
MDataHandle hGroup = hInput.child(groupId);
unsigned int groupId = hGroup.asLong();
MDataHandle hOutput = dataBlock.outputValue(plug);
hOutput.copy(hGeom);
// do the deformation
//
MItGeometry iter(hOutput,groupId,false);
for ( ; !iter.isDone(); iter.next()) {
MPoint pt = iter.position();
//
// insert deformation code here
//
iter.setPosition(pt);
}
status = MS::kSuccess;
}
return status;
}
You'll see your same code as before but since it's in the compute method, it hasn't been called yet. Calling it in the deform method is actually the second time it gets called, which is why you get the extra evaluation.
--
www.chadvernon.com