diff --git a/source/blender/python/generic/idprop_py_api.cc b/source/blender/python/generic/idprop_py_api.cc index 1d089b78e261319e48baf6d8796a87d3811e8bc9..01745568a4628bbe7d1b6222aaf37f0aeb9fc29c 100644 --- a/source/blender/python/generic/idprop_py_api.cc +++ b/source/blender/python/generic/idprop_py_api.cc @@ -603,7 +603,7 @@ static IDProperty *idp_from_PySequence(const char *name, PyObject *ob) bool use_buffer = false; if (PyObject_CheckBuffer(ob)) { - if (PyObject_GetBuffer(ob, &buffer, PyBUF_SIMPLE | PyBUF_FORMAT) == -1) { + if (PyObject_GetBuffer(ob, &buffer, PyBUF_ND | PyBUF_FORMAT) == -1) { /* Request failed. A `PyExc_BufferError` will have been raised, * so clear it to silently fall back to accessing as a sequence. */ PyErr_Clear(); diff --git a/source/blender/python/intern/bpy_rna.cc b/source/blender/python/intern/bpy_rna.cc index c1292f26f0be5c74f1ff5e5846508f63b9b672e9..8459def08fe6c05cac65d938c5ae314aa5ad3d7b 100644 --- a/source/blender/python/intern/bpy_rna.cc +++ b/source/blender/python/intern/bpy_rna.cc @@ -5460,7 +5460,7 @@ static PyObject *foreach_getset(BPy_PropertyRNA *self, PyObject *args, int set) buffer_is_compat = false; if (PyObject_CheckBuffer(seq)) { Py_buffer buf; - if (PyObject_GetBuffer(seq, &buf, PyBUF_SIMPLE | PyBUF_FORMAT) == -1) { + if (PyObject_GetBuffer(seq, &buf, PyBUF_ND | PyBUF_FORMAT) == -1) { /* Request failed. A `PyExc_BufferError` will have been raised, * so clear it to silently fall back to accessing as a sequence. */ PyErr_Clear(); @@ -5521,7 +5521,7 @@ static PyObject *foreach_getset(BPy_PropertyRNA *self, PyObject *args, int set) buffer_is_compat = false; if (PyObject_CheckBuffer(seq)) { Py_buffer buf; - if (PyObject_GetBuffer(seq, &buf, PyBUF_SIMPLE | PyBUF_FORMAT) == -1) { + if (PyObject_GetBuffer(seq, &buf, PyBUF_ND | PyBUF_FORMAT) == -1) { /* Request failed. A `PyExc_BufferError` will have been raised, * so clear it to silently fall back to accessing as a sequence. */ PyErr_Clear(); @@ -5665,7 +5665,7 @@ static PyObject *pyprop_array_foreach_getset(BPy_PropertyArrayRNA *self, } Py_buffer buf; - if (PyObject_GetBuffer(seq, &buf, PyBUF_SIMPLE | PyBUF_FORMAT) == -1) { + if (PyObject_GetBuffer(seq, &buf, PyBUF_ND | PyBUF_FORMAT) == -1) { PyErr_Clear(); switch (prop_type) {