Cleanup: Remove boolean template instantiation in Blur node

The node doesn't support blurring boolean attributes, so avoid
compiling an implementation for boolean data.

Differential Revision: https://developer.blender.org/D16867
This commit is contained in:
Iliya Katueshenock 2022-12-26 14:46:21 -05:00 committed by Hans Goudey
parent a7cec5a4db
commit 5206d72dca
1 changed files with 11 additions and 7 deletions

View File

@ -278,11 +278,13 @@ static void blur_on_mesh(const Mesh &mesh,
}
attribute_math::convert_to_static_type(main_buffer.type(), [&](auto dummy) {
using T = decltype(dummy);
blur_on_mesh_exec<T>(neighbor_weights,
neighbors_map,
iterations,
main_buffer.typed<T>(),
tmp_buffer.typed<T>());
if constexpr (!std::is_same_v<T, bool>) {
blur_on_mesh_exec<T>(neighbor_weights,
neighbors_map,
iterations,
main_buffer.typed<T>(),
tmp_buffer.typed<T>());
}
});
}
@ -362,8 +364,10 @@ static void blur_on_curves(const bke::CurvesGeometry &curves,
{
attribute_math::convert_to_static_type(main_buffer.type(), [&](auto dummy) {
using T = decltype(dummy);
blur_on_curve_exec<T>(
curves, neighbor_weights, iterations, main_buffer.typed<T>(), tmp_buffer.typed<T>());
if constexpr (!std::is_same_v<T, bool>) {
blur_on_curve_exec<T>(
curves, neighbor_weights, iterations, main_buffer.typed<T>(), tmp_buffer.typed<T>());
}
});
}