// =========================================================================== // 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: 30 May 05 // // Description: // doAddMissingEffectors is the proc that is executed from the // Skeleton->FBIK->Add Missing Effectors menu // // global proc doAddMissingEffectors(string $typeFlag) { // We need to go to the stance pose so that any new joints // added to the skeleton will get the proper stance pose. // // To do so, we store the current pose, restore the stance // pose, and then restore the current pose after // adding the missing effectors. // string $tmpPose; string $stancePose = `characterize -q -stancePose`; if (size($stancePose)) { string $mem[] = `dagPose -q -m $stancePose`; $tmpPose = `dagPose -s $mem`; dagPose -r -g -n $stancePose; } string $cmd = "characterize -edit -addMissingEffectors"; $cmd = ($cmd + $typeFlag); int $result = `eval $cmd`; string $print = (uiRes("m_doAddMissingEffectors.kResult")); $print = `format -s $result $print`; print($print); if (size($stancePose)) { dagPose -r -g -n $tmpPose; delete $tmpPose; } }