// =========================================================================== // 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: // detachCurveToolScript // // Description: // create wrapper around the detachCurve 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 detachCurveToolSetup( int $forceFactorySettings, string $goToTool ) { if( $forceFactorySettings || !`optionVar -ex detachCurveEuc` ) { optionVar -iv detachCurveEuc 0; } if( $forceFactorySettings || !`optionVar -ex detachCurveLac` ) { optionVar -iv detachCurveLac 1; } if( "" != $goToTool ) { scriptCtx -e -euc `optionVar -q detachCurveEuc` $goToTool; scriptCtx -e -lac `optionVar -q detachCurveLac` $goToTool; } } global proc detachCurveValues ( string $toolName ) { performDetach 3 "Curve" $toolName; scriptCtxCommonValues( $toolName ); } global proc detachCurveProperties() { scriptCtxCommonProperties; } proc createDetachCurveContext( string $tool ) { if( ! `scriptCtx -exists $tool` ) { detachCurveToolSetup( 0, "" ); scriptCtx -i1 "detachCurve.png" -title (uiRes("m_detachCurveToolScript.kDetachTool")) -bcn "detachCurve" -exitUponCompletion `optionVar -q detachCurveEuc` -totalSelectionSets 1 -expandSelectionList true -fcs ("detachCurveToolScript 0") -setNoSelectionPrompt (uiRes("m_detachCurveToolScript.kSelectPoints")) -setSelectionPrompt (uiRes("m_detachCurveToolScript.kSelectAdditionalPoints")) -setAutoToggleSelection true -setAutoComplete `optionVar -q detachCurveLac` -showManipulators true -setSelectionCount 0 -curveParameterPoint true -editPoint true $tool; } } global proc string performDetachCurve( int $action, string $goToTool ) { return performDetach( $action, "Curve", $goToTool ); } global proc string detachCurveToolScript( 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 modelWithToolDetachCurve` ) { $setToTool = 4 - $setToTool; } else { $tool = "detachCurveContext"; createDetachCurveContext $tool; } } return scriptToolScript( "performDetachCurve", $setToTool, $tool ); }