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-01-29 07:40:13 +0300
committerHans Goudey <h.goudey@me.com>2022-01-29 07:40:13 +0300
commit90a23dec4650d63a836cb9e9969aab4d0da4ba2f (patch)
treebb558f7336aed4a03a78efb07302b33d56923bce /source/blender/editors/object/object_vgroup.c
parent0b2864382a90585ce5a5033d446ac1f27c82074a (diff)
Cleanup: Remove mesh vertex "temp tag" flag
As part of the project of converting `MVert` into `float3` (more details in T93602), this is an easy step, since it is only locally used runtime data. In the six places it was used, the flag was replaced by a local bitmap. By itself this change has no benefits other than making some code slightly simpler. It only really matters when the other flags are removed and it can be removed from `MVert` along with the bevel weight. Differential Revision: https://developer.blender.org/D13878
Diffstat (limited to 'source/blender/editors/object/object_vgroup.c')
-rw-r--r--source/blender/editors/object/object_vgroup.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c
index 3e74aaeeb10..e21e815b56f 100644
--- a/source/blender/editors/object/object_vgroup.c
+++ b/source/blender/editors/object/object_vgroup.c
@@ -39,6 +39,7 @@
#include "BLI_alloca.h"
#include "BLI_array.h"
+#include "BLI_bitmap.h"
#include "BLI_blenlib.h"
#include "BLI_listbase.h"
#include "BLI_math.h"
@@ -2464,17 +2465,14 @@ void ED_vgroup_mirror(Object *ob,
sel = sel_mirr = true;
}
- /* tag verts we have used */
- for (vidx = 0, mv = me->mvert; vidx < me->totvert; vidx++, mv++) {
- mv->flag &= ~ME_VERT_TMP_TAG;
- }
+ BLI_bitmap *vert_tag = BLI_BITMAP_NEW(me->totvert, __func__);
for (vidx = 0, mv = me->mvert; vidx < me->totvert; vidx++, mv++) {
- if ((mv->flag & ME_VERT_TMP_TAG) == 0) {
+ if (!BLI_BITMAP_TEST(vert_tag, vidx)) {
if ((vidx_mirr = mesh_get_x_mirror_vert(ob, NULL, vidx, use_topology)) != -1) {
if (vidx != vidx_mirr) {
mv_mirr = &me->mvert[vidx_mirr];
- if ((mv_mirr->flag & ME_VERT_TMP_TAG) == 0) {
+ if (!BLI_BITMAP_TEST(vert_tag, vidx_mirr)) {
if (use_vert_sel) {
sel = mv->flag & SELECT;
@@ -2489,8 +2487,8 @@ void ED_vgroup_mirror(Object *ob,
totmirr++;
}
- mv->flag |= ME_VERT_TMP_TAG;
- mv_mirr->flag |= ME_VERT_TMP_TAG;
+ BLI_BITMAP_ENABLE(vert_tag, vidx);
+ BLI_BITMAP_ENABLE(vert_tag, vidx_mirr);
}
}
}
@@ -2499,6 +2497,8 @@ void ED_vgroup_mirror(Object *ob,
}
}
}
+
+ MEM_freeN(vert_tag);
}
}
else if (ob->type == OB_LATTICE) {