svn merge -r37335:37500 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender.git] / source / blender / blenkernel / intern / bvhutils.c
index cc45abb5998b61f9cf099d326789483be3f4906d..f09d955033d39512b01f0ced4cfe84827efbdbd6 100644 (file)
@@ -558,7 +558,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;
        }
@@ -575,9 +575,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)
                {
@@ -586,6 +586,7 @@ BVHTree* bvhtree_from_mesh_faces(BVHTreeFromMesh *data, DerivedMesh *mesh, float
                        if(tree != NULL)
                        {
                                /* XXX, for snap only, em & dm are assumed to be aligned, since dm is the em's cage */
+#if 0 //BMESH_TODO
                                EditMesh *em= data->em_evil;
                                if(em) {
                                        EditFace *efa= em->faces.first;
@@ -601,6 +602,9 @@ BVHTree* bvhtree_from_mesh_faces(BVHTreeFromMesh *data, DerivedMesh *mesh, float
                                                        BLI_bvhtree_insert(tree, i, co[0], face[i].v4 ? 4 : 3);
                                                }
                                        }
+#else
+                               if (0) {
+#endif
                                }
                                else {
                                        for(i = 0; i < numFaces; i++) {
@@ -641,7 +645,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;
        }