Fix: Issues with attribute comparison in geometry nodes tests

A few typos in 17770192fb lead to an incorrect count of custom
data layers in the test meshes. We only want to consider layers that are
not anonymous, and there was a copy and paste mistake.
This commit is contained in:
Hans Goudey 2021-12-29 10:23:53 -06:00
parent d5b77fd522
commit 279085e18e
1 changed files with 2 additions and 2 deletions

View File

@ -456,14 +456,14 @@ static int customdata_compare(
for (int i = 0; i < c1->totlayer; i++) {
l1 = &c1->layers[i];
if (CD_TYPE_AS_MASK(l1->type) & cd_mask_all_attr && l1->anonymous_id != nullptr) {
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++) {
l2 = &c2->layers[i];
if (CD_TYPE_AS_MASK(l1->type) & cd_mask_all_attr && l2->anonymous_id != nullptr) {
if ((CD_TYPE_AS_MASK(l2->type) & cd_mask_all_attr) && l2->anonymous_id == nullptr) {
layer_count2++;
}
}