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:
authorHans Goudey <h.goudey@me.com>2022-10-12 17:51:37 +0300
committerHans Goudey <h.goudey@me.com>2022-10-12 17:52:06 +0300
commit7e4786503c0d71820a289dd6af43a2a308160661 (patch)
tree04398f03456bc8ae52cdfed63efb6906f356d6cf /source/blender/editors/object/object_vgroup.cc
parenta35d5378addfb2aa27f0202dffe3f4e0256660ff (diff)
Cleanup: Remove macro usage in vertex group mirror operator
Avoiding a few lines of duplication is not worth the confusion and worse debugging experience of macros.
Diffstat (limited to 'source/blender/editors/object/object_vgroup.cc')
-rw-r--r--source/blender/editors/object/object_vgroup.cc45
1 files changed, 30 insertions, 15 deletions
diff --git a/source/blender/editors/object/object_vgroup.cc b/source/blender/editors/object/object_vgroup.cc
index a09b47d0d35..2fe6e888fc6 100644
--- a/source/blender/editors/object/object_vgroup.cc
+++ b/source/blender/editors/object/object_vgroup.cc
@@ -2376,18 +2376,6 @@ void ED_vgroup_mirror(Object *ob,
/* TODO: vgroup locking.
* TODO: face masking. */
-#define VGROUP_MIRR_OP \
- dvert_mirror_op(dvert, \
- dvert_mirr, \
- sel, \
- sel_mirr, \
- flip_map, \
- flip_map_len, \
- mirror_weights, \
- flip_vgroups, \
- all_vgroups, \
- def_nr)
-
BMVert *eve, *eve_mirr;
MDeformVert *dvert_mirr;
char sel, sel_mirr;
@@ -2452,7 +2440,16 @@ void ED_vgroup_mirror(Object *ob,
dvert_mirr = static_cast<MDeformVert *>(
BM_ELEM_CD_GET_VOID_P(eve_mirr, cd_dvert_offset));
- VGROUP_MIRR_OP;
+ dvert_mirror_op(dvert,
+ dvert_mirr,
+ sel,
+ sel_mirr,
+ flip_map,
+ flip_map_len,
+ mirror_weights,
+ flip_vgroups,
+ all_vgroups,
+ def_nr);
totmirr++;
}
@@ -2503,7 +2500,16 @@ void ED_vgroup_mirror(Object *ob,
MDeformVert *dvert = &dverts[vidx];
dvert_mirr = &dverts[vidx_mirr];
- VGROUP_MIRR_OP;
+ dvert_mirror_op(dvert,
+ dvert_mirr,
+ sel,
+ sel_mirr,
+ flip_map,
+ flip_map_len,
+ mirror_weights,
+ flip_vgroups,
+ all_vgroups,
+ def_nr);
totmirr++;
}
@@ -2557,7 +2563,16 @@ void ED_vgroup_mirror(Object *ob,
MDeformVert *dvert = &lt->dvert[i1];
dvert_mirr = &lt->dvert[i2];
- VGROUP_MIRR_OP;
+ dvert_mirror_op(dvert,
+ dvert_mirr,
+ sel,
+ sel_mirr,
+ flip_map,
+ flip_map_len,
+ mirror_weights,
+ flip_vgroups,
+ all_vgroups,
+ def_nr);
totmirr++;
}
}