merge with trunk at r27259 and commit of a patch by anthony jones to fix msvc (though...
[blender-staging.git] / source / blender / render / intern / source / convertblender.c
index 0a292c7acd570f72eb7c99296514c9f318ae39fc..bc300f6d609ed17fcef345c12b7add6de1e00d76 100644 (file)
@@ -1470,7 +1470,7 @@ static void get_particle_uvco_mcol(short from, DerivedMesh *dm, float *fuv, int
        if(sd->uvco && ELEM(from,PART_FROM_FACE,PART_FROM_VOLUME)) {
                for(i=0; i<sd->totuv; i++) {
                        if(num != DMCACHE_NOTFOUND) {
-                               MFace *mface = dm->getFaceData(dm, num, CD_MFACE);
+                               MFace *mface = dm->getTessFaceData(dm, num, CD_MFACE);
                                MTFace *mtface = (MTFace*)CustomData_get_layer_n(&dm->faceData, CD_MTFACE, i);
                                mtface += num;
                                
@@ -1487,7 +1487,7 @@ static void get_particle_uvco_mcol(short from, DerivedMesh *dm, float *fuv, int
        if(sd->mcol && ELEM(from,PART_FROM_FACE,PART_FROM_VOLUME)) {
                for(i=0; i<sd->totcol; i++) {
                        if(num != DMCACHE_NOTFOUND) {
-                               MFace *mface = dm->getFaceData(dm, num, CD_MFACE);
+                               MFace *mface = dm->getTessFaceData(dm, num, CD_MFACE);
                                MCol *mc = (MCol*)CustomData_get_layer_n(&dm->faceData, CD_MCOL, i);
                                mc += num * 4;
 
@@ -1705,8 +1705,8 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
                                if(ma->amb != 0.0f)
                                        dosurfacecache= 1;
 
-                       totface= psmd->dm->getNumFaces(psmd->dm);
-                       origindex= psmd->dm->getFaceDataArray(psmd->dm, CD_ORIGINDEX);
+                       totface= psmd->dm->getNumTessFaces(psmd->dm);
+                       origindex= psmd->dm->getTessFaceDataArray(psmd->dm, CD_ORIGINDEX);
                        for(a=0; a<totface; a++)
                                strandbuf->totbound= MAX2(strandbuf->totbound, (origindex)? origindex[a]: a);
 
@@ -1764,7 +1764,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
                        num= pa->num_dmcache;
 
                        if(num == DMCACHE_NOTFOUND)
-                               if(pa->num < psmd->dm->getNumFaces(psmd->dm))
+                               if(pa->num < psmd->dm->getNumTessFaces(psmd->dm))
                                        num= pa->num;
 
                        get_particle_uvco_mcol(part->from, psmd->dm, pa->fuv, num, &sd);
@@ -1841,7 +1841,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
                                num = parent->num_dmcache;
 
                                if(num == DMCACHE_NOTFOUND)
-                                       if(parent->num < psmd->dm->getNumFaces(psmd->dm))
+                                       if(parent->num < psmd->dm->getNumTessFaces(psmd->dm))
                                                num = parent->num;
 
                                get_particle_uvco_mcol(part->from, psmd->dm, parent->fuv, num, &sd);
@@ -2934,10 +2934,10 @@ static struct edgesort *make_mesh_edge_lookup(DerivedMesh *dm, int *totedgesort)
        unsigned int *mcol=NULL;
        int a, totedge=0, totface;
        
-       mface= dm->getFaceArray(dm);
-       totface= dm->getNumFaces(dm);
-       tface= dm->getFaceDataArray(dm, CD_MTFACE);
-       mcol= dm->getFaceDataArray(dm, CD_MCOL);
+       mface= dm->getTessFaceArray(dm);
+       totface= dm->getNumTessFaces(dm);
+       tface= dm->getTessFaceDataArray(dm, CD_MTFACE);
+       mcol= dm->getTessFaceDataArray(dm, CD_MCOL);
        
        if(mcol==NULL && tface==NULL) return NULL;
        
@@ -3155,7 +3155,7 @@ static void init_render_mesh(Render *re, ObjectRen *obr, int timeoffset)
        totvert= dm->getNumVerts(dm);
 
        /* attempt to autsmooth on original mesh, only without subsurf */
-       if(do_autosmooth && me->totvert==totvert && me->totface==dm->getNumFaces(dm))
+       if(do_autosmooth && me->totvert==totvert && me->totface==dm->getNumTessFaces(dm))
                use_original_normals= 1;
        
        ms = (totvert==me->totvert)?me->msticky:NULL;
@@ -3216,8 +3216,8 @@ static void init_render_mesh(Render *re, ObjectRen *obr, int timeoffset)
                                }
 
                                if(ok) {
-                                       end= dm->getNumFaces(dm);
-                                       mface= dm->getFaceArray(dm);
+                                       end= dm->getNumTessFaces(dm);
+                                       mface= dm->getTessFaceArray(dm);
 
                                        for(a=0; a<end; a++, mface++) {
                                                int v1, v2, v3, v4, flag;