fix [#28113] ZTransp flag is not imported correctly from 2.49 files
authorCampbell Barton <ideasman42@gmail.com>
Thu, 6 Oct 2011 06:16:20 +0000 (06:16 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 6 Oct 2011 06:16:20 +0000 (06:16 +0000)
infact this only changes a setting which is ignored. but may as well keep whats set in 2.4x.

source/blender/blenloader/intern/readfile.c

index 765fe7ada12e19496cc27e358c3f3e164c99d94d..95bf44d884c6db3b6e7a9690c08a5e40df7ffaa0 100644 (file)
@@ -10384,7 +10384,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
                                ma->mode |= MA_TRANSP;
                        }
                        else {
-                               ma->mode |= MA_ZTRANSP;
+                               /* ma->mode |= MA_ZTRANSP; */ /* leave ztransp as is even if its not used [#28113] */
                                ma->mode &= ~MA_TRANSP;
                        }
 
@@ -11755,7 +11755,8 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
                                        if(!mat->mtex[tex_nr]) continue;
                                        if(mat->mtex[tex_nr]->mapto & MAP_ALPHA) transp_tex= 1;
                                }
-                               
+
+                               /* weak! material alpha could be animated */
                                if(mat->alpha < 1.0f || mat->fresnel_tra > 0.0f || transp_tex){
                                        mat->mode |= MA_TRANSP;
                                        mat->mode &= ~(MA_ZTRANSP|MA_RAYTRANSP);