// 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:  Mar. 14, 1997
//
//  Description:
//      Global function to make sure the options for insertKnot are set.
//
//  Input Arguments:
//      Force the factory setting or not.
//
//  Return Value:
//      None.
//

global proc insertKnotSetOptionVars( int $forceFactorySettings )
{
	// Keep Original option var.  This corresponds to the 
	// "-rpo/-replaceOriginal" flag for insertKnot commands.
	if ($forceFactorySettings || !`optionVar -exists insertKnotKeepOriginal`) {
		optionVar -intValue insertKnotKeepOriginal 0;
	}

	// -nk/-numberOfKnots int
	if ($forceFactorySettings || 
		!`optionVar -exists insertKnotNumberOfKnotsToInsert`) {
		optionVar -intValue insertKnotNumberOfKnotsToInsert 1;
	}

	// -add/-addKnots boolean
	if ($forceFactorySettings || 
		!`optionVar -exists insertKnotAddOrComplement`) {
		optionVar -intValue insertKnotAddOrComplement 1;
	}

	// -ib/-insertBetween boolean
	if ($forceFactorySettings || 
		!`optionVar -exists insertKnotBetween`) {
		optionVar -intValue insertKnotBetween 0;
	}



	if ($forceFactorySettings || !`optionVar -exists insertIsoKeepOriginal`) {
		optionVar -intValue insertIsoKeepOriginal 0;
	}

	if ($forceFactorySettings || 
		!`optionVar -exists insertIsoNumberOfIsosToInsert`) {
		optionVar -intValue insertIsoNumberOfIsosToInsert 1;
	}

	if ($forceFactorySettings || 
		!`optionVar -exists insertIsoAddOrComplement`) {
		optionVar -intValue insertIsoAddOrComplement 1;
	}

	if ($forceFactorySettings || 
		!`optionVar -exists insertIsoBetween`) {
		optionVar -intValue insertIsoBetween 0;
	}

	if ($forceFactorySettings || 
		!`optionVar -exists insertKnotIsoparm`) {
		optionVar -intValue insertKnotIsoparm 0;
	}
}
