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
2 changed files with 5 additions and 2 deletions
Showing only changes of commit cd968b80de - Show all commits

View File

@ -368,7 +368,10 @@ void OBJMesh::store_normal_coords_and_indices()
loop_to_normal_index_.fill(-1);
Span<float3> corner_normals;
if (export_mesh_->normals_domain() == blender::bke::MeshNormalDomain::Corner) {
if (ELEM(export_mesh_->normals_domain(),
bke::MeshNormalDomain::Point,
bke::MeshNormalDomain::Corner))
{
corner_normals = export_mesh_->corner_normals();
}

View File

@ -137,7 +137,7 @@ class obj_importer_test : public BlendfileLoadingBaseTest {
const Span<float3> positions = mesh->vert_positions();
EXPECT_V3_NEAR(positions.first(), exp.vert_first, 0.0001f);
EXPECT_V3_NEAR(positions.last(), exp.vert_last, 0.0001f);
const float3 *lnors = &mesh->corner_normals().first();
const float3 *lnors = mesh->corner_normals().data();
float3 normal_first = lnors != nullptr ? lnors[0] : float3(0, 0, 0);
EXPECT_V3_NEAR(normal_first, exp.normal_first, 0.0001f);
const float2 *mloopuv = static_cast<const float2 *>(