Mesh: Replace auto smooth with node group #108014

Merged
Hans Goudey merged 149 commits from HooglyBoogly/blender:refactor-mesh-corner-normals-lazy into main 2023-10-20 16:54:20 +02:00
1 changed files with 2 additions and 4 deletions
Showing only changes of commit ee05da8441 - Show all commits

View File

@ -818,7 +818,7 @@ static void create_mesh(Scene *scene,
const blender::bke::AttributeAccessor b_attributes = b_mesh.attributes();
int numfaces = (!subdivision) ? b_mesh.looptris().size() : faces.size();
bool use_loop_normals = b_mesh.normals_domain() == ATTR_DOMAIN_CORNER &&
bool use_loop_normals = b_mesh.normals_domain() == blender::bke::MeshNormalDomain::Corner &&
(mesh->get_subdivision_type() != Mesh::SUBDIVISION_CATMULL_CLARK);
/* If no faces, create empty mesh. */
@ -832,9 +832,7 @@ static void create_mesh(Scene *scene,
ATTR_DOMAIN_FACE);
blender::Span<blender::float3> corner_normals;
if (use_loop_normals) {
corner_normals = {
static_cast<const blender::float3 *>(CustomData_get_layer(&b_mesh.loop_data, CD_NORMAL)),
corner_verts.size()};
corner_normals = b_mesh.corner_normals();
}
int numngons = 0;