// =========================================================================== // 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: // loftToolScript // // Description: // create wrapper around the loft command // // Input Arguments: // 0 ==> do the command. // 1 ==> show the action option box // 2 ==> return the command // 3 ==> show tool option box // 4 ==> enter the tool // // Return Value: // None. // global proc loftToolSetup( int $forceFactorySettings, string $goToTool ) { global int $gStartWithAutoComplete; if( $forceFactorySettings || !`optionVar -ex loftEuc` ) { optionVar -iv loftEuc 0; } if( $forceFactorySettings || !`optionVar -ex loftLac` ) { optionVar -iv loftLac $gStartWithAutoComplete; } if( "" != $goToTool ) { scriptCtx -e -euc `optionVar -q loftEuc` $goToTool; scriptCtx -e -lac `optionVar -q loftLac` $goToTool; } } global proc loftValues ( string $toolName ) { performLoft 3 $toolName; scriptCtxCommonValues( $toolName ); } global proc loftProperties() { scriptCtxCommonProperties; } proc createLoftContext( string $tool ) { if( ! `scriptCtx -exists $tool` ) { loftToolSetup( 0, "" ); string $selectAdditionalCurves = (uiRes("m_loftToolScript.kSelectAdditionalCurves")); scriptCtx -i1 "skin.png" -title (uiRes("m_loftToolScript.kLoftTool")) -bcn "loft" -totalSelectionSets 2 -exitUponCompletion `optionVar -q loftEuc` -expandSelectionList true -forceAddSelect true -fcs ("loftToolScript 0") -setNoSelectionPrompt (uiRes("m_loftToolScript.kSelectCurves")) -setSelectionPrompt $selectAdditionalCurves -setAllowExcessCount false -setAutoToggleSelection true -setAutoComplete 1 -setSelectionCount 1 -nurbsCurve true -isoparm true -curveOnSurface true -surfaceEdge true -polymeshEdge true -nurbsSurface true -setNoSelectionPrompt (uiRes("m_loftToolScript.kSelectCurvesToLoft")) -setSelectionPrompt $selectAdditionalCurves -setAllowExcessCount true -setAutoToggleSelection true -setAutoComplete `optionVar -q loftLac` -setSelectionCount 0 -nurbsCurve true -isoparm true -curveOnSurface true -surfaceEdge true -polymeshEdge true -nurbsSurface true $tool; } } global proc string loftToolScript( 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 action { string $tool = ""; if( $setToTool > 2 ) { if( !`optionVar -q modelWithToolLoft` ) { $setToTool = 4 - $setToTool; } else { $tool = "loftContext"; createLoftContext $tool; } } return scriptToolScript( "performLoft", $setToTool, $tool ); }