Search code examples
c++mayamel

Paint context and tool in maya for custom blendshape


I have created a custom blendshape node in maya with certain functionalities. It also, as a default maya blendshape, takes as input multiple targets which I would like to paint the weights for.

I watched the tutorial from Chad Vernon about doing it with a paintIndex attribute and callbacks but I would rather having basically the same paint tool as for the blendshape where you can see the different targets and choose for which one to paint for.

I have looked into the customtoolPaint.mel but the example seems to be broken in maya, at least for me.

I digged into a lot of artisan context and tools stuff but it seems like I can’t sort it out on my own. I guess that when starting to paint on my blendshape it will have to set the context to MyBlendShapeContext, which will have to be associated with a tool which will look like the blendshape one?

PS: I know I could have also inherited the MPxBlendShape as in the example SimpleBlendshape.mel but I wanted to do this also as a studying process.

Any hint on how to achieve this would be much appreciated! Cheers,


Solution

  • I contacted autodesk for the error with the customtoolPaint and it got fixed in the updates of maya. Following that as a reference is very useful.