Mesh: Replace auto smooth with node group #108014
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue