found the solution to the problem after some more testing. But its very annoying that polyEvaluate -uvcoord results in an int array instead of just being a int. Anyhow here the working code.
{
int $flattenListNum = size(`ls -sl -fl`);
int $UVCount[] = `polyEvaluate -uvcoord`;
if ($flattenListNum < $UVCount[0]){
print "works";
}
else{
print "failed";
}
}
Since this code is part of this procedure I thought i’d ask here.
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;
}
with partial uvs selected on multiple objects, the code should print “Partial UVs selected”
but instead it prints multiple objects selected and then Partial UVs right after. I dont understand why this condition would ring true if (`size $objSel` > 1 && $flattenListNum = $UVCount[0])