Fix broken obj tests from earlier commit

rB08731d70bf66 was not properly checking if subdivision needs to be
evaluated on the CPU.

Thanks Ray Molenkamp for noticing.
This commit is contained in:
Kévin Dietrich
2022-04-27 15:59:51 +02:00
parent 478eb3a0e6
commit 69a720abb0

View File

@@ -634,7 +634,7 @@ static void mesh_calc_modifier_final_normals(const Mesh *mesh_input,
if (do_loop_normals) {
/* Compute loop normals (NOTE: will compute poly and vert normals as well, if needed!). In case
* of deferred CPU subdivision, this will be computed when the wrapper is generated. */
if (mesh_final->runtime.subsurf_resolution != 0) {
if (mesh_final->runtime.subsurf_resolution == 0) {
BKE_mesh_calc_normals_split(mesh_final);
}
}
@@ -1285,7 +1285,7 @@ static void editbmesh_calc_modifier_final_normals(Mesh *mesh_final,
if (do_loop_normals) {
/* Compute loop normals. In case of deferred CPU subdivision, this will be computed when the
* wrapper is generated. */
if (mesh_final->runtime.subsurf_resolution != 0) {
if (mesh_final->runtime.subsurf_resolution == 0) {
BKE_mesh_calc_normals_split(mesh_final);
}
}