Hey JP,

I had the same question last month, googled it and quickly found good ol'
Chad Vernon resources page :)

http://www.chadvernon.com/blog/resources/maya-api-programming/deformers/

Everything's finely detailed in this page.




On Fri, Aug 19, 2011 at 2:21 PM, JP <[email protected]> wrote:

> Hey all,
>
> Looking for some advice on how to give an attribute paintable weights
> in a custom node.  The node has a bunch of muscle objects connected to
> it, and writes data to a mesh based on each muscle's stretching/
> squashing and a set of weights for each muscle.
>
> I set up the node's attributes as follows:
>
> -inMesh
> -outMesh
> -muscle[] (compound array)
>  -defaultLength(float)
>  -currentLenght(float
>  -squashLen(float)
>  -stretchLen(float)
>
> -weightList[](compound array)
>  -weights[](double array, logical indices correspond with .muscle
> indices)
>
> The weightList is set up list a skinCluster's, where weightList
> indices correspond with verts and weights indicies correspond with the
> indices of muscle attr.
>
> In the compute function, I'm multiplying each muscle's stretching or
> squashing by a weight value that I've copied from the muscle node's
> sticky weights.  What I would like to be able to do is start by
> copying these weights into my node, but have the ability to further
> paint them, but I can't figure out how the makePaintable command is
> supposed to work.
>
> It seems like an odd command that supposed to just 'make some
> attribute paintable', but you obviously have to write the compute
> function of a node to take advantage of an array of weights.  So how
> is this command supposed to be used?  If anyone could shed some light
> on this for me, I'd be very grateful!
>
> Best,
> JP
>
> --
> view archives: http://groups.google.com/group/python_inside_maya
> change your subscription settings:
> http://groups.google.com/group/python_inside_maya/subscribe
>

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe

Reply via email to