Hello !
I'm trying to get the dagPath from the inputGeometry of my deformer node.
so I can get all my points in worldSpace via MitGeometry.
So far I have:
MArrayDataHandle h_outputData = data.outputArrayValue(input, &status);
status = h_outputData.jumpToElement(geomIndex);
MObject o_outputGeom = h_outputData.outputValue().child(inputGeom).asMesh();
MFnDagNode dagNode(o_outputGeom, &status);
CHECK_MSTATUS_AND_RETURN_IT(status);
MDagPath path;
status = dagNode.getPath(path);
CHECK_MSTATUS_AND_RETURN_IT(status);
but it returns this error when creating the MFnDagNode : (kInvalidParameter): Object is incompatible with this method
so I tried this :
MSelectionList outMeshList;
MDagPath outMeshDagPath;
status = outMeshList.add(o_outputGeom);
CHECK_MSTATUS_AND_RETURN_IT(status);
outMeshList.getDagPath(0, outMeshDagPath);
outMeshDagPath.isValid(&status);
CHECK_MSTATUS_AND_RETURN_IT(status);
but again, I have an error when adding the MObject to the MSelectionList. (kInvalidParameter): Object is incompatible with this method
Any idea ?