// Copyright (C) 1997-2004 Alias Systems Corp.
// 
// The information in this file is provided for the exclusive use of the
// licensees of Alias.  Such users have the right to use, modify,
// and incorporate this code into other products for purposes authorized
// by the Alias license agreement, without fee.
// 
// ALIAS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
// INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
// EVENT SHALL ALIAS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
// CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
// DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
// TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.

//
// Alias Script File
// MODIFY THIS AT YOUR OWN RISK
//
// 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;
}

