Merge branch 'blender-v4.0-release'
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user