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:
authorCampbell Barton <ideasman42@gmail.com>2012-05-13 15:05:52 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-05-13 15:05:52 +0400
commit305d341ec2c2c5c6485ad6cd719e9472e4bb460d (patch)
treefa4c658ad417869a0ed2e7ef5f37ca94adb2cc3b /source/blender/editors/uvedit
parent13bbf1cc7b0a620173475172278d2f8eb9593ccd (diff)
code cleanup: use vector math function minmax_v3v3_v3() and other minor vector function edits.
Diffstat (limited to 'source/blender/editors/uvedit')
-rw-r--r--source/blender/editors/uvedit/uvedit_unwrap_ops.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
index 6b03b5a1a8a..e504e37cb20 100644
--- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c
+++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
@@ -870,13 +870,12 @@ static void uv_map_transform_center(Scene *scene, View3D *v3d, float *result,
switch (around) {
case V3D_CENTER: /* bounding box center */
- min[0] = min[1] = min[2] = 1e20f;
- max[0] = max[1] = max[2] = -1e20f;
+ INIT_MINMAX(min, max);
BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
if (BM_elem_flag_test(efa, BM_ELEM_SELECT)) {
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
- DO_MINMAX(l->v->co, min, max);
+ minmax_v3v3_v3(min, max, l->v->co);
}
}
}
@@ -886,9 +885,7 @@ static void uv_map_transform_center(Scene *scene, View3D *v3d, float *result,
case V3D_CURSOR: /*cursor center*/
cursx = give_cursor(scene, v3d);
/* shift to objects world */
- result[0] = cursx[0] - ob->obmat[3][0];
- result[1] = cursx[1] - ob->obmat[3][1];
- result[2] = cursx[2] - ob->obmat[3][2];
+ sub_v3_v3v3(result, cursx, ob->obmat[3]);
break;
case V3D_LOCAL: /*object center*/