View Single Post
# 1 06-03-2006 , 12:41 AM
Falott's Avatar
Registered User
Join Date: Jan 2005
Location: vienna
Posts: 1,095

snapVertsToZero_X.mel

I´ve been working on this for some time now and finally got it working yippeee!




// snapVertsToZero_X.mel
// this script selects borderVerts and snaps them to 0 on x-axis
// select your object and execute

global proc snapVertsToZero_X(){
ConvertSelectionToVertices;
SelectPolygonSelectionBoundary;

// filter selected points
string $selVerts[] = `filterExpand -fullPath 1 -expand 1-sm 31`;
string $vtx;

//select each vertex in array
for ($vtx in $selVerts){

//and snap it to x-axis
setAttr ($vtx + ".pntx") 0;

}
}


everything starts and ends in the right place at the right time.

Last edited by Falott; 07-03-2006 at 04:47 PM.