Freestyle: Fix for texture spacing reset to a non-default value on load of old .blend...
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Fri, 16 May 2014 02:10:25 +0000 (11:10 +0900)
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Fri, 16 May 2014 02:12:12 +0000 (11:12 +0900)
Problem report by Light BWK through personal communications. Thanks!

source/blender/blenloader/intern/versioning_270.c

index ada32aadbe2e3c9d8c4c8d014473423e7231ee06..4ca0470d3784c8f81f37adc1ade1ce966f948a2f 100644 (file)
@@ -279,4 +279,13 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
                        sce->r.bake.im_format.compress = 15;
                }
        }
+
+       if (!DNA_struct_elem_find(fd->filesdna, "FreestyleLineStyle", "MTex", "mtex")) {
+               FreestyleLineStyle *linestyle;
+
+               for (linestyle = main->linestyle.first; linestyle; linestyle = linestyle->id.next) {
+                       linestyle->flag |= LS_TEXTURE;
+                       linestyle->texstep = 1.0;
+               }
+       }
 }