Fix: Incorrect logic in mesh validation for removing layers
The mask is only used if it's not zero. Adding the normal mask made it not zero, but it didn't include anything else, so all custom data layers except normals were removed. The fix is to only add normals to the mask when it should be used.
This commit is contained in:
parent
cfa53e0fbe
commit
0c5ccae79d
|
@ -1008,13 +1008,12 @@ bool BKE_mesh_validate_all_customdata(CustomData *vdata,
|
|||
CustomData_MeshMasks mask = {0};
|
||||
if (check_meshmask) {
|
||||
mask = CD_MASK_MESH;
|
||||
/* Normal data isn't in the mask since it is derived data,
|
||||
* but it is valid and should not be removed. */
|
||||
mask.vmask |= CD_MASK_NORMAL;
|
||||
mask.pmask |= CD_MASK_NORMAL;
|
||||
}
|
||||
|
||||
/* Normal data isn't in the mask since it is derived data,
|
||||
* but it is valid and should not be removed. */
|
||||
mask.vmask |= CD_MASK_NORMAL;
|
||||
mask.pmask |= CD_MASK_NORMAL;
|
||||
|
||||
is_valid &= mesh_validate_customdata(
|
||||
vdata, mask.vmask, totvert, do_verbose, do_fixes, &is_change_v);
|
||||
is_valid &= mesh_validate_customdata(
|
||||
|
|
Loading…
Reference in New Issue