So im writing this code that reads if User has partial uvs selected
global proc string getNormalizeType(){
string $objSel[] = `ls -sl -o`; //get objects only
float $UVBBox[] = `polyEvaluate -bc2`;
global string $normalizeType;
int $flattenListNum = size(`ls -sl -fl`);
int $UVCount[] = `polyEvaluate -uvcoord`;
if (`size $objSel` == 0){
warning "No objects selected";
}
if (`size $objSel` == 1 && $flattenListNum = $UVCount[0]){
NormalizeUVTile 0;
print "Single Object Selected";
}
if (`size $objSel` > 1 && $flattenListNum = $UVCount[0]){
NormalizeUVTile 1;
print "Multiple Object selected";
}
if ($flattenListNum < $UVCount[0]){
NormalizeUVTile 2;
print "Partial UVs selected";
}
return $normalizeType;
}
wierd thing is when I selected partial uvs on multiple objects. the 3rd condition will ring True. I have no idea why? Help please?
Replies