From d39e0f9616680042d67979424e400bdf8a4b89f4 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Tue, 7 Jun 2022 18:38:30 +0200 Subject: 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. --- source/blender/blenkernel/intern/attribute.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenkernel') 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++) { -- cgit v1.2.3