Post-Load Callbacks
 
 
 

A post-load callback is a function object derived from PostLoadCallback. Post-load callbacks are used for any processing that must happen immediately after loading, for example when upgrading parameter block versions, or from parameter block 1 to parameter block 2. A post-load callback is registered with the 3ds Max file loading system through a call to ILoad::RegisterPostLoadCallback().

Post-load callback can also be useful to do processing with references during the loading process. This is because in a plug-in's implementation of its ReferenceMaker::Load () method, the references are not in place yet. The references are not in place until everything in the 3ds Max file is loaded. The callback is called after all loading is complete. Inside the callback the plug-in's references will be in place and they may be processed by the plug-in.

Important Note Regarding 3ds Max Stability

If a scene evaluation is performed in a post-load callback, it is possible that other objects aren't sufficiently initialized to be evaluated. When implementing a post-load callback (i.e. a class derived from PostLoadCallBack) there are two considerations to assure 3ds Max stability during scene file loads:

  1. Your object must be safe to evaluate if it is evaluated before your post-load callback is run.
  2. You should not do a scene/node evaluation (e.g. perform no changes to a scene hierarchy) in a high priority post-load callback . This means that no changes to the scene hierarchy should occur in a post-load callback with a priority less than 7. The priority of the callback can be retrieved using the member function PostLoadCallBack::Priority().
See Also