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-11-12 10:35:22 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-11-12 10:35:22 +0300
commitae74ad191c3dbbbe2a7216e91392020e510f05ac (patch)
tree8434b0a0b2e1744739f8a5c52b111257bc1ff6d7 /source/blender/bmesh
parentaa1c44a11348e6e2dcc987bdb7bcdb541d83b631 (diff)
parent1061f5a1bab9b65702d90706eb1b3d383984d0fb (diff)
Merge branch 'blender-v3.0-release'
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r--source/blender/bmesh/intern/bmesh_mesh_normals.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/bmesh/intern/bmesh_mesh_normals.c b/source/blender/bmesh/intern/bmesh_mesh_normals.c
index 16ce9703568..8119d9eb57d 100644
--- a/source/blender/bmesh/intern/bmesh_mesh_normals.c
+++ b/source/blender/bmesh/intern/bmesh_mesh_normals.c
@@ -2264,7 +2264,6 @@ bool BM_custom_loop_normals_to_vector_layer(BMesh *bm)
}
BM_lnorspace_update(bm);
- BM_mesh_elem_index_ensure(bm, BM_LOOP);
/* Create a loop normal layer. */
if (!CustomData_has_layer(&bm->ldata, CD_NORMAL)) {
@@ -2276,14 +2275,15 @@ bool BM_custom_loop_normals_to_vector_layer(BMesh *bm)
const int cd_custom_normal_offset = CustomData_get_offset(&bm->ldata, CD_CUSTOMLOOPNORMAL);
const int cd_normal_offset = CustomData_get_offset(&bm->ldata, CD_NORMAL);
+ int l_index = 0;
BM_ITER_MESH (f, &fiter, bm, BM_FACES_OF_MESH) {
BM_ITER_ELEM (l, &liter, f, BM_LOOPS_OF_FACE) {
- const int l_index = BM_elem_index_get(l);
const short *clnors_data = BM_ELEM_CD_GET_VOID_P(l, cd_custom_normal_offset);
float *normal = BM_ELEM_CD_GET_VOID_P(l, cd_normal_offset);
BKE_lnor_space_custom_data_to_normal(
bm->lnor_spacearr->lspacearr[l_index], clnors_data, normal);
+ l_index += 1;
}
}