/* recTess1.2 by Ced and Sapostudio grain.s@free.fr ------------------------------------------------- Visit the grain.S project at http://grain.s.free.fr ------------------------------------------------- Simple script, inspire by recPose (Matt Baer). Record all tesselation flags/sliders for all NURBS objects. Ignore non-NURBS object. USAGE : -Select all NURBS objects whom you want to record the tesselation attributs. -You can select non-NURBS objetcs, they will be ignored by the script. -Type "recTess" in the command line. -Open the script editor and select all lines between "recTess REC" ans "recTess STOP", and drag them to a shelf. -When you click on this new shelf, the recorded attributs will be recall.... LIMITATION : -You MUST have the selectionType script from Alexander "Joss" Khalyavin (download it from highend3d.com). -All the names of the NURBS objects MUST BE unique! The 1.1 version just check if you have the selectionType script. The 1.2 version now works correctly ... sorry, I'm not a hardcore programmer... */ ////////////debut global proc recTess () { //get the selection and reset var string $temp[] = `ls -sl`; string $thing; int $noNURBS = 0; int $yesNURBS = 0; //check if you have the selectionType script from Alexander "Joss" Khalyavin if (`exists selectionType`) { print ("//__________recTess REC_________" + ";\n"); for ($thing in $temp) { //check if the object is a NURBS surface if ( selectionType ( $thing , 1 ) == "nurbsSurface" ) { //record attributes float $temp = `getAttr ($thing + "." + "uDivisionsFactor" )`; print ("setAttr " + $thing + "." + "uDivisionsFactor" + " " + $temp + ";\n"); float $temp = `getAttr ($thing + "." + "vDivisionsFactor" )`; print ("setAttr " + $thing + "." + "vDivisionsFactor" + " " + $temp + ";\n"); float $temp = `getAttr ($thing + "." + "curvatureTolerance " )`; print ("setAttr " + $thing + "." + "curvatureTolerance " + " " + $temp + ";\n"); float $temp = `getAttr ($thing + "." + "smoothEdge" )`; print ("setAttr " + $thing + "." + "smoothEdge" + " " + $temp + ";\n"); float $temp = `getAttr ($thing + "." + "smoothEdgeRatio" )`; print ("setAttr " + $thing + "." + "smoothEdgeRatio" + " " + $temp + ";\n"); float $temp = `getAttr ($thing + "." + "edgeSwap" )`; print ("setAttr " + $thing + "." + "edgeSwap" + " " + $temp + ";\n"); float $temp = `getAttr ($thing + "." + "explicitTessellationAttributes" )`; print ("setAttr " + $thing + "." + "explicitTessellationAttributes" + " " + $temp + ";\n"); float $temp = `getAttr ($thing + "." + "modeU " )`; print ("setAttr " + $thing + "." + "modeU " + " " + $temp + ";\n"); float $temp = `getAttr ($thing + "." + "numberU" )`; print ("setAttr " + $thing + "." + "numberU" + " " + $temp + ";\n"); float $temp = `getAttr ($thing + "." + "modeV " )`; print ("setAttr " + $thing + "." + "modeV " + " " + $temp + ";\n"); float $temp = `getAttr ($thing + "." + "numberV" )`; print ("setAttr " + $thing + "." + "numberV" + " " + $temp + ";\n"); float $temp = `getAttr ($thing + "." + "useChordHeight" )`; print ("setAttr " + $thing + "." + "useChordHeight" + " " + $temp + ";\n"); float $temp = `getAttr ($thing + "." + "chordHeight" )`; print ("setAttr " + $thing + "." + "chordHeight" + " " + $temp + ";\n"); float $temp = `getAttr ($thing + "." + "useChordHeightRatio" )`; print ("setAttr " + $thing + "." + "useChordHeightRatio" + " " + $temp + ";\n"); float $temp = `getAttr ($thing + "." + "chordHeightRatio" )`; print ("setAttr " + $thing + "." + "chordHeightRatio" + " " + $temp + ";\n"); float $temp = `getAttr ($thing + "." + "useMinScreen" )`; print ("setAttr " + $thing + "." + "useMinScreen" + " " + $temp + ";\n"); float $temp = `getAttr ($thing + "." + "minScreen" )`; print ("setAttr " + $thing + "." + "minScreen" + " " + $temp + ";\n"); $yesNURBS++; } else { $noNURBS++; } } print ("//__________recTess STOP_________" + ";\n"); print ("//There was " + $yesNURBS + " NURBS objects and " + $noNURBS + " non-NURBS object" + ";\n"); } else { //message if you don't have the selectionType script error (" You must have the selectionType mel script from Alexander Joss Khalyavin. Download it it from www.highend3d.com" + ";\n"); } } /////////////fin;