vtk-m/docs/changelog/dataset-unique-field-names.md
Kenneth Moreland 569adda002 Update changelogs
There have been several new features that were merged without
appropriate documentation in the changelogs. This adds some
new changelogs for some of these new features.
2020-05-19 10:37:36 -06:00

778 B

DataSet now only allows unique field names

When you add a vtkm::cont::Field to a vtkm::cont::DataSet, it now requires every Field to have a unique name. When you attempt to add a Field to a DataSet that already has a Field of the same name and association, the old Field is removed and replaced with the new Field.

You are allowed, however, to have two Fields with the same name but different associations. For example, you could have a point Field named "normals" and also have a cell Field named "normals" in the same DataSet.

This new behavior matches how VTK's data sets manage fields.

The old behavior allowed you to add multiple Fields with the same name, but it would be unclear which one you would get if you asked for a Field by name.