[Closed] New param blocks causing crashes
We’ve been developing a scripted material to setup materials for export to our game engine.
Problem is, everytime we want to add some new features (spinners, buttons, etc.), it totally breaks all the existing Max files… if I try and load a file that used the previous version of the material, Max crashes because the param blocks are different.
Can anyone enlighten us how to code the material so it has better backward-compatibility?
Currently the only way to salvage existing Max files is to install the old material, open a file, strip all materials, save, install new material, open, re-create all materials using the new script. Yuck.
Maybe we just need to write a conversion system. But other studios must have figured out a way to make new versions backwards compatible…
Eric
I think you need to define a “on update” event handler for your scripted material. Max calls this even when it notices that the script has changed since the file was saved.
Also read the “Updating Scripted Plug-ins” topic in the MaxScript help.