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/blenkernel/intern/crazyspace.c')
-rw-r--r--source/blender/blenkernel/intern/crazyspace.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/crazyspace.c b/source/blender/blenkernel/intern/crazyspace.c
index 573595b6f90..0bf83ed5036 100644
--- a/source/blender/blenkernel/intern/crazyspace.c
+++ b/source/blender/blenkernel/intern/crazyspace.c
@@ -194,13 +194,10 @@ void BKE_crazyspace_set_quats_mesh(Mesh *me,
float (*mappedcos)[3],
float (*quats)[4])
{
- MVert *mvert = me->mvert;
- for (int i = 0; i < me->totvert; i++, mvert++) {
- mvert->flag &= ~ME_VERT_TMP_TAG;
- }
+ BLI_bitmap *vert_tag = BLI_BITMAP_NEW(me->totvert, __func__);
/* first store two sets of tangent vectors in vertices, we derive it just from the face-edges */
- mvert = me->mvert;
+ MVert *mvert = me->mvert;
MPoly *mp = me->mpoly;
MLoop *mloop = me->mloop;
@@ -210,7 +207,7 @@ void BKE_crazyspace_set_quats_mesh(Mesh *me,
MLoop *ml_prev = &ml_next[mp->totloop - 2];
for (int j = 0; j < mp->totloop; j++) {
- if ((mvert[ml_curr->v].flag & ME_VERT_TMP_TAG) == 0) {
+ if (!BLI_BITMAP_TEST(vert_tag, ml_curr->v)) {
const float *co_prev, *co_curr, *co_next; /* orig */
const float *vd_prev, *vd_curr, *vd_next; /* deform */
@@ -233,7 +230,7 @@ void BKE_crazyspace_set_quats_mesh(Mesh *me,
set_crazy_vertex_quat(
quats[ml_curr->v], co_curr, co_next, co_prev, vd_curr, vd_next, vd_prev);
- mvert[ml_curr->v].flag |= ME_VERT_TMP_TAG;
+ BLI_BITMAP_ENABLE(vert_tag, ml_curr->v);
}
ml_prev = ml_curr;
@@ -241,6 +238,8 @@ void BKE_crazyspace_set_quats_mesh(Mesh *me,
ml_next++;
}
}
+
+ MEM_freeN(vert_tag);
}
int BKE_crazyspace_get_first_deform_matrices_editbmesh(struct Depsgraph *depsgraph,