// =========================================================================== // 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. // =========================================================================== // // // Procedure Name: // clipWeightGraph // // Description: // Bring up the graph editor with the selected clip's weight curve. // // Input Arguments: // $editor - trax editor window // // Return Value: // None // global proc clipWeightGraph (string $clipN[]) { if (size($clipN) == 0) { error( (uiRes("m_clipWeightGraph.kSelectAnAnimClip")) ); } else if (`nodeType $clipN[0]` == "cacheFile"){ string $selCacheClips[]; $selCacheClips[0]= $clipN[0]; cacheClipWeightGraph($selCacheClips); return; } string $sch = getClipScheduler($clipN[0]); int $clipIndex = getClipIndex($clipN[0], $sch); string $clipName = `clipSchedule -ci $clipIndex -q -n $sch`; string $weightC = ($clipName + "_weight"); string $checkIfWeightExists[] = `ls $weightC`; if (size($checkIfWeightExists) > 0) { select -r $weightC; tearOffRestorePanel (localizedPanelLabel( "Graph Editor" )) "graphEditor" true; selectKey $weightC; refresh; FrameSelected; } else { error( (uiRes("m_clipWeightGraph.kThereIsNoWeightCurve")) ); } }