CGTalk > Software > Autodesk 3ds max > 3dsMax SDK and MaxScript
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 10-13-2012, 06:09 AM   #1
spacefrog
Frog of the posts
 
spacefrog's Avatar
Josef Wienerroither
Freelance
Vienna, Austria
 
Join Date: Sep 2002
Posts: 2,531
"SaveToPrevious" Maxscript/global struct on scriptspot...

I just posted a maxscript on scriptspot, which makes saving to previous Max versions a bit easier. Essentially it introduces a new global struct called "SaveVersionhandler" which provides an simple to use "SaveToVersion <max version>" function.

This function has several safety measures built in and saves the current scene to a Maxfile of specified version and attaches a "_M201x" suffix to the filename automatically. Macroscripts are also created (on demand only) to make it easy to map the function call to keyboard/menu or button.

The full signature of the saveToprevious function looks like this:

Code:
SaveVersionHandler.SaveToVersion <MaxVersion> [fileName:<filename>] [quiet:true|false]


eg. this saves to Max 2010 version, the filename will be "<currentscenename>_M2010.max".
Code:
SaveVersionHandler.SaveToVersion 2010

If this scene already exists, you will be prompted to overwrite or cancel...
The script itself is future proof, and adapts to future Max versions automatically

By default there are no macroscripts for UI access installed.
You can create them easily by calling the following function ( required only ONCE).
Code:
SaveVersionHandler.CreateMacroscripts()

This creates macroscripts for all versions the actual 3ds Max version is able to save to.
Those macroscripts can immediately be assigned to keyboard/menu or button after that

Find more info and download here:
http://www.scriptspot.com/3ds-max/s.../savetoprevious
__________________

PowerPreview: High Quality Nitrous Previews for 3ds Max 2012|2013|2014

[ Free Download (ScriptSpot) ]

Home of The Frogs | Online Portfolio

Last edited by spacefrog : 10-13-2012 at 06:20 AM.
 
Old 10-13-2012, 05:05 PM   #2
spacefrog
Frog of the posts
 
spacefrog's Avatar
Josef Wienerroither
Freelance
Vienna, Austria
 
Join Date: Sep 2002
Posts: 2,531
I just updated the script , and most importantly i corrected the install instructions
Otherwise the macroscripts would'nt work (report "undefined") until the global struct has been
accessed the first time ( eg. in the listenener)

The script should go into "stdplugs\stdscripts" , NOT "scripts\startup" i wrote einitially.
So if you already installed it there, remove "SF_SaveToprevious.ms" from there, download the new version and follow the NWE instructions...

Sorry for any confusion

PS: the reason for the macroscripts not working was simply because of the fact that 3ds Max processes the "scripts/startup" folder AFTER the macroscripts folder.
So the struct would still be "undefined" during "macroscripts" processing ....
__________________

PowerPreview: High Quality Nitrous Previews for 3ds Max 2012|2013|2014

[ Free Download (ScriptSpot) ]

Home of The Frogs | Online Portfolio
 
Old 10-13-2012, 05:05 PM   #3
CGTalk Moderation
Expert
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,478
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 08:51 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.