// =========================================================================== // 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: // blendToolScript // // Input Arguments: // what is going to happen when this script is called // $setToTool = 0 ==> do the command // $setToTool = 1 ==> show option box // $setToTool = 2 ==> return the command // $setToTool = 3 ==> show tool option box // $setToTool = 4 ==> enter the tool // // Return Value: // None. // proc createBlendContext () { if( ! `scriptCtx -exists blendContext` ) { scriptCtx -i1 "blendSurface.png" -bcn "blend" -title (uiRes("m_blendToolScript.kBlendTool")) -toolCursorType "edit" -totalSelectionSets 2 -cumulativeLists false -showManipulators true -expandSelectionList true -exitUponCompletion true -fcs ("performBlendGiven $Selection1 $Selection2") -setNoSelectionPrompt (uiRes("m_blendToolScript.kSelectForLeftEdge")) -setSelectionPrompt (uiRes("m_blendToolScript.kSelectAdditionalForLeftEdge")) -setAutoToggleSelection true -setAutoComplete false -setSelectionCount 0 -isoparm true -curveOnSurface true -surfaceEdge true -setNoSelectionPrompt (uiRes("m_blendToolScript.kSelectForRightEdge")) -setSelectionPrompt (uiRes("m_blendToolScript.kSelectAdditionalForRightEdge")) -setAutoToggleSelection true -setAutoComplete false -setSelectionCount 0 -isoparm true -curveOnSurface true -surfaceEdge true blendContext; } } global proc string blendToolScript( int $setToTool ) // // Description : // $setToTool = 0 ==> do the command // $setToTool = 1 ==> show option box // $setToTool = 2 ==> return the command // $setToTool = 3 ==> show tool option box // $setToTool = 4 ==> enter the tool { string $tool = ""; if( $setToTool > 2 ) { createBlendContext; $tool = "blendContext"; } return scriptToolScript( "performBlend", $setToTool, $tool ); }