// =========================================================================== // 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: // offsetCosToolScript // // Description: // create wrapper around the offsetCos command // // Input Arguments: // 0 ==> do the command. // 1 ==> show the tool/action option box // 2 ==> return the command // 3 ==> show tool/action option box // 4 ==> enter the tool // // Return Value: // None. // global proc offsetCosToolSetup( int $forceFactorySettings, string $goToTool ) { global int $gStartWithAutoComplete; if( $forceFactorySettings || !`optionVar -ex offsetCosEuc` ) { optionVar -iv offsetCosEuc 0; } if( $forceFactorySettings || !`optionVar -ex offsetCosLac` ) { optionVar -iv offsetCosLac $gStartWithAutoComplete; } if( "" != $goToTool ) { scriptCtx -e -euc `optionVar -q offsetCosEuc` $goToTool; scriptCtx -e -lac `optionVar -q offsetCosLac` $goToTool; } } global proc offsetCosValues ( string $toolName ) { performOffsetCos 3 $toolName; scriptCtxCommonValues( $toolName ); } global proc offsetCosProperties() { scriptCtxCommonProperties; } proc createOffsetCosContext( string $tool ) { if( ! `scriptCtx -exists $tool` ) { offsetCosToolSetup( 0, "" ); scriptCtx -i1 "offsetCos.png" -title (uiRes("m_offsetCosToolScript.kOffsetCurveSurfaceTool")) -bcn "offsetCos" -exitUponCompletion `optionVar -q offsetCosEuc` -totalSelectionSets 1 -expandSelectionList true -fcs ("offsetCosToolScript 0") -setNoSelectionPrompt (uiRes("m_offsetCosToolScript.kSelectCurves")) -setSelectionPrompt (uiRes("m_offsetCosToolScript.kSelectAdditionalCurves")) -setDoneSelectionPrompt (uiRes("m_offsetCosToolScript.kComputeOffset")) -setAutoToggleSelection true -setAutoComplete `optionVar -q offsetCosLac` -setAllowExcessCount true -showManipulators true -setSelectionCount 0 -isoparm true -curveOnSurface true -surfaceEdge true $tool; } } global proc string offsetCosToolScript( int $setToTool ) // // Description : // 0 ==> do the command. // 1 ==> show the action option box // 2 ==> return the command // 3 ==> show tool/action option box // 4 ==> enter the tool/do the command { string $tool = ""; if( $setToTool > 2 ) { if( !`optionVar -q modelWithToolOffsetCoS` ) { $setToTool = 4 - $setToTool; } else { $tool = "offsetCosContext"; createOffsetCosContext $tool; } } return scriptToolScript( "performOffsetCos", $setToTool, $tool ); }