svn merge -r 16866:17042 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender-staging.git] / source / blender / render / intern / source / convertblender.c
index 07b2a5d3c82408745d410c8076a0be789a8c45c4..4b663c6caa65e114f09372e6b63b99cbdd1b9958 100644 (file)
@@ -2472,7 +2472,6 @@ static int dl_surf_to_renderdata(ObjectRen *obr, DispList *dl, Material **matar,
        VlakRen *vlr, *vlr1, *vlr2, *vlr3;
        Curve *cu= ob->data;
        float *data, n1[3];
-       /*float flen; - as yet unused */
        int u, v, orcoret= 0;
        int p1, p2, p3, p4, a;
        int sizeu, nsizeu, sizev, nsizev;
@@ -2544,7 +2543,8 @@ static int dl_surf_to_renderdata(ObjectRen *obr, DispList *dl, Material **matar,
                        vlr= RE_findOrAddVlak(obr, obr->totvlak++);
                        vlr->v1= v1; vlr->v2= v2; vlr->v3= v3; vlr->v4= v4;
                        
-                       /* flen= CalcNormFloat4(vlr->v4->co, vlr->v3->co, vlr->v2->co, vlr->v1->co, n1); - as yet unused */
+                       CalcNormFloat4(vlr->v4->co, vlr->v3->co, vlr->v2->co, vlr->v1->co, n1);
+                       
                        VECCOPY(vlr->n, n1);
                        
                        vlr->mat= matar[ dl->col];
@@ -2816,8 +2816,10 @@ static void init_render_curve(Render *re, ObjectRen *obr, int timeoffset)
                                        for(a=0; a<dl->parts; a++) {
 
                                                frontside= (a >= dl->nr/2);
-
-                                               DL_SURFINDEX(dl->flag & DL_CYCL_U, dl->flag & DL_CYCL_V, dl->nr, dl->parts);
+                                               
+                                               if (surfindex_displist(dl, a, &b, &p1, &p2, &p3, &p4)==0)
+                                                       break;
+                                               
                                                p1+= startvert;
                                                p2+= startvert;
                                                p3+= startvert;