Incremental Improvements
The following is a list of incremental improvements to the 3ds Max SDK:
Environment Variables
The installer of 3ds Max and the SDK now create the following environment variables:
3DSMAX_2011_PATH
- Path to 3ds Max 2011 executable directory 32 bit version3DSMAX_2011x64_PATH
- Path to 3ds Max 2011 executable directory 64 bit version3DSMAX_2011_SDK_PATH
- Path to the 3ds Max 2011 SDK directory
UI Changes
The method ICustomControl::UpdateEnableState()
has been added to the class ICustomControl
. This is a helper function to enable or disable a UI control based on whether the Animatable
associated with it supports keyframes or not. Note that locked parameters or scripted parameters can not be keyframed.
Changes to SDK Header Files
The 3ds Max SDK header files have been cleaned up and the following changes have been implemented:
- All header files now compile cleanly at warning level 4.
- Each header file can compile correctly on its own.
- The MAXScript header files have been renamed and reorganized. They are now contained in a new folder called maxscript . Including one of the old header files now automatically includes the appropriate header file from the new directory.
- No SDK header files include max.h
- The header file animtbl.h has been broken up into several new header files
As a result of this refactoring effort, in some cases projects that relied on the fact that max.h was included indirectly through another file, may now require additional include directives to successfully compile. In this case we suggest consulting the Max SDK reference guide to find the header files missing, or to use a 3rd party tool such as Visual Assist. Our suggestions for updating your plug-ins to take advantage of these changes are as follows:
- Do not include max.h or animtbl.h directly, but instead include the header files that contain the symbol definitions or declarations that you require.
- Replace references to header files from the old maxscrpt [sic folder to the appropriate header in the new folder maxscript . To see which header files should be used instead consult the header file in the original folder.
- Set your plug-in projects to compile with warning level 4 turned on.
Cloning objects
A more robust method of cloning objects is recommended: use RemapDir::CloneRef()
or ::CloneRefHierarchy()
instead of ReferenceTarget::Clone()
. This will correctly perform backpatching of references in the reference hierarchy. If backpatching is not performed, a reference graph can keep references to the original object, instead of to the copied object. Backpatching of references is performed automatically by the RemapDir
destructor. Do not call RemapDir::Backpatch()
directly.
For more information see the topics Implementing Clone in a Plug-in and Cloning Reference Targets.
Changes to API Behavior
- There have been improvements to the efficiency of
Interface::MakeNameUnique()
which has a direct impact on the efficiency of node creation. With this is the ability to specify the number of suffix digits used in the creation of new methods viaInterface13::SetNameSuffixLength()
(see alsoInterface13::GetNameSuffixLength()
). - The management of
DragAndDropHandler
memory lifetime has been changed. In previous versions, it was up to 3rd party developers to 'unregister' their drag and drop handlers, before 3ds Max was shut down. If they didn't it 3ds Max would crash on shut-down. Now, the manager automatically 'unregisters' allDragAndDropHandler
pointers during a broadcast ofNOTIFY_SYSTEM_SHUTDOWN
. For more information seeIDragAndDropMgr
. - When calling the global function
DisableRefMsgs
the messageREFMSG_GET_PARAM_NAME
now is also disable in addition toREFMSG_TARGET_DELETED
.
.NET Action Items
It is now possible to create custom action items in a .NET assembly. This is done by creating a public class that implements the interface ICuiActionCommand
(found in MaxCustomControls.dll ) and placing the DLL containing the implemented interface in the bin\assemblies folder. For more information see the topic .NET Action Items.
Deprecation of AppWizard
The AppWizard is no longer actively supported. It is still being shipped with the 3ds Max SDK but we are recommending people to instead use template projects available online at www.autodesk.com/3dsmax-sdk-docs.