Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2021-10-20 17:57:54 +0300
committerHans Goudey <h.goudey@me.com>2021-10-20 17:57:54 +0300
commit990b912fd76cd9a2bf0278e7a5bc4a2029e024d2 (patch)
tree2d99061834d5ffdda05c3ad3f5235d11833eaf4b /source/blender/geometry
parent494c3fb1bdb425059b26abd21d7c9230eda68438 (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/geometry')
-rw-r--r--source/blender/geometry/intern/mesh_to_curve_convert.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/source/blender/geometry/intern/mesh_to_curve_convert.cc b/source/blender/geometry/intern/mesh_to_curve_convert.cc
index 64b9fa5c01d..24f0b6308ba 100644
--- a/source/blender/geometry/intern/mesh_to_curve_convert.cc
+++ b/source/blender/geometry/intern/mesh_to_curve_convert.cc
@@ -78,12 +78,8 @@ static void copy_attributes_to_points(CurveEval &curve,
continue;
}
- /* Don't copy anonymous attributes with no references anymore. */
- if (attribute_id.is_anonymous()) {
- const AnonymousAttributeID &anonymous_id = attribute_id.anonymous_id();
- if (!BKE_anonymous_attribute_id_has_strong_references(&anonymous_id)) {
- continue;
- }
+ if (!attribute_id.should_be_kept()) {
+ continue;
}
const fn::GVArrayPtr mesh_attribute = mesh_component.attribute_try_get_for_read(