View Full Version : Cant get BlendShape info

10 October 2011, 09:18 PM
Hi There
I am very new to the Maya API and I am trying to do a very simple exporter of blendshapes for a selected object but I can not for the life of me get it to work. The simple function I have is:
void NewWay()
MSelectionList selection;
MItSelectionList iter(selection);

MDagPath meshDagPath;
MObject obj;

for ( iter.reset(); !iter.isDone(); )
iter.getDagPath(meshDagPath, obj);
But the list is always empty if I want MFn::kBlendShapes, for everything else I get the expected list, the return status is always success, is there something special about getting BlendShapes that I am missing. Can anyone suggest what I am doing wrong? Oddly if I just do a simple iterate over the scene with:
void Works()
MItDependencyNodes it(MFn::kBlendShape);

MFnBlendShapeDeformer fn(it.item());;
Then I get all the blendshapes, but I need to only get the blendshapes for selected objects. Can anyone help?

CGTalk Moderation
10 October 2011, 09:18 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.