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>2022-06-07 19:38:30 +0300
committerHans Goudey <h.goudey@me.com>2022-06-07 19:38:39 +0300
commitd39e0f9616680042d67979424e400bdf8a4b89f4 (patch)
treed6b51425d52797ee4fa89723f604f2cd9b1f8b70 /source/blender/blenkernel
parent627d42cd566d0800e1cd00cb8b81aec45667a0d5 (diff)
Fix: Incorrect logic in attribute search function
If a geometry does not have CustomData for a certain domain, it may still have CustomData on other domains. In that case we need to continue to the other domains instead of returning. This worked for meshes because the domains are all at the start of the `info` array. It didn't work for curves.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/attribute.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/attribute.cc b/source/blender/blenkernel/intern/attribute.cc
index 4dd25ba1292..1818befba4c 100644
--- a/source/blender/blenkernel/intern/attribute.cc
+++ b/source/blender/blenkernel/intern/attribute.cc
@@ -302,7 +302,7 @@ CustomDataLayer *BKE_id_attribute_search(const ID *id,
CustomData *customdata = info[domain].customdata;
if (customdata == NULL) {
- return NULL;
+ continue;
}
for (int i = 0; i < customdata->totlayer; i++) {