Home Coding, Scripting, Shaders

(MEL) question about condition statement

polycounter lvl 16
Offline / Send Message
onionhead_o polycounter lvl 16
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

  • onionhead_o
    Offline / Send Message
    onionhead_o polycounter lvl 16
    someone from tech-artist pointed out the issue
    if (`size $objSel` == 1 && $flattenListNum = $UVCount[0])

    should be
    if (`size $objSel` == 1 && $flattenListNum == $UVCount[0<span>]){</span>
    it was suppose to be == instead of =
Sign In or Register to comment.