Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-10-26 03:59:49 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-10-26 03:59:49 +0300
commit065d19e223bd1a9ceec139ac32a4436c3cf3ec2e (patch)
tree1f763d01398261c8acc394dc3f69bab20b2a3ad7 /source/blender/python
parent0f0eafaa0e451f3133d17277c90e1c9bf833cd58 (diff)
Fix parsing single int for uniform_int
This worked for float but not int.
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/gpu/gpu_py_shader.c7
1 files changed, 6 insertions, 1 deletions
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,