Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc b/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc
index 1ae3f462cfa..bd459944cff 100644
--- a/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc
+++ b/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc
@@ -261,7 +261,7 @@ void InstancesDataSource::foreach_default_column_ids(
SpreadsheetColumnID column_id;
column_id.name = (char *)"Name";
fn(column_id);
- for (const char *name : {"Position", "Rotation", "Scale"}) {
+ for (const char *name : {"Position", "Rotation", "Scale", "ID"}) {
column_id.name = (char *)name;
fn(column_id);
}
@@ -322,6 +322,15 @@ std::unique_ptr<ColumnValues> InstancesDataSource::get_column_values(
},
default_float3_column_width);
}
+ Span<int> ids = component_->ids();
+ if (STREQ(column_id.name, "ID")) {
+ /* Make the column a bit wider by default, since the IDs tend to be large numbers. */
+ return column_values_from_function(
+ column_id.name,
+ size,
+ [ids](int index, CellValue &r_cell_value) { r_cell_value.value_int = ids[index]; },
+ 5.5f);
+ }
return {};
}