Home Technical Talk

Maya Python \ Mel - select polygons inside edges

Saf
polycounter lvl 11
Offline / Send Message
Saf polycounter lvl 11
I need mel or python script to highlight polygons inside edges.
8d1da2125d27e4b88cee4040a1d1a1fb.png

ConvertSelectionToContainedFaces not working
Thanks for any help!

Replies

  • c.buliarca
    Options
    Offline / Send Message
    c.buliarca polycounter lvl 11
    Hope this helps, the problem is that the script doesn't know witch side to select but it will select one side, if it's the wrong one you just have to use Inverse Selection(Ctrl+Shift+I)

    string $selE[] =`ls -sl -fl`;
    int $selTyp = `selectType -q -meshComponents`;
    string $temp[];
    tokenize $selE[0] "."  $temp;
    string $theObj = $temp[0];
    polyUVSet -create -uvSet "TempWWWUvSetB" $theObj;
    polyUVSet -currentUVSet -uvSet "TempWWWUvSetB" $theObj;
    int $fObj1[] = `polyEvaluate -f`;
    string $ffObj = ($theObj+".f[0:"+$fObj1[0]+"]");
    select -r $theObj;
    polyProjection -ch 1 -type Planar -ibd off -kir  -md z $ffObj;
    polyMapCut -ch 1 $selE;
    select -r ($theObj+".map["+$fObj1[0]+"]");
    polySelectBorderShell 0;
    string $shUV[] = `ls -sl -fl`;
    string $myFaces[] = `polyListComponentConversion -fuv -tf -in`;
    select -r $myFaces;
    polyUVSet -uvs "TempWWWUvSetB" -delete;
    hilite -r $theObj;
    if($selTyp == 1){
      selectType -meshComponents true;  
    }else{
        selectType -pf true;
    }
    
  • Saf
    Options
    Offline / Send Message
    Saf polycounter lvl 11
    Thank you very much, added invertSelection; now works as wanted :thumbup:
Sign In or Register to comment.