sambalbij
10-19-2009, 02:31 PM
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. :banghead:
So if anyone has a few suggestions, they would make me a happy man. :buttrock:
Cheers
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. :banghead:
So if anyone has a few suggestions, they would make me a happy man. :buttrock:
Cheers
