[Bf-blender-cvs] [7b54f76cd97] pygpu_extensions: GPUTexture: Allow 'size' to be passed with any type of sequence object
Germano Cavalcante
noreply at git.blender.org
Fri Feb 12 22:56:30 CET 2021
Commit: 7b54f76cd97947b994de62066ae1e3f310a298ad
Author: Germano Cavalcante
Date: Fri Feb 12 18:02:02 2021 -0300
Branches: pygpu_extensions
https://developer.blender.org/rB7b54f76cd97947b994de62066ae1e3f310a298ad
GPUTexture: Allow 'size' to be passed with any type of sequence object
===================================================================
M source/blender/python/gpu/gpu_py_texture.c
===================================================================
diff --git a/source/blender/python/gpu/gpu_py_texture.c b/source/blender/python/gpu/gpu_py_texture.c
index ab3d926c760..90970f622e0 100644
--- a/source/blender/python/gpu/gpu_py_texture.c
+++ b/source/blender/python/gpu/gpu_py_texture.c
@@ -164,8 +164,8 @@ static PyObject *py_texture_new(PyTypeObject *UNUSED(self), PyObject *args, PyOb
}
int len = 1;
- if (PyTuple_Check(py_size)) {
- len = PyTuple_Size(py_size);
+ if (PySequence_Check(py_size)) {
+ len = PySequence_Size(py_size);
if (PyC_AsArray(size, py_size, len, &PyLong_Type, false, "GPUTexture.__new__") == -1) {
return NULL;
}
More information about the Bf-blender-cvs
mailing list