diff --git a/source/blender/editors/space_spreadsheet/spreadsheet_row_filter.cc b/source/blender/editors/space_spreadsheet/spreadsheet_row_filter.cc index dc4d2e11de9..892ba81e9e9 100644 --- a/source/blender/editors/space_spreadsheet/spreadsheet_row_filter.cc +++ b/source/blender/editors/space_spreadsheet/spreadsheet_row_filter.cc @@ -133,16 +133,15 @@ static IndexMask apply_row_filter(const SpreadsheetRowFilter &row_filter, const int2 value = row_filter.value_int2; switch (row_filter.operation) { case SPREADSHEET_ROW_FILTER_EQUAL: { - const float threshold_sq = pow2f(row_filter.threshold); - apply_filter_operation( + return apply_filter_operation( column_data.typed(), - [&](const int2 cell) { return math::distance_squared(cell, value) <= threshold_sq; }, + [&](const int2 cell) { return cell == value; }, prev_mask, memory); break; } case SPREADSHEET_ROW_FILTER_GREATER: { - apply_filter_operation( + return apply_filter_operation( column_data.typed(), [&](const int2 cell) { return cell.x > value.x && cell.y > value.y; }, prev_mask, @@ -150,7 +149,7 @@ static IndexMask apply_row_filter(const SpreadsheetRowFilter &row_filter, break; } case SPREADSHEET_ROW_FILTER_LESS: { - apply_filter_operation( + return apply_filter_operation( column_data.typed(), [&](const int2 cell) { return cell.x < value.x && cell.y < value.y; }, prev_mask, @@ -163,16 +162,15 @@ static IndexMask apply_row_filter(const SpreadsheetRowFilter &row_filter, const short2 value = short2(int2(row_filter.value_int2)); switch (row_filter.operation) { case SPREADSHEET_ROW_FILTER_EQUAL: { - const float threshold_sq = pow2f(row_filter.threshold); - apply_filter_operation( + return apply_filter_operation( column_data.typed(), - [&](const short2 cell) { return math::distance_squared(cell, value) <= threshold_sq; }, + [&](const short2 cell) { return cell == value; }, prev_mask, memory); break; } case SPREADSHEET_ROW_FILTER_GREATER: { - apply_filter_operation( + return apply_filter_operation( column_data.typed(), [&](const short2 cell) { return cell.x > value.x && cell.y > value.y; }, prev_mask, @@ -180,7 +178,7 @@ static IndexMask apply_row_filter(const SpreadsheetRowFilter &row_filter, break; } case SPREADSHEET_ROW_FILTER_LESS: { - apply_filter_operation( + return apply_filter_operation( column_data.typed(), [&](const short2 cell) { return cell.x < value.x && cell.y < value.y; }, prev_mask, @@ -345,7 +343,7 @@ static IndexMask apply_row_filter(const SpreadsheetRowFilter &row_filter, return value == (reinterpret_cast(cell.collection()).name + 2); } case bke::InstanceReference::Type::GeometrySet: { - return false; + return value == cell.geometry_set().name; } case bke::InstanceReference::Type::None: { return false;