[Bf-committers] Question about SDNA/blend files/Texture struct

Matt Ebb matt at mke3.net
Tue Jun 12 05:06:11 CEST 2007

On 6/11/07, Ahmad Kabani <ahmadkabani at yahoo.com> wrote:
> Hello,
> All the new parameters I added to the Texture struct
> in DNA_texture_types.h don't seem to either get
> written the blend file or are not being read back. Is
> there something in the implementation that I am
> missing? I am re-using the noisesize parameter and it
> is being written and read back correctly.

That's because you're over-writing them in readfile.c. What you'll
need to do is raise the SUBVERSION level, and check for that - then
all files saved with the new sub-version will be left alone, instead
of overwritten.

Or an easier way to do it could be if you've got any variables that
will never be equal to 0 (buttons don't allow it, and never
initialised to 0), you could just check in readfile.c to see if
they're 0, meaning the file was never saved with that data in DNA,
then initialise accordingly.

More information about the Bf-committers mailing list