47 if (column_data.
type().
is<
float>()) {
51 const float threshold = row_filter.
threshold;
53 column_data.
typed<
float>(),
54 [&](
const float cell) { return std::abs(cell - value) < threshold; },
60 column_data.
typed<
float>(),
61 [&](
const float cell) { return cell > value; },
68 column_data.
typed<
float>(),
69 [&](
const float cell) { return cell < value; },
76 else if (column_data.
type().
is<
bool>()) {
79 column_data.
typed<
bool>(),
80 [&](
const bool cell) { return cell == value; },
90 [&](
const int cell) { return cell == value; },
98 [value](
const int cell) { return cell > value; },
106 [&](
const int cell) { return cell < value; },
113 else if (column_data.
type().
is<
int>()) {
118 column_data.
typed<
int>(),
119 [&](
const int cell) { return cell == value; },
126 column_data.
typed<
int>(),
127 [value](
const int cell) { return cell > value; },
134 column_data.
typed<
int>(),
135 [&](
const int cell) { return cell < value; },
149 [&](
const int2 cell) { return math::distance_squared(cell, value) <= threshold_sq; },
157 [&](
const int2 cell) { return cell.x > value.x && cell.y > value.y; },
165 [&](
const int2 cell) { return cell.x < value.x && cell.y < value.y; },
179 [&](
const float2 cell) { return math::distance_squared(cell, value) <= threshold_sq; },
187 [&](
const float2 cell) { return cell.x > value.x && cell.y > value.y; },
195 [&](
const float2 cell) { return cell.x < value.x && cell.y < value.y; },
209 [&](
const float3 cell) { return math::distance_squared(cell, value) <= threshold_sq; },
218 return cell.x > value.x && cell.y > value.y && cell.z > value.z;
228 return cell.x < value.x && cell.y < value.y && cell.z < value.z;
244 return math::distance_squared(float4(cell), float4(value)) <= threshold_sq;
254 return cell.r > value.r && cell.g > value.g && cell.b > value.b && cell.a > value.a;
264 return cell.r < value.r && cell.g < value.g && cell.b < value.b && cell.a < value.a;
276 const float4 value_floats = {
282 const ColorGeometry4f cell = cell_bytes.decode();
283 const float4 cell_floats = {
284 float(cell.r), float(cell.g), float(cell.b), float(cell.a)};
295 const ColorGeometry4f cell = cell_bytes.decode();
296 return cell.r > value.r && cell.g > value.g && cell.b > value.b && cell.a > value.a;
306 const ColorGeometry4f cell = cell_bytes.decode();
307 return cell.r < value.r && cell.g < value.g && cell.b < value.b && cell.a < value.a;
316 const StringRef value = row_filter.value_string;
320 switch (cell.type()) {
321 case bke::InstanceReference::Type::Object: {
322 return value == (reinterpret_cast<ID &>(cell.object()).name + 2);
324 case bke::InstanceReference::Type::Collection: {
325 return value == (reinterpret_cast<ID &>(cell.collection()).name + 2);
327 case bke::InstanceReference::Type::GeometrySet: {
330 case bke::InstanceReference::Type::None: {
371 const int tot_rows = data_source.
tot_rows();
377 if (!(use_filters || use_selection)) {
393 columns.
add(column.values->name(), column.values);
398 if (!columns.
contains(row_filter->column_name)) {