10 October 2009 | |
![]() |
|
New Member
portfolio
Flip
amsterdam,
Netherlands
|
How to set skinweight value according uv coordinates
Hi,
Having a bit of a problem over here. Don't know too much about MEL, and I wan't to make something. I have a cube with some subdivisions skinned to two bones and i want the v-position of a uv to determine the influence of a vertex to one of those bones. What i figured out so far from maya help: // To query the u and v values of selected uvs: polyEditUV -query ; // Assign weights to a large number of vertices, several at a time to // reduce the number of calls to the skinPercent command. // for ( $i = 0; $i <= 675; $i +=10 ) { skinPercent -transformValue joint1 0.5 -transformValue joint2 0.5 skinCluster1 pPlane1.vtx[$i] pPlane1.vtx[$i+1] pPlane1.vtx[$i+2] pPlane1.vtx[$i+3] pPlane1.vtx[$i+4] pPlane1.vtx[$i+5] pPlane1.vtx[$i+6] pPlane1.vtx[$i+7] pPlane1.vtx[$i+8] pPlane1.vtx[$i+9]; } And at that time i also figured out i didn't know enough about MEL to make it work. ![]() So if anyone has a few suggestions, they would make me a happy man. ![]() Cheers |
10 October 2009 | |
![]() |
|
Lord of the posts
Robert Bateman
Software Engineer
United Kingdom
|
This:
not this!
The latter is for *good* OOP languages, and mel is most certainly not one of those! You must construct a text string of the attribute to query that value via getAttr.... |
10 October 2009 | |
![]() |
|
Expert
|
Thread automatically closed
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities Note that as CGTalk Members, you agree to the terms and conditions of using this website. |
Thread Closed share thread |
«
Previous Thread
|
Next Thread
»
|
|
|