Sure it may take a bit of time to figure out what few lines of MAXScript you may need sometime to accomplish a desired task, but it is much quicker and flexible to use MAXScript in many cases than the SDK. Since I have been learning the Max SDK, I see SDK based solutions everywhere, and have been guilty of overlooking MAXScript (though to be fair, I am supposed to document the SDK, not MAXScript).
A great example of this is a post I found on the forums at http://area.autodesk.com/forum/autodesk-3ds-max/sdk/how-to-use-fbx-sdk-to-creat-an-export-plugin-for-3dsmax/page-last/:
Hello,
I have to create a plug-in for 3dsmax that export all the scene in a collada format. I tried to create an export plug-in with 3dsmax SDK. SetFileFormat(pFileFormat) in my plug-in. Any idea please?
Thank you very much.
What this person wanted can be achieved in just a few lines of MAXScript. My response was this:
Writing FbX plugins is a lot of work. You can get the FbX SDK here (http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=6839916).
However, I think the best route to achieve what you want is to use MAXScript to automate the export to FBX and to launch the existing converter. Look for the topic “FBX Export Dialog Access” in the MAXScript reference. Then you will want to run your Collada to X converter program from MAXScript using DosCommand or ShellLaunch. Search for “Executing External Commands and Programs” in the MAXScript documentation.
In some cases what we need can be achieved by mixing MAXScript with 3ds Max. Consider using the function "ExecuteMAXScriptScript()" in your SDK programs more often! This can be an easy way to transition a script into a full-fledged plug-in.
My resolution for after the next 3ds Max release is to become more fluent at MAXScript. Something that I strongly recommend for everyone using the 3ds Max SDK.
3 Comments
Martin Breidt
Posted 12 October 2009 9:50 am
Examples: How do I develop a new MXS function, using the SDK? How do I call MAXScript from C++/SDK? How do I pass variables between them? How do I expose my SDK functions to MXS? Documentation and a set of examples (from simple to complicated) would be nice.
Christopher Diggins
Posted 13 October 2009 1:05 pm
Christopher Diggins
Posted 7 April 2010 2:00 pm
Add Your Comment
You must be logged in to post a comment. Login here or Register