merge with/from trunk at r35190
[blender.git] / source / blender / blenkernel / intern / bvhutils.c
index 949be31354c431114701037f114912c10c7840c9..7a3c4bd59288acab5d5fe0b09b18ffb1d0b5ad57 100644 (file)
@@ -553,7 +553,7 @@ BVHTree* bvhtree_from_mesh_verts(BVHTreeFromMesh *data, DerivedMesh *mesh, float
 
                data->mesh = mesh;
                data->vert = mesh->getVertDataArray(mesh, CD_MVERT);
-               data->face = mesh->getFaceDataArray(mesh, CD_MFACE);
+               data->face = mesh->getTessFaceDataArray(mesh, CD_MFACE);
 
                data->sphere_radius = epsilon;
        }
@@ -570,9 +570,9 @@ BVHTree* bvhtree_from_mesh_faces(BVHTreeFromMesh *data, DerivedMesh *mesh, float
        if(tree == NULL)
        {
                int i;
-               int numFaces= mesh->getNumFaces(mesh);
+               int numFaces= mesh->getNumTessFaces(mesh);
                MVert *vert     = mesh->getVertDataArray(mesh, CD_MVERT);
-               MFace *face = mesh->getFaceDataArray(mesh, CD_MFACE);
+               MFace *face = mesh->getTessFaceDataArray(mesh, CD_MFACE);
 
                if(vert != NULL && face != NULL)
                {
@@ -636,7 +636,7 @@ BVHTree* bvhtree_from_mesh_faces(BVHTreeFromMesh *data, DerivedMesh *mesh, float
 
                data->mesh = mesh;
                data->vert = mesh->getVertDataArray(mesh, CD_MVERT);
-               data->face = mesh->getFaceDataArray(mesh, CD_MFACE);
+               data->face = mesh->getTessFaceDataArray(mesh, CD_MFACE);
 
                data->sphere_radius = epsilon;
        }