=bmesh= merge from trunk at r36529
[blender.git] / source / blender / blenkernel / intern / displist.c
index c8e5998774dcb8550c50dee9a7d8ce19256e2b7c..48192546b0f58013802f9d044efdcccd4a2410fe 100644 (file)
@@ -515,10 +515,10 @@ static void mesh_create_shadedColors(Render *re, Object *ob, int onlyForMesh, un
                dm = mesh_get_derived_final(RE_GetScene(re), ob, dataMask);
        
        mvert = dm->getVertArray(dm);
-       mface = dm->getFaceArray(dm);
-       nors = dm->getFaceDataArray(dm, CD_NORMAL);
+       mface = dm->getTessFaceArray(dm);
+       nors = dm->getTessFaceDataArray(dm, CD_NORMAL);
        totvert = dm->getNumVerts(dm);
-       totface = dm->getNumFaces(dm);
+       totface = dm->getNumTessFaces(dm);
        orco= dm->getVertDataArray(dm, CD_ORCO);
 
        if (onlyForMesh) {
@@ -946,6 +946,8 @@ void filldisplist(ListBase *dispbase, ListBase *to, int flipnormal)
                totvert= 0;
                nextcol= 0;
                
+               BLI_begin_edgefill();
+               
                dl= dispbase->first;
                while(dl) {
        
@@ -1407,7 +1409,7 @@ static void curve_calc_modifiers_post(Scene *scene, Object *ob, ListBase *dispba
 
                        if (dm) {
                                if (vertCos) {
-                                       DerivedMesh *tdm = CDDM_copy(dm);
+                                       DerivedMesh *tdm = CDDM_copy(dm, 0);
                                        dm->release(dm);
                                        dm = tdm;
 
@@ -1448,7 +1450,7 @@ static void curve_calc_modifiers_post(Scene *scene, Object *ob, ListBase *dispba
 
        if (vertCos) {
                if (dm) {
-                       DerivedMesh *tdm = CDDM_copy(dm);
+                       DerivedMesh *tdm = CDDM_copy(dm, 0);
                        dm->release(dm);
                        dm = tdm;
 
@@ -1869,9 +1871,9 @@ static void do_makeDispListCurveTypes(Scene *scene, Object *ob, ListBase *dispba
                   already applied, thats how it worked for years, so keep for compatibility (sergey) */
                copy_displist(&cu->disp, dispbase);
 
-                if (!forRender) {
-                        tex_space_curve(cu);
-                }
+               if (!forRender) {
+                       tex_space_curve(cu);
+               }
 
                if(!forOrco) curve_calc_modifiers_post(scene, ob, dispbase, derivedFinal, forRender, originalVerts, deformedVerts);