Sirius wrote:A built-in editor for SDL records would be rather useful IMHO. Like a very simple list in which you can add variables with a type, array size and default value. (This would also avoid problems with people removing older versions or forgetting to update their SDL version number).
This came up in discussions recently on IRC. I think such a thing would be incredibly useful, however, there are some problems. SDL states are stored in a "blob" format. The only things specified in that blob format are the descriptor name, version, and variable values. The names are never stored.
1) An SDL file must always have all versions available at all times, otherwise the client cannot understand the blob (no way to map from blob to names) and the server has no way to upgrade to the new version.
2) Changing an SDL version that is already used by adding or subtracting a variable will potentially make the client and server unable to read the already saved blobs.
3) Just because someone runs the exporter doesn't mean the blend file will be saved after the export, so we cannot reliably store the SDL version number in the blend file.
4) Someone might share their blend file or export to a new Uru directory that doesn't have an old version of the age's SDL file, so we can't simply read the old SDL file and check its version.
My first inclination would be to increment the version every time the user makes a change in the SDL editor, but you run into the problem of the user testing the age with SDL version, say, 10. URU now uses SDL version 10. The user thinks that's complete crap and nukes Blender without saving. Next day, exports the old version with SDL version 5. Versions 6 though 10 are now lost, and URU has no way to deal with the age state. User links to age and URU crashes with the message "SDL DESC PROBLEM".
I think an SDL editor is a good idea, I'm just not certain how it can be implemented in a way that prevents someone from shooting their foot off. Suggestions are welcome!