diff options
Diffstat (limited to 'source/blender/python/gpu/gpu_py_batch.c')
-rw-r--r-- | source/blender/python/gpu/gpu_py_batch.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/python/gpu/gpu_py_batch.c b/source/blender/python/gpu/gpu_py_batch.c index 232d4775746..02bcf80aa5d 100644 --- a/source/blender/python/gpu/gpu_py_batch.c +++ b/source/blender/python/gpu/gpu_py_batch.c @@ -82,6 +82,18 @@ static PyObject *pygpu_batch__tp_new(PyTypeObject *UNUSED(type), PyObject *args, } BLI_assert(prim_type.value_found != GPU_PRIM_NONE); + if (prim_type.value_found == GPU_PRIM_LINE_LOOP) { + PyErr_WarnEx(PyExc_DeprecationWarning, + "'LINE_LOOP' is deprecated. Please use 'LINE_STRIP' and close the segment.", + 1); + } + else if (prim_type.value_found == GPU_PRIM_TRI_FAN) { + PyErr_WarnEx( + PyExc_DeprecationWarning, + "'TRI_FAN' is deprecated. Please use 'TRI_STRIP' or 'TRIS' and try modifying your " + "vertices or indices to match the topology.", + 1); + } if (py_vertbuf == NULL) { PyErr_Format(PyExc_TypeError, exc_str_missing_arg, _keywords[1], 2); |