Hi all!
I'm trying to get mesh data (i.e. vertices and polygons) from my kMesh input plug in my shape node. I'm doing this outside compute (i.e. drawing functions).
What I don't get is how MFnMeshData and MFnMesh relates. Can I get a MFnMesh from an MFnMeshData? How?
For example I've tried this:
MPlug plug( thisMObject(), output );
MDataBlock data = forceCache();
MDataHandle meshh = plug.constructHandle(data);
MObject obj = meshh.asMesh();
MFnMesh mesh(obj, &status);
But status reports "Argument is NULL pointer".
Is this even close?
Please help!
Cheers!
Garion