diff options
author | Hans Goudey <h.goudey@me.com> | 2021-10-20 17:57:54 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-10-20 17:57:54 +0300 |
commit | 990b912fd76cd9a2bf0278e7a5bc4a2029e024d2 (patch) | |
tree | 2d99061834d5ffdda05c3ad3f5235d11833eaf4b /source/blender/blenkernel/intern/geometry_set.cc | |
parent | 494c3fb1bdb425059b26abd21d7c9230eda68438 (diff) |
Cleanup: Add check whether to remove an anonymous atttribute
Add a higher level check that can be used instead of checking whether
the attribute ID is anonymous and checking whether it has any strong
references.
Diffstat (limited to 'source/blender/blenkernel/intern/geometry_set.cc')
-rw-r--r-- | source/blender/blenkernel/intern/geometry_set.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/geometry_set.cc b/source/blender/blenkernel/intern/geometry_set.cc index e439cc838e3..4753a9e0768 100644 --- a/source/blender/blenkernel/intern/geometry_set.cc +++ b/source/blender/blenkernel/intern/geometry_set.cc @@ -507,12 +507,11 @@ void GeometrySet::gather_attributes_for_propagation( return; } } - if (attribute_id.is_anonymous()) { - if (!BKE_anonymous_attribute_id_has_strong_references(&attribute_id.anonymous_id())) { - /* Don't propagate anonymous attributes that are not used anymore. */ - return; - } + + if (!attribute_id.should_be_kept()) { + return; } + auto add_info = [&](AttributeKind *attribute_kind) { attribute_kind->domain = meta_data.domain; attribute_kind->data_type = meta_data.data_type; |