// =========================================================================== // 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 invokeRigidSolverEditor() // // Invoke the attribute editor for the current rigid solver. { string $solverList[] = `ls -type rigidSolver`; int $i; int $solverCount = size($solverList); if ($solverCount == 0) { warning (uiRes("m_invokeRigidSolverEditor.kNoRigidBodySolversWarn")); return; } for ($i = 0; $i < $solverCount; $i++) { // If this solver is the current one, hi-lite, checkmark, etc. // string $cmdString = "getAttr " + $solverList[$i] + ".current"; if (eval($cmdString)) { // Make menu item for this solver // string $cmd = "showEditor " + $solverList[$i]; evalEcho($cmd); return; } } }