//[MEL] UV列挙サンプル
proc getTexturingCoords( string $mesh )
{
// get number of uvs on the mesh
int $uvCount[] = `polyEvaluate -uv $mesh`;// write the number of UV coords
print( "numTexCoords=" + $uvCount[0] + "\n" );// add each uv coord to the string also
for( $i=0;$i<$uvCount[0];$i++)
{
// get the uv coord
float $uvs[] = `getAttr ($mesh + ".uv[" +$i+"]")`;// print it's value
print( $uvs[0] + " " + $uvs[1] + "\n" );
if( 1.0 < $uvs[0] || 0.0 > $uvs[0] || 1.0 < $uvs[1] || 0.0 > $uvs[1] ){
select -r ($mesh + ".map[" + $i + "]");
}
}
}
string $tmp[] = `ls -sl`;
select -clear;
getTexturingCoords($tmp[0]);
2007年04月04日
UV列挙サンプル
この記事へのコメント
コメントを書く
この記事へのトラックバック