Hello,
I'd like to copy a mesh to another one. As if I was plugging a source.outMesh into the target.inMesh attributes ( Copying vertex positions, index, UVs etc).
Depending on the documentation, MFnMesh::copyInPlace may do the trick. Unfortunately, nothing happen with the following code:
MSelectionList list;
MObject targetObj;
MObject sourceObj;
MGlobal::getActiveSelectionList(list);
sel.getDagPath(0,sourceDag, sourceObj);
sel.getDagPath(1,targetDag, targetObj);
MFnMesh targetMesh(targetObj);
targetMesh.copyInPlace(sourceObj);
targetMesh.updateSurface();
Did I do something wrong? probably there is a better way to achieve my goal?
Thank you for you help!
Bruce