clean bloated max file

hi so after much research into the cause of files that are too large or take up too much memory i have found two scripts that do the heavy lifting for cleaning out a max file. i was hoping there was a way of combining them into one maxscript i can run from the tool bar. I don't know that much but i do know the following does not work:

please help

macroScript Clean
category:"Clean"
toolTip:"Clean"
buttonText:"Clean"
(
t=trackviewnodes;n=t[#Anim_Layer_Control_Manager];deleteTrackViewController t n.controller;gc()
t=trackviewnodes;n=t[#Max_MotionClip_Manager];deleteTrackViewController t n.controller;gc()
)

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
barigazy's picture

...

Are you tried this tool
http://www.scriptspot.com/3ds-max/scripts/cleaner

barigazy

hippiearchitect's picture

i have, but these two scripts

i have, but these two scripts do more to clean my bloated files then that script does.

3dwannab's picture

Or (Clean Motion Clips, Layer Controls + Retimer Managers)

macroScript Cleanup category:"3dwannab" buttontext:"Cleanup" tooltip:"Clean Motion Clips, Layer Controls + Retimer Managers resulting in smaller file sizes"
(
if querybox "Clean Motion Clips, Layer Controls + Retimer Managers by 3dwannab (◣_◢)\n\nAre you sure ?" title:"Cleanup by 3dwannab (◣_◢)" beep:true
	then
		(
		t=trackviewnodes
		n=t[#Max_MotionClip_Manager]
		if n!=undefined then deleteTrackViewController t n.controller
		gc()
		t=trackviewnodes
		n=t[#Anim_Layer_Control_Manager]
		if n!=undefined then deleteTrackViewController t n.controller
		gc()
		t=trackviewnodes
		n=t[#Retimer_Manager]
		if n!=undefined then deleteTrackViewController t n.controller
		gc()
		messagebox "Resave + reset max!!!!\n\nCleanup complete of:\n-------------------------------------------\nMax_MotionClip_Manager\nAnim_Layer_Control_Manager nodes\nRetimer_Managers\n-------------------------------------------\n\nGoodbye...(◣_◢)" title:"Cleanup by 3dwannab (◣_◢)"  beep:true
	)
	else
	(
		-- DO NOTHING
	)
)
[\code]
3dwannab's picture

Use code below

macroScript Cleanup category:"3dwannab" buttontext:"Cleanup" tooltip:"Clean Motion Clips + Layer Controls resulting in smaller file sizes"
(
if querybox "Clean Motion Clips + Layer Controls by 3dwannab (◣_◢)\n\nAre you sure ?" title:"Cleanup by 3dwannab (◣_◢)" beep:true
	then
		(
		t=trackviewnodes
		n=t[#Max_MotionClip_Manager]
		if n!=undefined then deleteTrackViewController t n.controller
		gc()
		t=trackviewnodes
		n=t[#Anim_Layer_Control_Manager]
		if n!=undefined then deleteTrackViewController t n.controller
		gc()
		messagebox "Cleanup complete of:\nMax_MotionClip_Manager + Anim_Layer_Control_Manager nodes\n\nGoodbye...(◣_◢)" title:"Cleanup by 3dwannab (◣_◢)"  beep:true
	)
	else
	(
		-- DO NOTHING
	)
)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.