// =========================================================================== // 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. // =========================================================================== global proc ikHandleCycleSticky( ) // // Cycles through the sticky state of a handle: // // off -> sticky -> superSticky -> off, etc // { string $currentStickyness; string $selected[] = `ls -type ikHandle -sl`; if( size( $selected ) != 0 ) { string $cmd; for( $item in $selected ) { $currentStickyness = `ikHandle -q -s $item`; switch( $currentStickyness ) { case "off": $cmd = "ikHandle -e -s sticky "; break; case "sticky": /* // Super sticky is not supported yet. ikHandle -e -s "superSticky" $item; break; case "superSticky": */ $cmd = "ikHandle -e -s off "; break; } $cmd = $cmd + $item; evalEcho( $cmd ); } } else { warning( (uiRes("m_ikHandleCycleSticky.kNoHandlesSelected")) ); } }