From 5206d72dca6977e4d6ec3d849e4e1f899317e975 Mon Sep 17 00:00:00 2001 From: Iliya Katueshenock Date: Mon, 26 Dec 2022 14:46:21 -0500 Subject: [PATCH] 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 --- .../geometry/nodes/node_geo_blur_attribute.cc | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/source/blender/nodes/geometry/nodes/node_geo_blur_attribute.cc b/source/blender/nodes/geometry/nodes/node_geo_blur_attribute.cc index 23c39748cf9..c2250019a30 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_blur_attribute.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_blur_attribute.cc @@ -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(neighbor_weights, - neighbors_map, - iterations, - main_buffer.typed(), - tmp_buffer.typed()); + if constexpr (!std::is_same_v) { + blur_on_mesh_exec(neighbor_weights, + neighbors_map, + iterations, + main_buffer.typed(), + tmp_buffer.typed()); + } }); } @@ -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( - curves, neighbor_weights, iterations, main_buffer.typed(), tmp_buffer.typed()); + if constexpr (!std::is_same_v) { + blur_on_curve_exec( + curves, neighbor_weights, iterations, main_buffer.typed(), tmp_buffer.typed()); + } }); }