I just want to add a little update on follicleOnMeshVertex, but it's possible to do same thing on other parts of course.
You can put a follicle on a specific uvSet. Actually, the script only connects on MAP1.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
global proc follicleOnMeshVertex()
{
string $allOfperMv[] = `ls -sl -fl`;
string $HZmeshNode[] = `listRelatives -p $allOfperMv[0]`;
for($i=0;$i<size($allOfperMv);$i++)
{
string $HZuvMap[] = `polyListComponentConversion -fromVertex -toUV $allOfperMv[$i]`;
float $HZUVpos[] = `polyEditUV -q $HZuvMap[0]`;
// query current uvSet
string $myUVSet[] = `polyUVSet -q -currentUVSet`;
string $indexOfMv[];
tokenize $allOfperMv[$i] "[]" $indexOfMv;
//print $indexOfMv;
string $follicleShape = `createNode follicle -n ($HZmeshNode[0]+"FLv_"+$indexOfMv[1])`;
string $follicleTransform[] = `listRelatives -parent $follicleShape`;
connectAttr -f ($HZmeshNode[0] + ".worldMatrix[0]") ($follicleShape+".inputWorldMatrix");
connectAttr -f ($HZmeshNode[0] + ".outMesh") ($follicleShape+".inputMesh");
connectAttr -f ($follicleShape + ".outTranslate") ($follicleTransform[0]+".translate");
connectAttr -f ($follicleShape +".outRotate") ($follicleTransform[0] + ".rotate");
// allocation of follicle on current uv_set
setAttr -type "string" ($follicleShape +".mapSetName") ($myUVSet[0]);
setAttr ($follicleTransform[0] +".parameterU") $HZUVpos[0];
setAttr ($follicleTransform[0] +".parameterV") $HZUVpos[1];
}
}
|
Just it -
I just want to add a little update on follicleOnMeshVertex, but it's possible to do same thing on other parts of course.
You can put a follicle on a specific uvSet. Actually, the script only connects on MAP1.
Just it -