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/render/intern/bake.c')
-rw-r--r--source/blender/render/intern/bake.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/render/intern/bake.c b/source/blender/render/intern/bake.c
index 883e026472b..b11d9629e03 100644
--- a/source/blender/render/intern/bake.c
+++ b/source/blender/render/intern/bake.c
@@ -482,7 +482,9 @@ static TriTessFace *mesh_calc_tri_tessface(Mesh *me, bool tangent, Mesh *me_eval
looptri = MEM_mallocN(sizeof(*looptri) * tottri, __func__);
triangles = MEM_callocN(sizeof(TriTessFace) * tottri, __func__);
- const float(*precomputed_normals)[3] = CustomData_get_layer(&me->pdata, CD_NORMAL);
+ const float(*precomputed_normals)[3] = BKE_mesh_poly_normals_are_dirty(me) ?
+ NULL :
+ BKE_mesh_poly_normals_ensure(me);
const bool calculate_normal = precomputed_normals ? false : true;
if (precomputed_normals != NULL) {