Fix: incorrect handling of 3x3 matrices with RNA get/set callbacks

Thanks to @mont29 for spotting the error.
This commit is contained in:
Campbell Barton
2025-08-29 17:56:38 +10:00
parent 4387255868
commit 9ff2ccd350
2 changed files with 33 additions and 8 deletions

View File

@@ -545,8 +545,8 @@ static bool bpy_prop_array_is_matrix_compatible_ex(int subtype,
const BPyPropArrayLength *array_len_info)
{
return ((subtype == PROP_MATRIX) && (array_len_info->dims_len == 2) &&
((array_len_info->dims[0] >= 2) && (array_len_info->dims[0] >= 4)) &&
((array_len_info->dims[1] >= 2) && (array_len_info->dims[1] >= 4)));
((array_len_info->dims[0] >= 2) && (array_len_info->dims[0] <= 4)) &&
((array_len_info->dims[1] >= 2) && (array_len_info->dims[1] <= 4)));
}
static bool bpy_prop_array_is_matrix_compatible(PropertyRNA *prop,