Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/mesh.cc
| Show First 20 Lines • Show All 450 Lines • ▼ Show 20 Lines | static int customdata_compare( | ||||
| CustomDataLayer *l1, *l2; | CustomDataLayer *l1, *l2; | ||||
| int layer_count1 = 0, layer_count2 = 0, j; | int layer_count1 = 0, layer_count2 = 0, j; | ||||
| const uint64_t cd_mask_non_generic = CD_MASK_MVERT | CD_MASK_MEDGE | CD_MASK_MPOLY | | const uint64_t cd_mask_non_generic = CD_MASK_MVERT | CD_MASK_MEDGE | CD_MASK_MPOLY | | ||||
| CD_MASK_MLOOPUV | CD_MASK_MLOOPCOL | CD_MASK_MDEFORMVERT; | CD_MASK_MLOOPUV | CD_MASK_MLOOPCOL | CD_MASK_MDEFORMVERT; | ||||
| const uint64_t cd_mask_all_attr = CD_MASK_PROP_ALL | cd_mask_non_generic; | const uint64_t cd_mask_all_attr = CD_MASK_PROP_ALL | cd_mask_non_generic; | ||||
| for (int i = 0; i < c1->totlayer; i++) { | for (int i = 0; i < c1->totlayer; i++) { | ||||
| l1 = &c1->layers[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++; | layer_count1++; | ||||
| } | } | ||||
| } | } | ||||
| for (int i = 0; i < c2->totlayer; i++) { | for (int i = 0; i < c2->totlayer; i++) { | ||||
| l2 = &c2->layers[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++; | layer_count2++; | ||||
| } | } | ||||
| } | } | ||||
| if (layer_count1 != layer_count2) { | if (layer_count1 != layer_count2) { | ||||
| return MESHCMP_CDLAYERS_MISMATCH; | return MESHCMP_CDLAYERS_MISMATCH; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 1,791 Lines • Show Last 20 Lines | |||||