diff options
Diffstat (limited to 'source/blender/python/gpu/gpu_py_offscreen.c')
-rw-r--r-- | source/blender/python/gpu/gpu_py_offscreen.c | 51 |
1 files changed, 39 insertions, 12 deletions
diff --git a/source/blender/python/gpu/gpu_py_offscreen.c b/source/blender/python/gpu/gpu_py_offscreen.c index 32bfe47ef0b..b50f536da8a 100644 --- a/source/blender/python/gpu/gpu_py_offscreen.c +++ b/source/blender/python/gpu/gpu_py_offscreen.c @@ -188,7 +188,13 @@ static PyObject *pygpu_offscreen_unbind(BPyGPUOffScreen *self, PyObject *args, P BPY_GPU_OFFSCREEN_CHECK_OBJ(self); static const char *_keywords[] = {"restore", NULL}; - static _PyArg_Parser _parser = {"|$O&:unbind", _keywords, 0}; + static _PyArg_Parser _parser = { + "|$" /* Optional keyword only arguments. */ + "O&" /* `restore` */ + ":unbind", + _keywords, + 0, + }; if (!_PyArg_ParseTupleAndKeywordsFast(args, kwds, &_parser, PyC_ParseBool, &restore)) { return NULL; } @@ -216,7 +222,15 @@ static PyObject *pygpu_offscreen__tp_new(PyTypeObject *UNUSED(self), char err_out[256]; static const char *_keywords[] = {"width", "height", "format", NULL}; - static _PyArg_Parser _parser = {"ii|$O&:GPUOffScreen.__new__", _keywords, 0}; + static _PyArg_Parser _parser = { + "i" /* `width` */ + "i" /* `height` */ + "|$" /* Optional keyword only arguments. */ + "O&" /* `format` */ + ":GPUOffScreen.__new__", + _keywords, + 0, + }; if (!_PyArg_ParseTupleAndKeywordsFast( args, kwds, &_parser, &width, &height, PyC_ParseStringEnum, &pygpu_textureformat)) { return NULL; @@ -309,16 +323,29 @@ static PyObject *pygpu_offscreen_draw_view3d(BPyGPUOffScreen *self, PyObject *ar BPY_GPU_OFFSCREEN_CHECK_OBJ(self); - static const char *_keywords[] = {"scene", - "view_layer", - "view3d", - "region", - "view_matrix", - "projection_matrix", - "do_color_management", - NULL}; - - static _PyArg_Parser _parser = {"OOOOO&O&|$O&:draw_view3d", _keywords, 0}; + static const char *_keywords[] = { + "scene", + "view_layer", + "view3d", + "region", + "view_matrix", + "projection_matrix", + "do_color_management", + NULL, + }; + static _PyArg_Parser _parser = { + "O" /* `scene` */ + "O" /* `view_layer` */ + "O" /* `view3d` */ + "O" /* `region` */ + "O&" /* `view_matrix` */ + "O&" /* `projection_matrix` */ + "|$" /* Optional keyword only arguments. */ + "O&" /* `do_color_management` */ + ":draw_view3d", + _keywords, + 0, + }; if (!_PyArg_ParseTupleAndKeywordsFast(args, kwds, &_parser, |