Modeling and Texturing Assist Tool

Creation of a simple tool with three user interface elements to assist in selection of face loops for modeling and surfacing prior to face loop selection in Maya.

Programming Language(s): Maya Environment Language (MEL)

This assist tool was created in 2008 before Maya had built in face loop selection.

The first User Interface (UI) element "face loop" works off a simple concept of selecting two vertically adjacent parallel edges on a polygon object then performing three snippets of MEL code that select the edge loops of the selected edges, converts the selected edge loops to faces, then shrinks the selection to only contain the faces between the the selected edge loops.

The second UI element "polar loop" works off a similar concept of selecting a polar vertex and the edge loop at the base of the pole then performing two snippets of MEL code to convert the selection to faces and shrink the selection to only the polar faces.

The third UI element is a simple call to the grow selection command for adjusting the selection of face loops to wider bands.

MEL Script:

global proc imbFaceLoop()
{
SelectEdgeLoop;
ConvertSelectionToFaces;
ShrinkPolygonSelectionRegion;
}

global proc imbPolarLoop()
{
ConvertSelectionToFaces;
ShrinkPolygonSelectionRegion;
}

global proc imbGrowSelection()
{
GrowPolygonSelectionRegion;
}

global proc imbUIFaceLoop()
{
if (`window -exists faceLoopTool`)
deleteUI faceLoopTool;

window -resizeToFitChildren true faceLoopTool;
columnLayout -columnAttach "both" 5 -rowSpacing 10 -columnWidth 100;
button -ann "Select two or more parallel adjacent edges." -width 100 - command ("imbFaceLoop();") -label "Face Loop";
button -ann "Using Multi-select, select the base of polar face loop and the polar vertex." -width 100 -command ("imbPolarLoop();") -label "Polar Loop";
button -ann "Will grow face loop selection on either side of the initial face loop(S)." -width 100 -command ("imbGrowSelection();") -label "Grow Selection";
setParent ..;

showWindow faceLoopTool;
}

imbUIFaceLoop();