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:
authorJacques Lucke <jacques@blender.org>2021-11-24 12:37:06 +0300
committerJacques Lucke <jacques@blender.org>2021-11-24 12:38:42 +0300
commit17770192fb0c5fddda709a37986c98b4cfcfb99b (patch)
tree0b72a8a9d88c1632a03ce61f6e2f9db9637f035c
parente0763760e4307cf5fdd16a9d860573709b2d9a18 (diff)
Tests: exclude anonymous attributes from mesh comparison
The set of anonymous attributes on a geometry is not visible to the user.
-rw-r--r--source/blender/blenkernel/intern/mesh.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/mesh.cc b/source/blender/blenkernel/intern/mesh.cc
index 56e5435c68c..3f115d98891 100644
--- a/source/blender/blenkernel/intern/mesh.cc
+++ b/source/blender/blenkernel/intern/mesh.cc
@@ -442,13 +442,15 @@ static int customdata_compare(
const uint64_t cd_mask_all_attr = CD_MASK_PROP_ALL | cd_mask_non_generic;
for (int i = 0; i < c1->totlayer; i++) {
- if (CD_TYPE_AS_MASK(c1->layers[i].type) & cd_mask_all_attr) {
+ l1 = &c1->layers[i];
+ if (CD_TYPE_AS_MASK(l1->type) & cd_mask_all_attr && l1->anonymous_id != nullptr) {
layer_count1++;
}
}
for (int i = 0; i < c2->totlayer; i++) {
- if (CD_TYPE_AS_MASK(c2->layers[i].type) & cd_mask_all_attr) {
+ l2 = &c2->layers[i];
+ if (CD_TYPE_AS_MASK(l1->type) & cd_mask_all_attr && l2->anonymous_id != nullptr) {
layer_count2++;
}
}
@@ -464,7 +466,8 @@ static int customdata_compare(
l1 = c1->layers + i1;
for (int i2 = 0; i2 < c2->totlayer; i2++) {
l2 = c2->layers + i2;
- if (l1->type != l2->type || !STREQ(l1->name, l2->name)) {
+ if (l1->type != l2->type || !STREQ(l1->name, l2->name) || l1->anonymous_id != nullptr ||
+ l2->anonymous_id != nullptr) {
continue;
}
/* At this point `l1` and `l2` have the same name and type, so they should be compared. */