issues in mesh color

issues in mesh color

egoldid1
Advocate Advocate
241 Views
0 Replies
Message 1 of 1

issues in mesh color

egoldid1
Advocate
Advocate

Hi, I use this codes to create a mesh with color, but these codes sometimes run not correctly. where is issues?

Maya Api 2024.

====

MObject inMesh = meshSrcHandle.asMesh();

MFnMeshData meshDataFn_orig;
MObject inMesh_source= meshDataFn_orig.create();

MFnMesh outMesh;
outMesh.copy(inMesh , inMesh_source);

MString createColor = outMesh.createColorSetWithName(colorSetName, NULL, NULL, NULL);
outMesh.setCurrentColorSetName(createColor);
status = outMesh.setVertexColors(vertexColorList, vertexIndexIds);

 

0 Likes
242 Views
0 Replies
Replies (0)