Freestyle: Fix for versioning code not working properly with new texture options.
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Thu, 22 May 2014 06:00:38 +0000 (15:00 +0900)
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Thu, 22 May 2014 07:03:35 +0000 (16:03 +0900)
To get the versioning code properly work, the condition should have been:

  DNA_struct_elem_find(fd->filesdna, "FreestyleLineStyle", "MTex", "*mtex[18]")

The present commit uses another new structure member instead, to avoid referring
to the magic number 18 in the last string literal.

source/blender/blenloader/intern/versioning_270.c

index 4ca0470d3784c8f81f37adc1ade1ce966f948a2f..7e058ae80f720960c280bb3272adb9032b274e34 100644 (file)
@@ -280,7 +280,7 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
                }
        }
 
-       if (!DNA_struct_elem_find(fd->filesdna, "FreestyleLineStyle", "MTex", "mtex")) {
+       if (!DNA_struct_elem_find(fd->filesdna, "FreestyleLineStyle", "float", "texstep")) {
                FreestyleLineStyle *linestyle;
 
                for (linestyle = main->linestyle.first; linestyle; linestyle = linestyle->id.next) {