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-08-23 17:44:02 +0300
committerHans Goudey <h.goudey@me.com>2022-08-23 17:44:10 +0300
commitb649fc13ed47a80e9b06b83cd76c6f9ab73154bc (patch)
treea20e16d3aca95e1fb552e5018102e92a998d612d /source/blender/blenkernel/intern/pbvh.c
parentc32bb58e5b44421cb2450b10a475e25b6c15135e (diff)
Cleanup: Avoid using invalid attribute domain
The number of attribute domains isn't an attribute domain, so storing ATTR_DOMAIN_NUM in a variable with an eAttrDomain type isn't correct. In the cases it was used, the value wouldn't be accessed anyway.
Diffstat (limited to 'source/blender/blenkernel/intern/pbvh.c')
-rw-r--r--source/blender/blenkernel/intern/pbvh.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/pbvh.c b/source/blender/blenkernel/intern/pbvh.c
index 9db6689167d..726c022ba2c 100644
--- a/source/blender/blenkernel/intern/pbvh.c
+++ b/source/blender/blenkernel/intern/pbvh.c
@@ -1275,7 +1275,7 @@ bool BKE_pbvh_get_color_layer(const Mesh *me, CustomDataLayer **r_layer, eAttrDo
if (!layer || !ELEM(layer->type, CD_PROP_COLOR, CD_PROP_BYTE_COLOR)) {
*r_layer = NULL;
- *r_attr = ATTR_DOMAIN_NUM;
+ *r_attr = ATTR_DOMAIN_POINT;
return false;
}
@@ -1283,7 +1283,7 @@ bool BKE_pbvh_get_color_layer(const Mesh *me, CustomDataLayer **r_layer, eAttrDo
if (!ELEM(domain, ATTR_DOMAIN_POINT, ATTR_DOMAIN_CORNER)) {
*r_layer = NULL;
- *r_attr = ATTR_DOMAIN_NUM;
+ *r_attr = ATTR_DOMAIN_POINT;
return false;
}