Differential D10978 Diff 36325 source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc
Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc
| Show First 20 Lines • Show All 147 Lines • ▼ Show 20 Lines | switch (type) { | ||||
| case CD_PROP_COLOR: { | case CD_PROP_COLOR: { | ||||
| if (column_id.index < 0 || column_id.index > 3) { | if (column_id.index < 0 || column_id.index > 3) { | ||||
| return {}; | return {}; | ||||
| } | } | ||||
| const std::array<const char *, 4> suffixes = {" R", " G", " B", " A"}; | const std::array<const char *, 4> suffixes = {" R", " G", " B", " A"}; | ||||
| const std::string name = StringRef(column_id.name) + suffixes[column_id.index]; | const std::string name = StringRef(column_id.name) + suffixes[column_id.index]; | ||||
| return column_values_from_function( | return column_values_from_function( | ||||
| name, domain_size, [varray, axis = column_id.index](int index, CellValue &r_cell_value) { | name, domain_size, [varray, axis = column_id.index](int index, CellValue &r_cell_value) { | ||||
| Color4f value; | ColorGeometry4f value; | ||||
| varray->get(index, &value); | varray->get(index, &value); | ||||
| r_cell_value.value_float = value[axis]; | r_cell_value.value_float = value[axis]; | ||||
| }); | }); | ||||
| } | } | ||||
| default: | default: | ||||
| break; | break; | ||||
| } | } | ||||
| return {}; | return {}; | ||||
| ▲ Show 20 Lines • Show All 304 Lines • Show Last 20 Lines | |||||