getAttr of a skinCluster weightList attribute on nurbsSurfaces

19 views
Skip to first unread message

Nicolas Combecave

unread,
Aug 31, 2009, 12:21:38 PM8/31/09
to maya_d...@googlegroups.com
Hi,
First, thanks to all of you who set up this new list so fast after the shutdown of the famous highend3d listServer!

So, I am dealing with some strange behaviour of the weightList attribute of the skinCluster node, especially when it deforms a periodic nurbsSurface:

  • you must perform the getAttr 3 times in a row to gather all the actual weights (why?).
  • you also gather some "ghost" weights, that must refer to some invisible "continuity" cvs...
  • more, the indices of this attribute, in this case (as for the lattice components), are build (and should be accessed?) with a formula (cvIndex = (totalV * uIndex + vIndex) that I can't accomodate with.

My goal is to get/set skinning weightValues as fast as possible (in mel), so that's why I try to tame this strange beast ;)

Anyone have already dealt with this kind of data?
Any advice?


Nicolas

P.S. As I said, I just use mel, api is not an option as for now.




julian mann

unread,
Aug 31, 2009, 10:59:41 PM8/31/09
to maya_d...@googlegroups.com
Seems that there are the same number of weights as CVs, but the indices are not contiguous.

`getAttr -size skinCluster1.weightList` == size (`ls -flatten "nurbsSphereShape1.cv[*]"`)

the weights list on this sphere has indices 0-7 then it skips 3, starts again at 11-18, skips 3 and so on.It goes to index 73. Is this related to what you are seeing?

i didn't have any problem doing getAttr. Got all the plugs (the sparse list) with :
 listAttr -m skinCluster1.weightList

these worked for me
getAttr skinCluster1.weightList[4].weights[0];
// Result: 0.000206285 //
getAttr skinCluster1.weightList[4].weights;
// Result: 0.000206285 0.998395 0.00139868 //

julian

2009/8/31 Nicolas Combecave <zezebub...@gmail.com>

Nicolas Combecave

unread,
Sep 2, 2009, 9:24:50 AM9/2/09
to maya_d...@googlegroups.com
Thanks for the quick reply Julian,

Sorry for the late answer, we got a little bunch of non-related tasks to solve right now, so I'll take a deeper look back into it quite soon^^
I'll share my findings here on the list...
Nicolas
Reply all
Reply to author
Forward
0 new messages