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.
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:
PostLoadCallBack::Priority()
.