Maya API : nodeFromName

MStatus pluginCmd::nodeFromName(MString name, MObject & obj)
{
    MSelectionList templist;
    templist.add(name);
    if(templist.length() > 0)
    {
        templist.getDependNode(0,obj);
        return MS::kSuccess;
    }
    return MS::kFailure;
}

No comments: