2.5: Material buttons
[blender.git] / source / blender / blenloader / intern / readfile.c
index a4dd61f82f7142b4f9c31141b9cfa6f157c8fb0c..72d7c61778fd1a30bdb29e142db780f9add695d1 100644 (file)
@@ -5726,7 +5726,7 @@ static void alphasort_version_246(FileData *fd, Library *lib, Mesh *me)
                                tf = ((MTFace*)me->fdata.layers[b].data) + a;
 
                                tf->mode &= ~TF_ALPHASORT;
-                               if(ma && (ma->mode & MA_ZTRA))
+                               if(ma && (ma->mode & MA_ZTRANSP))
                                        if(ELEM(tf->transp, TF_ALPHA, TF_ADD) || (texalpha && (tf->transp != TF_CLIP)))
                                                tf->mode |= TF_ALPHASORT;
                        }
@@ -9463,6 +9463,14 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
                                ma->mode &= ~MA_HALO;
                        }
 
+                       if(ma->mode & (MA_ZTRANSP|MA_RAYTRANSP)) {
+                               ma->mode |= MA_TRANSP;
+                       }
+                       else {
+                               ma->mode |= MA_ZTRANSP;
+                               ma->mode &= ~MA_TRANSP;
+                       }
+
                        /* set new bump for unused slots */
                        for(a=0; a<MAX_MTEX; a++) {
                                if(ma->mtex[a]) {