Author Topic: Empty file = 9 MB!  (Read 5517 times)

2015-02-04, 22:56:41

cecofuli

  • Active Users
  • **
  • Posts: 1578
    • View Profile
    • www.francescolegrenzi.com
Hello to all,
maybe someone can help me.
I've this empty file, but I don't know why, it's 9MB!! O__O
I used this file to create some CoronaProxy from original 3D models.
I saw something strange in this file. So, I delete everything and, with surprise, the file site was very odd!
If I create an empty file, the size is ok (some KB). If I try to add one of this CProxy, I save the file and the size is again 9 MB.
I delete the proxy, save and... 9 MB!


Any suggestion?


2015-02-05, 00:45:38
Reply #2

3dwannab

  • Active Users
  • **
  • Posts: 362
    • View Profile
Here's a little script I wrote from all those forum guides before. It clears out all the nasty nodes left in the scene data like:
Max_MotionClip_Manager
Anim_Layer_Control_Manager nodes
Retimer_Managers

If you copy stuff from the file or insert them into another file it will 'infect' the host file too. So best clean any blotted files before doing anything with the file.

Code: [Select]
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
    )
)

2015-02-05, 11:05:25
Reply #3

cecofuli

  • Active Users
  • **
  • Posts: 1578
    • View Profile
    • www.francescolegrenzi.com
Thanks so much! Cleaner script doesn't do this ;-)

PS: stupid 3ds max...

2015-03-18, 00:59:10
Reply #4

3dwannab

  • Active Users
  • **
  • Posts: 362
    • View Profile
Updated version: Will automatically reload the scene after you rid it of any junk. It's a user option to of course to say no or cancel.

Code: [Select]
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()
                nrt=RetimerMan.numRetimers
                for i = 1 to nrt do(
                    j=nrt-i+1
                    n=RetimerMan.GetNthRetimer j
                    if n!=undefined then
                    (
                    if n.nummarkers==0 then
                    (
                    RetimerMan.DeleteRetimer j
                    )
                    )
                )
                if querybox "The file has been cleaned.\n\nThis script will now save and reload the same file for you, do you want to do this now ?" title:"Save and Reopen file?" beep:true
                then(
                        if maxFilename == "" then(
                            storenewfilename = getSaveFileName getSaveFileName() --+ ".max"  caption:"Cleanup by 3dwannab (◣_◢)"
                            if storenewfilename == undefined then messagebox "Output File Not Set !" title:"Cleanup by 3dwannab (◣_◢)"  beep:true
                            else
                            (
                            saveMaxFile storenewfilename quiet:on
                            loadMaxFile storenewfilename quiet:on
                            )
                        )
                        else(
                            storeoldfilename = (maxFilePath + maxFilename)
--                             --saveNodes #() storeoldfilename quiet:on
--                             --checkForSave()
                            saveMaxFile storeoldfilename quiet:on
                            loadMaxFile storeoldfilename quiet:on
                        )       
                )
            )
)

If you notice any bugs let me know :)
« Last Edit: 2015-03-18, 01:06:52 by 3dwannab »

2015-03-18, 08:58:19
Reply #5

Image Box Studios

  • Active Users
  • **
  • Posts: 501
    • View Profile
    • IMAGE BOX STUDIOS
Available script is nice but you can also open your file into up version and save file....it works well....i mean to say that if you are using max 2013 then open your file into max 2014 and save it. hope it will work for you too.

2015-03-18, 15:00:23
Reply #6

3dwannab

  • Active Users
  • **
  • Posts: 362
    • View Profile
So you saying the bug is gone from 2014 up or just that you do the steps you mention by saving down to the version you're using with the next version of max?

2015-03-19, 07:52:49
Reply #7

Image Box Studios

  • Active Users
  • **
  • Posts: 501
    • View Profile
    • IMAGE BOX STUDIOS
So you saying the bug is gone from 2014 up or just that you do the steps you mention by saving down to the version you're using with the next version of max?

Hi..this technique work well in my scenes. ...What version are you using. if you are using max 2013 then simply open your file with max 2014 and hit the save button. see the file size, thats it.