Cleanup: make format
This commit is contained in:
@@ -285,7 +285,8 @@ bool MetalDevice::load_kernels(const uint _kernel_features)
|
||||
|
||||
mtlLibrary[PSO_GENERIC] = compile(source[PSO_GENERIC]);
|
||||
|
||||
metal_printf("Front-end compilation finished in %.1f seconds (generic)\n", time_dt() - starttime);
|
||||
metal_printf("Front-end compilation finished in %.1f seconds (generic)\n",
|
||||
time_dt() - starttime);
|
||||
|
||||
MD5Hash md5;
|
||||
md5.append(source[PSO_GENERIC]);
|
||||
|
@@ -7,6 +7,7 @@ def ensure_active_color_attribute(me):
|
||||
return me.attributes.active_color
|
||||
return me.color_attributes.new("Color", 'BYTE_COLOR', 'FACE_CORNER')
|
||||
|
||||
|
||||
def applyVertexDirt(me, blur_iterations, blur_strength, clamp_dirt, clamp_clean, dirt_only, normalize):
|
||||
from mathutils import Vector
|
||||
from math import acos
|
||||
|
@@ -200,7 +200,9 @@ static void apply_row_filter(const SpreadsheetRowFilter &row_filter,
|
||||
const float threshold_sq = pow2f(row_filter.threshold);
|
||||
apply_filter_operation(
|
||||
column_data.typed<ColorGeometry4f>(),
|
||||
[&](const ColorGeometry4f cell) { return len_squared_v4v4(cell, value) <= threshold_sq; },
|
||||
[&](const ColorGeometry4f cell) {
|
||||
return len_squared_v4v4(cell, value) <= threshold_sq;
|
||||
},
|
||||
prev_mask,
|
||||
new_indices);
|
||||
break;
|
||||
@@ -231,16 +233,18 @@ static void apply_row_filter(const SpreadsheetRowFilter &row_filter,
|
||||
const ColorGeometry4b value = row_filter.value_byte_color;
|
||||
switch (row_filter.operation) {
|
||||
case SPREADSHEET_ROW_FILTER_EQUAL: {
|
||||
const float4 value_floats = {(float)value.r, (float)value.g, (float)value.b, (float)value.a};
|
||||
const float4 value_floats = {
|
||||
(float)value.r, (float)value.g, (float)value.b, (float)value.a};
|
||||
const float threshold_sq = pow2f(row_filter.threshold);
|
||||
apply_filter_operation(
|
||||
column_data.typed<ColorGeometry4b>(),
|
||||
[&](const ColorGeometry4b cell) {
|
||||
const float4 cell_floats = {(float)cell.r, (float)cell.g, (float)cell.b, (float)cell.a};
|
||||
return len_squared_v4v4(value_floats, cell_floats) <= threshold_sq;
|
||||
const float4 cell_floats = {
|
||||
(float)cell.r, (float)cell.g, (float)cell.b, (float)cell.a};
|
||||
return len_squared_v4v4(value_floats, cell_floats) <= threshold_sq;
|
||||
},
|
||||
prev_mask,
|
||||
new_indices);
|
||||
prev_mask,
|
||||
new_indices);
|
||||
break;
|
||||
}
|
||||
case SPREADSHEET_ROW_FILTER_GREATER: {
|
||||
|
@@ -39,9 +39,7 @@ static void filter_panel_id_fn(void *UNUSED(row_filter_v), char *r_name)
|
||||
static std::string operation_string(const eSpreadsheetColumnValueType data_type,
|
||||
const eSpreadsheetFilterOperation operation)
|
||||
{
|
||||
if (ELEM(data_type,
|
||||
SPREADSHEET_VALUE_TYPE_BOOL,
|
||||
SPREADSHEET_VALUE_TYPE_INSTANCES)) {
|
||||
if (ELEM(data_type, SPREADSHEET_VALUE_TYPE_BOOL, SPREADSHEET_VALUE_TYPE_INSTANCES)) {
|
||||
return "=";
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user