Add cutom data color property for mesh comparison
Add color data type comparison for meshes, adding it as part of comparing meshes with geometry nodes applied. Reviewed By: JacquesLucke Differential Revision: https://developer.blender.org/D12192
This commit is contained in:
parent
c0016a8581
commit
c48a01a88a
|
@ -638,6 +638,19 @@ static int customdata_compare(
|
|||
}
|
||||
break;
|
||||
}
|
||||
case CD_PROP_COLOR: {
|
||||
const MPropCol *l1_data = l1->data;
|
||||
const MPropCol *l2_data = l2->data;
|
||||
|
||||
for (int i = 0; i < total_length; i++) {
|
||||
for (int j = 0; j < 4; j++) {
|
||||
if (fabsf(l1_data[i].color[j] - l2_data[i].color[j]) > thresh) {
|
||||
return MESHCMP_ATTRIBUTE_VALUE_MISMATCH;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue