Skip to content

Instantly share code, notes, and snippets.

@est77
Created September 23, 2013 02:25
Show Gist options
  • Save est77/6665794 to your computer and use it in GitHub Desktop.
Save est77/6665794 to your computer and use it in GitHub Desktop.
Getting input geom from Maya deformer
MStatus SomeDeformer::deform( MDataBlock& data, MItGeometry& itGeo, const MMatrix &localToWorldMatrix, unsigned int geomIndex )
{
MStatus status;
MArrayDataHandle hInput = data.outputArrayValue( input, &status );
CHECK_MSTATUS_AND_RETURN_IT( status )
status = hInput.jumpToElement( geomIndex );
CHECK_MSTATUS_AND_RETURN_IT( status )
MObject oInputGeom = hInput.outputValue().child( inputGeom ).asMesh();
MFnMesh fnInputMesh( oInputGeom );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment