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
path: root/source
diff options
context:
space:
mode:
authorJoseph Eagar <joeedh@gmail.com>2022-09-24 20:03:10 +0300
committerJoseph Eagar <joeedh@gmail.com>2022-09-24 20:04:28 +0300
commit2ff5d42cd3b41cc1412d4a896d8f9e8d2977686f (patch)
treef65589df28ec37ccd976c3a2c5da574f66b27385 /source
parent72933ebe96a02e96c9740e33d0a3e44d5b6365f1 (diff)
Sculpt: Fix bug with allocating duplicate attribute layers
Sculpt attribute API was incorrectly allocating duplicate attribute layers.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/paint.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/paint.cc b/source/blender/blenkernel/intern/paint.cc
index 298ca8fff8c..171a7b41373 100644
--- a/source/blender/blenkernel/intern/paint.cc
+++ b/source/blender/blenkernel/intern/paint.cc
@@ -2553,13 +2553,11 @@ static bool sculpt_attr_update(Object *ob, SculptAttribute *attr)
if (cdata) {
int layer_index = CustomData_get_named_layer_index(cdata, attr->proptype, attr->name);
+ bad = layer_index == -1;
- if (layer_index != -1 && attr->data_for_bmesh) {
+ if (ss->bm) {
attr->bmesh_cd_offset = cdata->layers[layer_index].offset;
}
- else {
- bad = true;
- }
}
}