I've written a node that generates a mesh, and I'd like to be able to add some color sets to it, but I haven't been able to get this to work. Reading the documentation it seems that the MFnMesh object has to refer to a shape to be able to use the createColorSet command, but I'm not quite sure what this means. In my node I have an attribute of type MFnData:kMesh which I put my newly created mesh into, and then I connect this attribute into the input of a mesh node in my scene. Is there a way to add several color sets into the mesh inside my node, or am I going to have to completely change the way that my node works? I couldn't find any examples of createColorSet being used apart from snippets of incomplete code in forums, so any help would be appreciated!
Thanks!