Home Technical Talk

Can I automatically save as version 2012 in max 2013?

Junkie_XL
polycounter lvl 14
Offline / Send Message
Junkie_XL polycounter lvl 14
I must be blind, I can't find this option in max 2013. The rest of my co-workers have no interest in upgrading and are just sticking with 2012. I don't want to save-as and hit the drop-down box every single time before I check in a max file. Is there a way to set 2013 to just automatically save as 2012?

Replies

  • renderhjs
    Offline / Send Message
    renderhjs sublime tool
    perhaps with a little bit of maxscript
  • monster
    Offline / Send Message
    monster polycounter
    Try this: (Warning it will overwrite without asking, but that's the point right?)
    saveMaxFile (MaxFilePath + MaxFileName) saveAsVersion:2012 quiet:true
    

    I don't have 2012, but it works if I change it to 2011 and test that. BTW, you can paste that line of code into the listener, then select the line and drag an drop it to the tool bar. This will make a button for you.
  • Junkie_XL
    Offline / Send Message
    Junkie_XL polycounter lvl 14
    monster wrote: »
    Try this: (Warning it will overwrite without asking, but that's the point right?)
    saveMaxFile (MaxFilePath + MaxFileName) saveAsVersion:2012 quiet:true
    
    I don't have 2012, but it works if I change it to 2011 and test that. BTW, you can paste that line of code into the listener, then select the line and drag an drop it to the tool bar. This will make a button for you.

    Thanks. That seemed to work. Not really sure how you drag a line to the listener though to auto-create a button...?
  • Mark Dygert
    Copy the line, go into max, press F11, paste the line, then select it and drag it into the toolbar.

    Now every time you push that button it will execute the code.
  • polygrinder
    Great script. I like to save my Max files using the + button to save them in sequence instead of over writing the same file. Could this script be modified to save as 2012 files and to trigger to auto-save in a numbered sequence.

    thanks
  • Mark Dygert
    The save incremental "max saveplus" command is separate, with no modifiable parameters for version or file name like "saveMaxFile". BUT the version might already be saved into the existing file and the save incremental command just caries it over like it does with a lot of the other settings?

    So you MIGHT need to just save it with the right version ONCE and then save incremental will pull it correctly each time. But you should test it. If it works you just need to bind "save incremental" to a key.

    You could probably save your maxstart.max file with the right version, to the max/scenes folder and that way every time you load up max that will load and have the right version and you never really have to worry about it unless you use the save dialog and incorrectly set the version.

    Or if you really need to modify the exsisting code you need to build a "save incremental" command and append the file name and path from scratch, which could get tricky depending on if there are digits, how many there are, where they are in the file name, bla bla bla... It starts to get kind of complicated when you have to read something the user created because humans screw up names all the time hahaha.
  • Bryan Cavett
    Offline / Send Message
    Bryan Cavett polycounter lvl 19
    Polygrinder: you can try this hack script. I call it a hack because it needs to add a scene node and assign it the scene name so that I can use the "uniqueName" method which only works on scene nodes. This gives me an incremented file name which I can save the scene with and then delete the node.


    I havent tested it much but it was the quickest way to do it without trying to figure out all the stuff Mark mentioned.
    macroscript saveIncremental_2012
    category:"BCTools"
    (
    	if maxfilename != "" then
    	(
    		temp_node = box()
    		temp_node.name = substituteString maxfilename ".max" ""
    		temp_node.name = uniqueName temp_node.name numDigits:2
    		fileName = temp_node.name
    		delete temp_node
    		saveMaxFile (MaxFilePath + fileName) saveAsVersion:2012 useNewFile:true quiet:true
    	)
    	else
    	(
    		max file save
    	)
    )
    
Sign In or Register to comment.