// =========================================================================== // 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 ikSpringSolver() // // Description: // This mel procedure creates an ikSpringSolver node. // Additionally, it sets up the callbacks for the solver // to appear to remain persistent across (File->New) and // (File->Open) operations. After a (File->New) or // (File->Open), the callbacks recreate the ikSpringSolver // node. // // Note: // This method will automatically load the ikSpringSolver plugin // necessary. // { // Check to see if the plug-in is loaded // if( !`pluginInfo -q -l "ikSpringSolver"` ) { loadPlugin "ikSpringSolver"; } // Now create the node and register the callbacks // if( !`objExists ikSpringSolver` ) { // Turn off undo // undoInfo -swf false; // We do not wish to disrupt the selection list, so // record the active list and restore it after node creation. // string $sel[] = `ls -sl`; eval( "createNode -s -n ikSpringSolver ikSpringSolver" ); eval( "ikSpringSolverCallbacks" ); select -r $sel; // Restore undo // undoInfo -swf true; } // Finally inform solver related UI that the list of // available solvers has been modified. // ikUpdateSolverUI; }