Fix parsing single int for uniform_int

This worked for float but not int.
This commit is contained in:
Campbell Barton 2018-10-26 11:59:49 +11:00
parent 0f0eafaa0e
commit 065d19e223
1 changed files with 6 additions and 1 deletions

View File

@ -518,7 +518,12 @@ static PyObject *bpygpu_shader_uniform_int(
int values[4];
int length;
int ret;
{
if (PyLong_Check(params.seq)) {
values[0] = PyC_Long_AsI32(params.seq);
length = 1;
}
else {
PyObject *seq_fast = PySequence_Fast(params.seq, error_prefix);
if (seq_fast == NULL) {
PyErr_Format(PyExc_TypeError,