diff options
author | Hans Goudey <h.goudey@me.com> | 2022-06-08 11:42:21 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-06-08 11:48:19 +0300 |
commit | 6eea5f70e3b79e3c6683b7bc0e3e2998b67955d6 (patch) | |
tree | 94cce89b472021d174349477303a3faeab9cb73d /source/blender/editors/geometry/geometry_attributes.cc | |
parent | 1af652d42eb917e257d0f4f2773258f4f6ad2a45 (diff) |
Attributes: Use names instead of layers for some functions
This mirrors the C++ attribute API better, separates the implementation
of attributes from CustomData slightly, and makes functions simpler,
clearer, and safer.
Also fix an issue with removing an attribute caused by 97712b018df71c
meant the first attribute with the given type was removed instead of
the attribute with the given name.
Diffstat (limited to 'source/blender/editors/geometry/geometry_attributes.cc')
-rw-r--r-- | source/blender/editors/geometry/geometry_attributes.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/geometry/geometry_attributes.cc b/source/blender/editors/geometry/geometry_attributes.cc index ae588e49565..63059a49a9e 100644 --- a/source/blender/editors/geometry/geometry_attributes.cc +++ b/source/blender/editors/geometry/geometry_attributes.cc @@ -182,7 +182,7 @@ static int geometry_attribute_remove_exec(bContext *C, wmOperator *op) next_color_attributes(id, layer); - if (!BKE_id_attribute_remove(id, layer, op->reports)) { + if (!BKE_id_attribute_remove(id, layer->name, op->reports)) { return OPERATOR_CANCELLED; } @@ -468,7 +468,7 @@ static int geometry_color_attribute_remove_exec(bContext *C, wmOperator *op) next_color_attributes(id, layer); - if (!BKE_id_attribute_remove(id, layer, op->reports)) { + if (!BKE_id_attribute_remove(id, layer->name, op->reports)) { return OPERATOR_CANCELLED; } |