Fix using the fcolor pmap when there is no face color

This commit is contained in:
Mael Rouxel-Labbé 2024-05-28 08:39:50 +02:00
parent e90842fd05
commit 0e43336bef
1 changed files with 8 additions and 2 deletions

View File

@ -626,11 +626,17 @@ void Scene_surface_mesh_item_priv::compute_elements(Scene_item_rendering_helper:
}
else if(is_convex)
{
if(has_fcolors)
triangulate_convex_facet(fd, &fnormals, &fcolors.value(), nullptr, name, false);
else
triangulate_convex_facet(fd, &fnormals, nullptr, nullptr, name, false);
}
else
{
if(has_fcolors)
triangulate_facet(fd, &fnormals, &fcolors.value(), nullptr, name, false);
else
triangulate_facet(fd, &fnormals, nullptr, nullptr, name, false);
}
}
}