[Closed] Versioning plugins
The SDK docs don’t say much about versioning, and i’m having trouble working out at what point, when I open a max file that uses the plugin, Max throws a “Error Loading ParamBlock2”. I’ve added P_VERSION to my pblock, but where do I intercept the attempt to load the pblock and alter accordingly?
you handle loading paramblock version discrepancies with a post-load callback which is registered at load time.
p.s. when you added P_VERSION to the flags did you add the additional version_number int arg directly afterwards ?
seems in the samples most standard plugins remain unchanged since moving over to the paramblock2 way of doing things though a complicated example composite.cpp uses the P_VERSION flag.
also… when updating my plugins adding more stuff to the paramblock I’ve not really run into any issues, not using the version flag, max just loads up the old object from the file and puts the default value into the additional params.
Maybe it screwed up because I didn’t put new params at the end of the PBlock, but instead put them where they logically sit in the UI.