Hey. I had the idea to combine 3 standard commands in one toggle.
ConvertSelectionToContainedFaces
ConvertSelectionToVertexPerimeter
ConvertSelectionToEdgePerimeter
Originally selected face. When you press one key is too much between the outer vertices, edges, and a return to the inner face or the face group.
I think it's quite simple to implement with the help of programming and it will be a useful tool. I am hope for your help. Thank you!
Replies
I had the idea to combine 3 standard commands in one toggle.
ConvertSelectionToContainedFaces
ConvertSelectionToVertexPerimeter
ConvertSelectionToEdgePerimeter
Originally selected face. When you press one key is too much between the outer vertices, edges, and a return to the inner face or the face group.
Perhaps I did not quite understand the meaning of your message in the subject. I do not speak very well in English.
To use it, load up your script editor, paste the code below in mel, and middle mouse drag it to a shelf.
Every time you click the script, it will convert selection. Face -> Vertex -> Edge and repeat.
string $cSel[] = `ls -sl`; string $wSel1[]; string $wSel2[]; $numTok = tokenize($cSel[0], ".", $wSel1); $numTok = tokenize($wSel1[1], "[", $wSel2); if ($wSel2[0] == "f") { ConvertSelectionToVertexPerimeter; } else if ($wSel2[0] == "e") { ConvertSelectionToContainedFaces; } else if ($wSel2[0] == "vtx") { ConvertSelectionToEdgePerimeter; }Ok this should work.
Kudos to c.buliarca for the modified uv-to face code that i used.
string $cSel[]; string $wSel1[]; string $wSel2[]; string $selE[]; string $ffObj = ""; string $myFaces[]; int $selTyp; int $fObj1[]; clear($cSel); $numTok = ""; $numTok = ""; $cSel = `ls -sl`; $numTok = tokenize($cSel[0], ".", $wSel1); $numTok = tokenize($wSel1[1], "[", $wSel2); if ($wSel2[0] == "f") { ConvertSelectionToVertexPerimeter; SelectFacetMask; select -clear; SelectVertexMask; } else if ($wSel2[0] == "e") { clear($selE); $selE = `ls -sl -fl`; $selTyp = `selectType -q -meshComponents`; polyUVSet -create -uvSet "fSelUV" $wSel1[0]; polyUVSet -currentUVSet -uvSet "fSelUV" $wSel1[0]; clear $fObj1; $ffObj = ""; $fObj1 = `polyEvaluate -f`; $ffObj = ($wSel1[0]+".f[0:"+$fObj1[0]+"]"); select -r $wSel1[0]; polyProjection -ch 1 -type Planar -ibd off -kir -md z $ffObj; polyMapCut -ch 1 $selE; select -r ($wSel1[0]+".map["+$fObj1[0]+"]"); polySelectBorderShell 0; $myFaces = `polyListComponentConversion -fuv -tf -in`; select -r $myFaces; polyUVSet -uvs "fSelUV" -delete; hilite -r $wSel1[0]; InvertSelection; if($selTyp == 1){ selectType -meshComponents true; }else{ selectType -pf true; } SelectEdgeMask; select -clear; SelectFacetMask; } else if ($wSel2[0] == "vtx") { ConvertSelectionToContainedEdges; SelectVertexMask; select -clear; SelectEdgeMask; }This is awesome :-) Thanks for taking the time to do it mate !