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
3 changed files with 6 additions and 6 deletions
Showing only changes of commit 8aefc6772b - Show all commits

View File

@ -317,14 +317,14 @@ eAttrDomain Mesh::normal_domain_all_info() const
const VArray<bool> sharp_faces = *attributes.lookup_or_default<bool>(
"sharp_face", ATTR_DOMAIN_FACE, false);
const array_utils::BoolArrayMix face_mix = array_utils::bool_array_mix_calc(sharp_faces);
const array_utils::BoolArrayMix face_mix = array_utils::booleans_mix_calc(sharp_faces);
if (face_mix == array_utils::BoolArrayMix::AllTrue) {
return ATTR_DOMAIN_FACE;
}
const VArray<bool> sharp_edges = *attributes.lookup_or_default<bool>(
"sharp_edge", ATTR_DOMAIN_EDGE, false);
const array_utils::BoolArrayMix edge_mix = array_utils::bool_array_mix_calc(sharp_edges);
const array_utils::BoolArrayMix edge_mix = array_utils::booleans_mix_calc(sharp_edges);
if (edge_mix == array_utils::BoolArrayMix::AllTrue) {
return ATTR_DOMAIN_FACE;
}

View File

@ -146,10 +146,10 @@ enum class BoolArrayMix {
AllTrue,
Mixed,
};
BoolArrayMix bool_array_mix_calc(const VArray<bool> &varray, IndexRange range_to_check);
inline BoolArrayMix bool_array_mix_calc(const VArray<bool> &varray)
BoolArrayMix booleans_mix_calc(const VArray<bool> &varray, IndexRange range_to_check);
inline BoolArrayMix booleans_mix_calc(const VArray<bool> &varray)
{
return bool_array_mix_calc(varray, varray.index_range());
return booleans_mix_calc(varray, varray.index_range());
}
} // namespace blender::array_utils

View File

@ -52,7 +52,7 @@ void invert_booleans(MutableSpan<bool> span)
});
}
BoolArrayMix bool_array_mix_calc(const VArray<bool> &varray, const IndexRange range_to_check)
BoolArrayMix booleans_mix_calc(const VArray<bool> &varray, const IndexRange range_to_check)
{
if (varray.is_empty()) {
return BoolArrayMix::None;