svn merge ^/trunk/blender -r41226:41227 .
[blender.git] / source / blender / blenlib / intern / pbvh.c
index 0613765b868abcd561f0f31035bcffd7d06c7074..6cba79849c25c558962355b4c3cb2c393a4aeacf 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * $Id$
- *
  * ***** BEGIN GPL LICENSE BLOCK *****
  *
  * This program is free software; you can redistribute it and/or
@@ -346,7 +344,7 @@ static int map_insert_vert(PBVH *bvh, GHash *map,
 
        if(!BLI_ghash_haskey(map, key)) {
                if(BLI_bitmap_get(bvh->vert_bitmap, vertex)) {
-                       value = SET_INT_IN_POINTER(-(*face_verts) - 1);
+                       value = SET_INT_IN_POINTER(~(*face_verts));
                        ++(*face_verts);
                }
                else {
@@ -1579,7 +1577,7 @@ void BLI_pbvh_apply_vertCos(PBVH *pbvh, float (*vertCos)[3])
                }
 
                /* coordinates are new -- normals should also be updated */
-               mesh_calc_normals(pbvh->verts, pbvh->totvert, pbvh->faces, pbvh->totprim, NULL);
+               mesh_calc_tessface_normals(pbvh->verts, pbvh->totvert, pbvh->faces, pbvh->totprim, NULL);
 
                for (a= 0; a < pbvh->totnode; ++a)
                        BLI_pbvh_node_mark_update(&pbvh->nodes[a]);