Fix BMeshElemSeq.sort(key=None) argument

Allow passing key=None to BMesh element sorting callback,
matching the doc-string & Python's list sort.
This commit is contained in:
Campbell Barton
2024-11-04 11:55:37 +11:00
parent 6ccc786e82
commit 3bab869c0d

View File

@@ -3006,6 +3006,9 @@ static PyObject *bpy_bmelemseq_sort(BPy_BMElemSeq *self, PyObject *args, PyObjec
{
return nullptr;
}
if (keyfunc == Py_None) {
keyfunc = nullptr;
}
}
if (keyfunc != nullptr && !PyCallable_Check(keyfunc)) {