diff options
author | Jacques Lucke <jacques@blender.org> | 2021-08-30 17:02:58 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-08-30 17:02:58 +0300 |
commit | fb0d5124f28c639ebd49deeb461e9bb5fc8accc2 (patch) | |
tree | d48675472c0572b2eba205b2ca7382e71f5b1012 /source/blender/editors | |
parent | 6146a679c954b9847e3775add51af4a351bc8aaf (diff) |
support anonymous attributes in foreach_attributetemp-geometry-nodes-fields--anonymous-attributes
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc | 23 |
1 files changed, 14 insertions, 9 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 e38c70afd0f..f3ca246c78c 100644 --- a/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc +++ b/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc @@ -45,15 +45,20 @@ namespace blender::ed::spreadsheet { void GeometryDataSource::foreach_default_column_ids( FunctionRef<void(const SpreadsheetColumnID &)> fn) const { - component_->attribute_foreach([&](StringRefNull name, const AttributeMetaData &meta_data) { - if (meta_data.domain != domain_) { - return true; - } - SpreadsheetColumnID column_id; - column_id.name = (char *)name.c_str(); - fn(column_id); - return true; - }); + component_->attribute_foreach( + [&](const bke::AttributeIDRef &attribute_id, const AttributeMetaData &meta_data) { + if (meta_data.domain != domain_) { + return true; + } + if (attribute_id.is_anonymous()) { + return true; + } + SpreadsheetColumnID column_id; + std::string name = attribute_id.name(); + column_id.name = (char *)name.c_str(); + fn(column_id); + return true; + }); } std::unique_ptr<ColumnValues> GeometryDataSource::get_column_values( |