May 02, 2008

Maya Api: Get MObject by Name

const char *objName = c->GetObjName();
MSelectionList selection;
selection.add( MString( objName ) );

MObject curveObj;
MDagPath dagPath;
MString txt;

if( selection.length() )
selection.getDependNode(0, curveObj );

if( curveObj != MObject::kNullObj )
MFnNurbsCurve( curveObj );

No comments:

Post a Comment