diff --git a/source/blender/python/gpu/gpu_py_shader.c b/source/blender/python/gpu/gpu_py_shader.c index f62e9b775b1..bc3aea91166 100644 --- a/source/blender/python/gpu/gpu_py_shader.c +++ b/source/blender/python/gpu/gpu_py_shader.c @@ -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,