While giving snapto a good test (thanks all_select.blend!) I found it was
authorTon Roosendaal <ton@blender.org>
Mon, 13 Dec 2004 17:11:33 +0000 (17:11 +0000)
committerTon Roosendaal <ton@blender.org>
Mon, 13 Dec 2004 17:11:33 +0000 (17:11 +0000)
not implemented on MetaBall editmode, causing an old global var to wreak
havoc.

source/blender/src/edit.c

index c4038de7d0e476cab6a624fff0b5ac31a663467e..1412a7c52888fae856770eaafb205333d39f182b 100644 (file)
@@ -733,6 +733,8 @@ void snap_sel_to_grid()
 
 
                if(G.obedit) {
+                       tottrans= 0;
+                       
 #ifdef __NLA
                        if ELEM5(G.obedit->type, OB_ARMATURE, OB_LATTICE, OB_MESH, OB_SURF, OB_CURVE) make_trans_verts(bmat[0], bmat[1], 0);
 #else
@@ -820,6 +822,7 @@ void snap_sel_to_curs()
        curs= give_cursor();
 
                if(G.obedit) {
+                       tottrans= 0;
 #ifdef __NLA
                        if ELEM5(G.obedit->type, OB_ARMATURE, OB_LATTICE, OB_MESH, OB_SURF, OB_CURVE) make_trans_verts(bmat[0], bmat[1], 0);
 #else
@@ -1068,7 +1071,7 @@ void snap_to_center()
        centroid[0]= centroid[1]= centroid[2]= 0.0;
 
                if(G.obedit) {
-                       /*tottrans=0;*/
+                       tottrans= 0;
 #ifdef __NLA
                        if ELEM5(G.obedit->type, OB_ARMATURE, OB_LATTICE, OB_MESH, OB_SURF, OB_CURVE) make_trans_verts(bmat[0], bmat[1], 0);
 #else
@@ -1130,6 +1133,7 @@ void snap_to_center()
 /* Snap the selection to the snaplocation (duh!) */
 
                if(G.obedit) {
+                       tottrans= 0;
 #ifdef __NLA
                        if ELEM5(G.obedit->type, OB_ARMATURE, OB_LATTICE, OB_MESH, OB_SURF, OB_CURVE) make_trans_verts(bmat[0], bmat[1], 0);
 #else