Hi all,
I define a deformer node, like this:
class MyDeformer : public MPxDeformerNode
{
...
}
devkit/plug-ins/weightListNode.cpp shows that MPxDeformerNode::weightsList is an array-array attribute.
MPxDeformerNode::weightsList has the child attribute weights which is also an array.
I guess that I could store weight of vertex of different meshes into this attribute, like the following steps:
1. create a instance node of MyDeformer "myDeformer0";
2. set weight of vertex of mesh0 in this way:
setAttr "myDeformer0.weightsList[0].weights[0]" 0.0;
setAttr "myDeformer0.weightsList[0].weights[1]" 0.1;
...
setAttr "myDeformer0.weightsList[0].weights[10]" 1.0;
3. set weight of vertex of mesh1 in this way:
setAttr "myDeformer0.weightsList[0].weights[0]" 0.0;
setAttr "myDeformer0.weightsList[1].weights[1]" 0.1;
...
setAttr "myDeformer0.weightsList[1].weights[10]" 1.0;
I set the attribute weights to be paintable in this way:
makePaintable "myDeformer" "weights" -attrType "multiFloat" -sm "deformer";
If I select node "myDeformer0" and run this mel command:
evalEcho("artAttrToolScript 3 \"myDeformer\"");
then I can paint the weight in Maya Editor Window, and the values will be stored into "myDeformer0.weightsList[0].weights[*]".
But, my question is, how to paint the values of myDeformer0.weightsList[1].weights?
I know I can set the values of myDeformer0.weightsList[1].weights[*], but it's not painting.
What the artists needs is painting the weight in Maya Editor Window.
Could you give me any clue?
Cheers
yao