// =========================================================================== // 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 int addPassiveToNSystem(string $passive, string $nucleus) { // TODO should check to see if the corresponding start is already connected // and do something meaningful if indices are out of sync string $attr = ($nucleus + ".inputPassive"); string $startattr = ($nucleus + ".inputPassiveStart"); int $nIndex = getNextFreeMultiIndex($attr, 0); connectAttr ($passive + ".currentState") ($attr + "[" + $nIndex + "]"); connectAttr ($passive + ".startState") ($startattr + "[" + $nIndex + "]"); setAttr ($passive + ".active") 0 ; // TODO set up the index connectrion return $nIndex; }