Message 1 of 10
(MEL Syntax Help) Testing boundary.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Im trying to figure out how to fix the syntax for this script i have been building for selection UVs within a specified boundary. First proc is to get the faces of the Objects selected in scene without actually selecting all the faces. Second proc is actually testing the bounds using polyUVCoverage to test the bounds. It is a new maya cmd in 2017+.
The syntax error im getting is
// Error: $remainfaces = `stringArrayRemove($tempStoreShellFaces,$facesList)`; //function for removing the duplicate faces in array
//
// Error: Line 29.57: Syntax error //
global proc string[] getObjectFaces(){ string $selOBJs[] = `ls -selection -objectsOnly`; string $plylistConOBJs[]; string $combList[]; for($i = 0; $i < size($selOBJs); $i++){ $plylistConOBJs[$i] = ($selOBJs[$i] + ".vtx[*]"); } print $plylistConOBJs; string $convertedList[] = `polyListComponentConversion -fv -tf $plylistConOBJs`; $combList = $convertedList; return $combList; //print $combList; //dont use for objects with lots of faces, it will take forever to print. } global proc testBoundary(){ string $combFacesList [] = `getObjectFaces`; string $facesList[] = `ls -flatten $combFacesList`; string $faceShellList[] = {}; string $uvShellList[] = {}; string $tempStoreShellFaces[] = {}; string $remainfaces[] = {}; for ($faces in $facesList) { $uvShellList[size($uvShellList)] = `polyListComponentConversion -tuv -uvs $faces`; //get uvShells $faceShellList[size($faceShellList)] = `polyListComponentConversion -fuv -tf $uvShellList[size($uvShellList)]`; //convert list to faceShells $tempStoreShellFaces = `ls -flatten $faceShellList[size ($faceShellList)]`; //flatten list for removing $remainfaces = `stringArrayRemove($tempStoreShellFaces,$facesList)`; //function for removing the duplicate faces in array $facesList = $remainfaces; //update faceList } float $statement; string $tileFaces[]; for ($faces in $faceShellList) // for loop for testing boundary { $statement = (float(floatArrayToString(`polyUVCoverage $faces`,""))); if ($statement != 0) { $tileFaces[size($tileFaces)] = $faces; } else{ continue; } } select -r $tileFaces; //select faces within bounds ConvertSelectionToUVShell; } testBoundary;
any help is appreciated
https://www.artstation.com/kelvintam