diff options
-rw-r--r-- | source/blender/blenkernel/intern/bvhutils.c | 3 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_snap.c | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/bvhutils.c b/source/blender/blenkernel/intern/bvhutils.c index 863dc0984b8..882295b931c 100644 --- a/source/blender/blenkernel/intern/bvhutils.c +++ b/source/blender/blenkernel/intern/bvhutils.c @@ -578,12 +578,11 @@ BVHTree* bvhtree_from_mesh_faces(BVHTreeFromMesh *data, DerivedMesh *mesh, float tree = BLI_bvhtree_new(numFaces, epsilon, tree_type, axis); if(tree != NULL) { - /* XXX numFaces is from different mesh as em_evil, made loop check for efa too */ /* XXX, for snap only, em & dm are assumed to be aligned, since dm is the em's cage */ EditMesh *em= data->em_evil; if(em) { EditFace *efa= em->faces.first; - for(i = 0; i < numFaces, efa; i++, efa= efa->next) { + for(i = 0; i < numFaces; i++, efa= efa->next) { if(!(efa->f & 1) && efa->h==0 && !((efa->v1->f&1)+(efa->v2->f&1)+(efa->v3->f&1)+(efa->v4?efa->v4->f&1:0))) { float co[4][3]; VECCOPY(co[0], vert[ face[i].v1 ].co); diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index 750165219e5..6128c62f670 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -1542,7 +1542,8 @@ int snapObject(Scene *scene, ARegion *ar, Object *ob, int editobject, float obma if (editobject) { em = ((Mesh *)ob->data)->edit_mesh; - dm = editmesh_get_derived_cage(scene, ob, em, CD_MASK_BAREMESH); + /* dm = editmesh_get_derived_cage(scene, ob, em, CD_MASK_BAREMESH); */ + dm = editmesh_get_derived_base(ob, em); /* limitation, em & dm MUST have the same number of faces */ } else { |