Community
Maya Programming
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya SDK topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to remove unused Time-Editor-clip in a scene ?

5 REPLIES 5
Reply
Message 1 of 6
buonnguqua
1272 Views, 5 Replies

How to remove unused Time-Editor-clip in a scene ?

If I use Trax Editor Clip, I can press Optimize Scene>Animation Clips>Optimize Now

But Time-Editor-clip not have button and function Smiley Mad

Tags (1)
5 REPLIES 5
Message 2 of 6
mspeer
in reply to: buonnguqua

Hi!

This seems to be currently not possible by using the UI, do it manual or create a custom script.

Message 3 of 6
buonnguqua
in reply to: mspeer

Maybe you can suggest me some function from Autodesk can do it ?

Message 4 of 6
buonnguqua
in reply to: buonnguqua

timeEditor -allClips "container" only show ID of all clip ?

How to get all name Clipsource in Composition ?

Anyone can answer me ? Smiley Frustrated

Message 5 of 6
buonnguqua
in reply to: mspeer

After severeal days reading basic of MEL, I done it Smiley Very Happy

 

//Remove unused Time Editor Clip in a Scene
//How to used: Open Scene. Click to timeEditor=>Sources in Outliner and run Script !!!
{
//get name of all ClipSource
string $allclip[]=`ls -sl`;
print ("File have "+`size $allclip`+" clip sources\n");
print $allclip;
print ("\n");
//get ID of clips in Time Editor
int $IDclipinComp[]=`timeEditor -allClips "container"`;
print ("ID of Clips in Composition windows\n");
print ($IDclipinComp);
print ("\n");
int $j=`size $IDclipinComp`-1;
print ("In Composition track have "+$j+" clip sources\n");
int $i;
string $NameClipSourceinComp[];
for( $i = 0; $i <= $j; $i++ )
    {
        $NameClipSourceinComp[$i]=`timeEditorClip -q -animSource $IDclipinComp[$i]`;
        //print $i;
        print ($NameClipSourceinComp[$i]+"\n");
    }
string $can_xoa[] = stringArrayRemove($NameClipSourceinComp,$allclip);
delete $can_xoa;
print ("I delele it\n");
string $newallclip[]=`ls -sl`;
print ("File after clean have "+`size $newallclip`+" clip sources\n");
}

Tags (1)
Message 6 of 6
laomusic_arts
in reply to: buonnguqua

Hi!

After gaving each solution here a try, what works for me in Maya 2018.7 & Arnold 4021 is:
- check our Outilner for timeEditor entry

- under Windows/Animatin Editors/TimeEditor
- delete any Composition on the drop down list

- Optimize Scene

 

Hope this helps others too!
Enjoy!
LAO

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report