Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_snap.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_snap.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c
index 61118805a4e..14e46a2c65b 100644
--- a/source/blender/editors/space_view3d/view3d_snap.c
+++ b/source/blender/editors/space_view3d/view3d_snap.c
@@ -839,9 +839,7 @@ static int snap_curs_to_sel(bContext *C, wmOperator *UNUSED(op))
VECCOPY(curs, centroid);
}
else {
- curs[0]= (min[0]+max[0])/2;
- curs[1]= (min[1]+max[1])/2;
- curs[2]= (min[2]+max[2])/2;
+ mid_v3_v3v3(curs, min, max);
}
MEM_freeN(transvmain);
transvmain= NULL;
@@ -879,9 +877,7 @@ static int snap_curs_to_sel(bContext *C, wmOperator *UNUSED(op))
VECCOPY(curs, centroid);
}
else {
- curs[0]= (min[0]+max[0])/2;
- curs[1]= (min[1]+max[1])/2;
- curs[2]= (min[2]+max[2])/2;
+ mid_v3_v3v3(curs, min, max);
}
}
}
@@ -1022,4 +1018,3 @@ int minmax_verts(Object *obedit, float *min, float *max)
return 1;
}
-