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>2021-01-05 07:12:41 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-01-05 07:51:50 +0300
commit5370a7dd40a9e45066e4db1e18ac93636765070f (patch)
tree1f29d3b741e51891c8de37b6c191522ec3ad8d61
parentd3c62b682d7881a9e39792443b67dee3e88ce419 (diff)
Cleanup: use scale's 'space' argument instead of two transform calls
-rw-r--r--source/blender/bmesh/operators/bmo_mirror.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/source/blender/bmesh/operators/bmo_mirror.c b/source/blender/bmesh/operators/bmo_mirror.c
index 88edc2fb59a..c0184a8c4c2 100644
--- a/source/blender/bmesh/operators/bmo_mirror.c
+++ b/source/blender/bmesh/operators/bmo_mirror.c
@@ -38,8 +38,6 @@ void bmo_mirror_exec(BMesh *bm, BMOperator *op)
BMOperator dupeop, weldop;
BMOIter siter;
BMVert *v;
- float mtx[4][4];
- float imtx[4][4];
float scale[3] = {1.0f, 1.0f, 1.0f};
float dist = BMO_slot_float_get(op->slots_in, "merge_dist");
int i;
@@ -50,9 +48,6 @@ void bmo_mirror_exec(BMesh *bm, BMOperator *op)
BMOpSlot *slot_targetmap;
BMOpSlot *slot_vertmap;
- BMO_slot_mat4_get(op->slots_in, "matrix", mtx);
- invert_m4_m4(imtx, mtx);
-
BMO_op_initf(bm, &dupeop, op->flag, "duplicate geom=%s", op, "geom");
BMO_op_exec(bm, &dupeop);
@@ -60,9 +55,7 @@ void bmo_mirror_exec(BMesh *bm, BMOperator *op)
/* feed old data to transform bmo */
scale[axis] = -1.0f;
- BMO_op_callf(bm, op->flag, "transform verts=%fv matrix=%m4", ELE_NEW, mtx);
- BMO_op_callf(bm, op->flag, "scale verts=%fv vec=%v", ELE_NEW, scale);
- BMO_op_callf(bm, op->flag, "transform verts=%fv matrix=%m4", ELE_NEW, imtx);
+ BMO_op_callf(bm, op->flag, "scale verts=%fv vec=%v space=%s", ELE_NEW, scale, op, "matrix");
BMO_op_init(bm, &weldop, op->flag, "weld_verts");