Open GoogleCodeExporter opened 8 years ago
See http://code.google.com/p/gamekit/source/detail?r=718
Original comment by erwin.coumans
on 12 Oct 2010 at 6:44
One of the challenges of the old bParse and makesdna is that it is hard to
extend the file format with new user-defined DNA. For example, people might
want to extend the .bullet format/DNA with user-data.
Does this File Binary Tables/FBT make this easier?
Is there an API to extend the DNA with user-data structs?
Original comment by erwin.coumans
on 12 Oct 2010 at 6:48
This should make it easy to extend user defined DNA now,
For instance if you wanted to extend bullet files with new data, you would take
the Bullet.h file(s) add the new classes / structures needed, then recompile
with the CMake macro ADD_FBT or ADD_FBT_VALIDATOR, the new changes would then
be reflected in the compiled DNA. These become the memory lookup tables, during
the file parse.
ADD_FBT is the default macro which only compiles the tables, where as
ADD_FBT_VALIDATOR adds an extra step in debugging, it asserts during compile
time that type sizes are correctly calculated for the current platform.
It's still experimental, but the same could be done for .blend files.
To prevent data loss in the .blend, you would need to use the reflect function
http://code.google.com/p/gamekit/source/browse/trunk/Tools/FileTools/File/fbtFil
e.cpp#696
http://code.google.com/p/gamekit/source/browse/trunk/Tools/FileTools/FileFormats
/Blend/fbtBlend.cpp#125
then write your custom structures to the end of writeData
Original comment by snailr...@gmail.com
on 12 Oct 2010 at 11:54
Original issue reported on code.google.com by
erwin.coumans
on 12 Oct 2010 at 6:43