Untitled
unknown
plain_text
2 years ago
674 B
10
Indexable
//Exports every blend shape target of the specified node as an obj. Careful with the directory.
$projPath = "N:/spermageddon/feature/asset/char/";
$char = "brainJack";
$exportPath = "/shapes/dev/obj/";
$bsNode = "head_bs";
string $blendshapes[] = `listAttr -m -st "weight" $bsNode`;
$listSize = size($blendshapes);
for ($i=0; $i<$listSize; ++$i)
{
select p_head;
setAttr ($bsNode+"."+$blendshapes[$i]) 1;
file -force -options "groups=1;ptgroups=1;materials=0;smoothing=1;normals=1" -typ "OBJexport" -pr -es ($projPath + $char + $exportPath + $blendshapes[$i]+".obj");
setAttr ($bsNode+"."+$blendshapes[$i]) 0;
}Editor is loading...