// =========================================================================== // 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. // =========================================================================== string $sys = "cMuscleSystem1" ; // Change line above to be proper system node! int $ids[] = `cMuscleQuery -mus -idx -sys $sys` ; string $mOs[]= `cMuscleQuery -mus -sys $sys` ; if (size($ids) != size($mOs)) { warning -sl 0 (uiRes("m_fixDeletedMuscle.kDeletedMuscleDetected")) ; int $c ; for ($c=0; $c < size($ids); ++$c) { int $idx = $ids[$c] ; string $cons[] = `listConnections -s 1 -d 0 -p 0 -scn 1 ($sys+".muscleData["+$idx+"]")` ; if (size($cons) <= 0) { string $msg = (uiRes("m_fixDeletedMuscle.kDetectedMissingMuscle")); $msg = `format -stringArg $idx $msg`; print ($msg) ; removeMultiInstance -b true ($sys+".muscleData["+$idx+"]") ; } } print (uiRes("m_fixDeletedMuscle.kDeletedMuscleCorrectionComplete")) ; }