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:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user