texface - quick speedup
authorDalai Felinto <dfelinto@gmail.com>
Tue, 20 Sep 2011 05:45:54 +0000 (05:45 +0000)
committerDalai Felinto <dfelinto@gmail.com>
Tue, 20 Sep 2011 05:45:54 +0000 (05:45 +0000)
I doubt this makes any difference but still, good practises are always good.

source/blender/blenkernel/intern/material.c

index aeab4b177c95a68a18fea50eff71f07838ce5a24..bd5fcae36b186e072e6943ada49b4b75f88c6bfc 100644 (file)
@@ -1931,12 +1931,13 @@ int do_version_tface(Main *main, int fileload)
                                        if (!cdl) continue;
                        
                                        /* loop over all the faces and stop at the ones that use the material*/
-                                       for(a=0, mf=me->mface; a<me->totface; a++, mf++) {
-                                               /* texface data for this face */
-                                               tf = ((MTFace*)cdl->data) + a;
-
-                                               if(me->mat[(int)mf->mat_nr] != ma) continue;
-                                               else tf->mode |= TF_CONVERTED;
+                                       for (a=0, mf=me->mface; a<me->totface; a++, mf++) {
+                                               if (me->mat[(int)mf->mat_nr] != ma) continue;
+                                               else {
+                                                       /* texface data for this face */
+                                                       tf = ((MTFace*)cdl->data) + a;
+                                                       tf->mode |= TF_CONVERTED;
+                                               }
                                        }
                                }
                        }