diff options
author | Hans Goudey <h.goudey@me.com> | 2021-11-28 01:09:35 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-11-28 01:09:35 +0300 |
commit | f7f558e293e9cfde672b62083d01a6d68cb674b1 (patch) | |
tree | e206de8e0538bb129a5192a7f2b7ddad2816d20c /source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.hh | |
parent | e121b5b66c861cc4d45e06ba2967ffb701f72ce4 (diff) |
Cleanup: Deduplicate instances component in spreadsheet
Currently we have a separate `InstancesDataSource`, which does almost
exactly the same thing as `GeometryDataSource`, except that it hardcodes
a few more columns: "Name", "Rotation", and "Scale". We can easily
replace that with a couple of if statements in the geometry data source.
This also makes named attributes on instances display
in the spreadsheet.
Differential Revision: https://developer.blender.org/D13391
Diffstat (limited to 'source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.hh')
-rw-r--r-- | source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.hh | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.hh b/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.hh index a4114dd1f6a..5ec3eab4d66 100644 --- a/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.hh +++ b/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.hh @@ -94,28 +94,6 @@ class GeometryDataSource : public DataSource { int tot_rows() const override; }; -class InstancesDataSource : public DataSource { - const GeometrySet geometry_set_; - const InstancesComponent *component_; - ExtraColumns extra_columns_; - - public: - InstancesDataSource(GeometrySet geometry_set, ExtraColumns extra_columns) - : geometry_set_(std::move(geometry_set)), - component_(geometry_set_.get_component_for_read<InstancesComponent>()), - extra_columns_(std::move(extra_columns)) - { - } - - void foreach_default_column_ids( - FunctionRef<void(const SpreadsheetColumnID &, bool is_extra)> fn) const override; - - std::unique_ptr<ColumnValues> get_column_values( - const SpreadsheetColumnID &column_id) const override; - - int tot_rows() const override; -}; - class VolumeDataSource : public DataSource { const GeometrySet geometry_set_; const VolumeComponent *component_; |