Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
hello,
I have a MPxNode which has a mesh as an input attribute.
My output mesh attribute is a copy of the input but with a large amount of polygons created implemented in the MPxNode::compute() method.
for now my code is like this sample:
MDataHandle inHld = data.inputValue(inMeshAttr);
MObject inObj = inHld.asMesh();
MDataHandle meshOutHdl = data.outputValue(outputAttr);
meshOutHdl.copy(inHld);
MFnMesh inMeshFn(meshOutHdl.asMesh());
MObject res= inMeshFn.create(numVerts, numpolys, vertarray, polycount, polyconn, inObj);
inMeshFn.updateSurface();
CHECK_MSTATUS(meshOutHdl.set(res));
data.setClean(plug);
The problem is that my input mesh is replace with the newly created one.
I'd like to merge/append the resulting operation of MFnMesh::create() and my input shape.
I tought about MFnMesh::addPolygon but there is a ton of polys to create.
thx
Solved! Go to Solution.