Fix T40074: Autosmooth option causes assert failure when selected.

No need to call `dm_ensure_display_normals()` when using loop normals,
poly/vert ones have already been computed!
This commit is contained in:
Bastien Montagne 2014-05-08 17:48:00 +02:00
parent bbf6db0c0c
commit 5a8d7af642
Notes: blender-bot 2023-02-14 10:48:33 +01:00
Referenced by issue #40103, Cloth sim with pre-roll breaks
Referenced by issue #40074, Autosmooth option causes assert failure when selected
1 changed files with 4 additions and 1 deletions

View File

@ -1884,8 +1884,11 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
* which deals with drawing differently.
*
* Only calc vertex normals if they are flagged as dirty.
* If using loop normals, poly nors have already been computed.
*/
dm_ensure_display_normals(finaldm);
if (!do_loop_normals) {
dm_ensure_display_normals(finaldm);
}
}
#ifdef WITH_GAMEENGINE