// =========================================================================== // Copyright 2018 Autodesk, Inc. All rights reserved. // // Use of this software is subject to the terms of the Autodesk license // agreement provided at the time of installation or download, or which // otherwise accompanies this software in either electronic or hard copy form. // =========================================================================== // // // Creation Date: 14 January 1999 // // Procedure Name: // modelWithType // // Description: // Set or get the values for the output geometry type // // Input Arguments: // -1 --> query and return what the current settings are // 0 --> set all to NURBS // 1 --> set all to polys // 2 --> set all to subd's // 3 --> set all to beziers // // Return Value: // 0 if all are NURBS, 1 if all are polys, 2 if all are subd's, // 3 if all are beziers, -1 if its mixed. // global proc int modelWithType( int $type ) { int $val; if( -1 == $type ) { $val = `optionVar -q bevelOutputPolygons`; if( `optionVar -q birail1OutputPoly` != $val ) return -1; if( `optionVar -q birail2OutputPoly` != $val ) return -1; if( `optionVar -q birail3OutputPoly` != $val ) return -1; if( `optionVar -q blendOutputPoly` != $val ) return -1; if( `optionVar -q boundaryPolys` != $val ) return -1; if( `optionVar -q circularFilletOutputPolygons` != $val ) return -1; if( `optionVar -q extrudeOutputPolygons` != $val ) return -1; if( `optionVar -q freeFormFilletOutputPolygons` != $val ) return -1; if( `optionVar -q loftPolys` != $val ) return -1; if( `optionVar -q planarTrimPolys` != $val ) return -1; if( `optionVar -q rebuildSurfacePolys` != $val ) return -1; if( `optionVar -q revolveOutputPolygons` != $val ) return -1; if( `optionVar -q squareSrfPolys` != $val ) return -1; if( `optionVar -q sweepOutputPolygons` != $val ) return -1; } else { optionVar -iv bevelOutputPolygons $type; optionVar -iv birail1OutputPoly $type; optionVar -iv birail2OutputPoly $type; optionVar -iv birail3OutputPoly $type; optionVar -iv blendOutputPoly $type; optionVar -iv boundaryPolys $type; optionVar -iv circularFilletOutputPolygons $type; optionVar -iv extrudeOutputPolygons $type; optionVar -iv freeFormFilletOutputPolygons $type; optionVar -iv loftPolys $type; optionVar -iv planarTrimPolys $type; optionVar -iv rebuildSurfacePolys $type; optionVar -iv revolveOutputPolygons $type; optionVar -iv squareSrfPolys $type; optionVar -iv sweepOutputPolygons $type; $val = $type; } return $val; }