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.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c
index f007b46dd95..a3d42aa5579 100644
--- a/source/blender/editors/space_view3d/view3d_snap.c
+++ b/source/blender/editors/space_view3d/view3d_snap.c
@@ -788,9 +788,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;
@@ -828,9 +826,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);
}
}
}