Differential D12980 Diff 43935 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 375 Lines • ▼ Show 20 Lines | return column_values_from_function( | ||||
| column_id.name, | column_id.name, | ||||
| size, | size, | ||||
| [transforms](int index, CellValue &r_cell_value) { | [transforms](int index, CellValue &r_cell_value) { | ||||
| r_cell_value.value_float3 = transforms[index].scale(); | r_cell_value.value_float3 = transforms[index].scale(); | ||||
| }, | }, | ||||
| default_float3_column_width); | default_float3_column_width); | ||||
| } | } | ||||
| Span<int> ids = component_->instance_ids(); | Span<int> ids = component_->instance_ids(); | ||||
| if (!ids.is_empty()) { | |||||
| if (STREQ(column_id.name, "ID")) { | if (STREQ(column_id.name, "ID")) { | ||||
| /* Make the column a bit wider by default, since the IDs tend to be large numbers. */ | /* Make the column a bit wider by default, since the IDs tend to be large numbers. */ | ||||
| return column_values_from_function( | return column_values_from_function( | ||||
| SPREADSHEET_VALUE_TYPE_INT32, | SPREADSHEET_VALUE_TYPE_INT32, | ||||
| column_id.name, | column_id.name, | ||||
| size, | size, | ||||
| [ids](int index, CellValue &r_cell_value) { r_cell_value.value_int = ids[index]; }, | [ids](int index, CellValue &r_cell_value) { r_cell_value.value_int = ids[index]; }, | ||||
| 5.5f); | 5.5f); | ||||
| } | } | ||||
| } | |||||
| return {}; | return {}; | ||||
| } | } | ||||
| int InstancesDataSource::tot_rows() const | int InstancesDataSource::tot_rows() const | ||||
| { | { | ||||
| return component_->instances_amount(); | return component_->instances_amount(); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 102 Lines • Show Last 20 Lines | |||||