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 <campbell@blender.org>2022-04-08 02:41:28 +0300
committerCampbell Barton <campbell@blender.org>2022-04-08 04:49:50 +0300
commit982aea88e0d74020c62c2054a45eeafa56c8ca30 (patch)
tree6215fe088028a0943ace5ea80e256b7a42132420 /source/blender/python
parent87a3bf33564b035e4c2400098ea4932d5dfdba5d (diff)
Cleanup: separate format-units for Python argument parsing
With the increased use of multi-character format units and keyword-only arguments these are increasingly difficult to make sense of. Split the string onto multiple lines, one per argument. While verbose it's easier to understand and add new arguments.
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/generic/imbuf_py_api.c40
-rw-r--r--source/blender/python/gpu/gpu_py_batch.c10
-rw-r--r--source/blender/python/gpu/gpu_py_element.c8
-rw-r--r--source/blender/python/gpu/gpu_py_framebuffer.c46
-rw-r--r--source/blender/python/gpu/gpu_py_offscreen.c51
-rw-r--r--source/blender/python/gpu/gpu_py_shader.c23
-rw-r--r--source/blender/python/gpu/gpu_py_texture.c21
-rw-r--r--source/blender/python/gpu/gpu_py_uniformbuffer.c7
-rw-r--r--source/blender/python/gpu/gpu_py_vertex_buffer.c16
-rw-r--r--source/blender/python/gpu/gpu_py_vertex_format.c11
-rw-r--r--source/blender/python/intern/bpy.c39
-rw-r--r--source/blender/python/intern/bpy_app_icons.c23
-rw-r--r--source/blender/python/intern/bpy_app_timers.c10
-rw-r--r--source/blender/python/intern/bpy_gizmo_wrap.c10
-rw-r--r--source/blender/python/intern/bpy_library_load.c12
-rw-r--r--source/blender/python/intern/bpy_library_write.c13
-rw-r--r--source/blender/python/intern/bpy_msgbus.c19
-rw-r--r--source/blender/python/intern/bpy_props.c208
-rw-r--r--source/blender/python/intern/bpy_rna.c9
-rw-r--r--source/blender/python/intern/bpy_rna_data.c8
-rw-r--r--source/blender/python/intern/bpy_rna_gizmo.c37
-rw-r--r--source/blender/python/intern/bpy_rna_id_collection.c27
-rw-r--r--source/blender/python/intern/bpy_utils_units.c24
23 files changed, 603 insertions, 69 deletions
diff --git a/source/blender/python/generic/imbuf_py_api.c b/source/blender/python/generic/imbuf_py_api.c
index bfe25435eab..ef11d1ab32d 100644
--- a/source/blender/python/generic/imbuf_py_api.c
+++ b/source/blender/python/generic/imbuf_py_api.c
@@ -92,7 +92,14 @@ static PyObject *py_imbuf_resize(Py_ImBuf *self, PyObject *args, PyObject *kw)
struct PyC_StringEnum method = {method_items, FAST};
static const char *_keywords[] = {"size", "method", NULL};
- static _PyArg_Parser _parser = {"(ii)|$O&:resize", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "(ii)" /* `size` */
+ "|$" /* Optional keyword only arguments. */
+ "O&" /* `method` */
+ ":resize",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(
args, kw, &_parser, &size[0], &size[1], PyC_ParseStringEnum, &method)) {
return NULL;
@@ -130,7 +137,13 @@ static PyObject *py_imbuf_crop(Py_ImBuf *self, PyObject *args, PyObject *kw)
rcti crop;
static const char *_keywords[] = {"min", "max", NULL};
- static _PyArg_Parser _parser = {"(II)(II):crop", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "(II)" /* `min` */
+ "(II)" /* `max` */
+ ":crop",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(
args, kw, &_parser, &crop.xmin, &crop.ymin, &crop.xmax, &crop.ymax)) {
return NULL;
@@ -420,7 +433,12 @@ static PyObject *M_imbuf_new(PyObject *UNUSED(self), PyObject *args, PyObject *k
{
int size[2];
static const char *_keywords[] = {"size", NULL};
- static _PyArg_Parser _parser = {"(ii):new", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "(ii)" /* `size` */
+ ":new",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args, kw, &_parser, &size[0], &size[1])) {
return NULL;
}
@@ -455,7 +473,12 @@ static PyObject *M_imbuf_load(PyObject *UNUSED(self), PyObject *args, PyObject *
const char *filepath;
static const char *_keywords[] = {"filepath", NULL};
- static _PyArg_Parser _parser = {"s:load", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "s" /* `filepath` */
+ ":load",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args, kw, &_parser, &filepath)) {
return NULL;
}
@@ -497,7 +520,14 @@ static PyObject *M_imbuf_write(PyObject *UNUSED(self), PyObject *args, PyObject
const char *filepath = NULL;
static const char *_keywords[] = {"image", "filepath", NULL};
- static _PyArg_Parser _parser = {"O!|$s:write", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "O!" /* `image` */
+ "|$" /* Optional keyword only arguments. */
+ "s" /* `filepath` */
+ ":write",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args, kw, &_parser, &Py_ImBuf_Type, &py_imb, &filepath)) {
return NULL;
}
diff --git a/source/blender/python/gpu/gpu_py_batch.c b/source/blender/python/gpu/gpu_py_batch.c
index 486601f4c86..232d4775746 100644
--- a/source/blender/python/gpu/gpu_py_batch.c
+++ b/source/blender/python/gpu/gpu_py_batch.c
@@ -60,7 +60,15 @@ static PyObject *pygpu_batch__tp_new(PyTypeObject *UNUSED(type), PyObject *args,
BPyGPUIndexBuf *py_indexbuf = NULL;
static const char *_keywords[] = {"type", "buf", "elem", NULL};
- static _PyArg_Parser _parser = {"|$O&O!O!:GPUBatch.__new__", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "|$" /* Optional keyword only arguments. */
+ "O&" /* `type` */
+ "O!" /* `buf` */
+ "O!" /* `elem` */
+ ":GPUBatch.__new__",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args,
kwds,
&_parser,
diff --git a/source/blender/python/gpu/gpu_py_element.c b/source/blender/python/gpu/gpu_py_element.c
index af993539f18..f2836576659 100644
--- a/source/blender/python/gpu/gpu_py_element.c
+++ b/source/blender/python/gpu/gpu_py_element.c
@@ -40,7 +40,13 @@ static PyObject *pygpu_IndexBuf__tp_new(PyTypeObject *UNUSED(type), PyObject *ar
GPUIndexBufBuilder builder;
static const char *_keywords[] = {"type", "seq", NULL};
- static _PyArg_Parser _parser = {"$O&O:IndexBuf.__new__", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "$O" /* `type` */
+ "&O" /* `seq` */
+ ":IndexBuf.__new__",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(
args, kwds, &_parser, PyC_ParseStringEnum, &prim_type, &seq)) {
return NULL;
diff --git a/source/blender/python/gpu/gpu_py_framebuffer.c b/source/blender/python/gpu/gpu_py_framebuffer.c
index 5cc36a7b61b..2a7857b3059 100644
--- a/source/blender/python/gpu/gpu_py_framebuffer.c
+++ b/source/blender/python/gpu/gpu_py_framebuffer.c
@@ -278,7 +278,14 @@ static PyObject *pygpu_framebuffer__tp_new(PyTypeObject *UNUSED(self),
PyObject *depth_attachment = NULL;
PyObject *color_attachements = NULL;
static const char *_keywords[] = {"depth_slot", "color_slots", NULL};
- static _PyArg_Parser _parser = {"|$OO:GPUFrameBuffer.__new__", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "|$" /* Optional keyword only arguments. */
+ "O" /* `depth_slot` */
+ "O" /* `color_slots` */
+ ":GPUFrameBuffer.__new__",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(
args, kwds, &_parser, &depth_attachment, &color_attachements)) {
return NULL;
@@ -365,7 +372,15 @@ static PyObject *pygpu_framebuffer_clear(BPyGPUFrameBuffer *self, PyObject *args
PyObject *py_stencil = NULL;
static const char *_keywords[] = {"color", "depth", "stencil", NULL};
- static _PyArg_Parser _parser = {"|$OOO:clear", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "|$" /* Optional keyword only arguments. */
+ "O" /* `color` */
+ "O" /* `depth` */
+ "O" /* `stencil` */
+ ":clear",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args, kwds, &_parser, &py_col, &py_depth, &py_stencil)) {
return NULL;
}
@@ -475,7 +490,20 @@ static PyObject *pygpu_framebuffer_read_color(BPyGPUFrameBuffer *self,
static const char *_keywords[] = {
"x", "y", "xsize", "ysize", "channels", "slot", "format", "data", NULL};
- static _PyArg_Parser _parser = {"iiiiiIO&|$O!:read_color", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "i" /* `x` */
+ "i" /* `y` */
+ "i" /* `xsize` */
+ "i" /* `ysize` */
+ "i" /* `channels` */
+ "I" /* `slot` */
+ "O&" /* `format` */
+ "|$" /* Optional keyword only arguments. */
+ "O!" /* `data` */
+ ":read_color",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args,
kwds,
&_parser,
@@ -559,7 +587,17 @@ static PyObject *pygpu_framebuffer_read_depth(BPyGPUFrameBuffer *self,
BPyGPUBuffer *py_buffer = NULL;
static const char *_keywords[] = {"x", "y", "xsize", "ysize", "data", NULL};
- static _PyArg_Parser _parser = {"iiii|$O!:read_depth", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "i" /* `x` */
+ "i" /* `y` */
+ "i" /* `xsize` */
+ "i" /* `ysize` */
+ "|$" /* Optional keyword only arguments. */
+ "O!" /* `data` */
+ ":read_depth",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(
args, kwds, &_parser, &x, &y, &w, &h, &BPyGPU_BufferType, &py_buffer)) {
return NULL;
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,
diff --git a/source/blender/python/gpu/gpu_py_shader.c b/source/blender/python/gpu/gpu_py_shader.c
index 43b26e05327..c74b3e173d1 100644
--- a/source/blender/python/gpu/gpu_py_shader.c
+++ b/source/blender/python/gpu/gpu_py_shader.c
@@ -96,8 +96,18 @@ static PyObject *pygpu_shader__tp_new(PyTypeObject *UNUSED(type), PyObject *args
static const char *_keywords[] = {
"vertexcode", "fragcode", "geocode", "libcode", "defines", "name", NULL};
-
- static _PyArg_Parser _parser = {"ss|$ssss:GPUShader.__new__", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "s" /* `vertexcode` */
+ "s" /* `fragcode` */
+ "|$" /* Optional keyword only arguments. */
+ "s" /* `geocode` */
+ "s" /* `libcode` */
+ "s" /* `defines` */
+ "s" /* `name` */
+ ":GPUShader.__new__",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args,
kwds,
&_parser,
@@ -751,7 +761,14 @@ static PyObject *pygpu_shader_from_builtin(PyObject *UNUSED(self), PyObject *arg
struct PyC_StringEnum pygpu_config = {pygpu_shader_config_items, GPU_SHADER_CFG_DEFAULT};
static const char *_keywords[] = {"shader_name", "config", NULL};
- static _PyArg_Parser _parser = {"O&|$O&:from_builtin", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "O&" /* `shader_name` */
+ "|$" /* Optional keyword only arguments. */
+ "O&" /* `config` */
+ ":from_builtin",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args,
kwds,
&_parser,
diff --git a/source/blender/python/gpu/gpu_py_texture.c b/source/blender/python/gpu/gpu_py_texture.c
index 59896dbca2a..7a23f7ac91f 100644
--- a/source/blender/python/gpu/gpu_py_texture.c
+++ b/source/blender/python/gpu/gpu_py_texture.c
@@ -122,7 +122,17 @@ static PyObject *pygpu_texture__tp_new(PyTypeObject *UNUSED(self), PyObject *arg
char err_out[256] = "unknown error. See console";
static const char *_keywords[] = {"size", "layers", "is_cubemap", "format", "data", NULL};
- static _PyArg_Parser _parser = {"O|$ipO&O!:GPUTexture.__new__", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "O" /* `size` */
+ "|$" /* Optional keyword only arguments. */
+ "i" /* `layers` */
+ "p" /* `is_cubemap` */
+ "O&" /* `format` */
+ "O!" /* `data` */
+ ":GPUTexture.__new__",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args,
kwds,
&_parser,
@@ -288,7 +298,14 @@ static PyObject *pygpu_texture_clear(BPyGPUTexture *self, PyObject *args, PyObje
PyObject *py_values;
static const char *_keywords[] = {"format", "value", NULL};
- static _PyArg_Parser _parser = {"$O&O:clear", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "$" /* Keyword only arguments. */
+ "O&" /* `format` */
+ "O" /* `value` */
+ ":clear",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(
args, kwds, &_parser, PyC_ParseStringEnum, &pygpu_dataformat, &py_values)) {
return NULL;
diff --git a/source/blender/python/gpu/gpu_py_uniformbuffer.c b/source/blender/python/gpu/gpu_py_uniformbuffer.c
index d3d9ed9b6da..f5a0af860b4 100644
--- a/source/blender/python/gpu/gpu_py_uniformbuffer.c
+++ b/source/blender/python/gpu/gpu_py_uniformbuffer.c
@@ -68,7 +68,12 @@ static PyObject *pygpu_uniformbuffer__tp_new(PyTypeObject *UNUSED(self),
char err_out[256] = "unknown error. See console";
static const char *_keywords[] = {"data", NULL};
- static _PyArg_Parser _parser = {"O!:GPUUniformBuf.__new__", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "O!" /* `data` */
+ ":GPUUniformBuf.__new__",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args, kwds, &_parser, &BPyGPU_BufferType, &pybuffer_obj)) {
return NULL;
}
diff --git a/source/blender/python/gpu/gpu_py_vertex_buffer.c b/source/blender/python/gpu/gpu_py_vertex_buffer.c
index 499af7df9d7..a295bedeae2 100644
--- a/source/blender/python/gpu/gpu_py_vertex_buffer.c
+++ b/source/blender/python/gpu/gpu_py_vertex_buffer.c
@@ -236,7 +236,13 @@ static PyObject *pygpu_vertbuf__tp_new(PyTypeObject *UNUSED(type), PyObject *arg
} params;
static const char *_keywords[] = {"format", "len", NULL};
- static _PyArg_Parser _parser = {"O!I:GPUVertBuf.__new__", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "O!" /* `format` */
+ "I" /* `len` */
+ ":GPUVertBuf.__new__",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(
args, kwds, &_parser, &BPyGPUVertFormat_Type, &params.py_fmt, &params.len)) {
return NULL;
@@ -265,7 +271,13 @@ static PyObject *pygpu_vertbuf_attr_fill(BPyGPUVertBuf *self, PyObject *args, Py
PyObject *identifier;
static const char *_keywords[] = {"id", "data", NULL};
- static _PyArg_Parser _parser = {"OO:attr_fill", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "O" /* `id` */
+ "O" /* `data` */
+ ":attr_fill",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args, kwds, &_parser, &identifier, &data)) {
return NULL;
}
diff --git a/source/blender/python/gpu/gpu_py_vertex_format.c b/source/blender/python/gpu/gpu_py_vertex_format.c
index 402112d20a3..3e6695419c0 100644
--- a/source/blender/python/gpu/gpu_py_vertex_format.c
+++ b/source/blender/python/gpu/gpu_py_vertex_format.c
@@ -94,7 +94,16 @@ static PyObject *pygpu_vertformat_attr_add(BPyGPUVertFormat *self, PyObject *arg
}
static const char *_keywords[] = {"id", "comp_type", "len", "fetch_mode", NULL};
- static _PyArg_Parser _parser = {"$sO&IO&:attr_add", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "$" /* Keyword only arguments. */
+ "s" /* `id` */
+ "O&" /* `comp_type` */
+ "I" /* `len` */
+ "O&" /* `fetch_mode` */
+ ":attr_add",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args,
kwds,
&_parser,
diff --git a/source/blender/python/intern/bpy.c b/source/blender/python/intern/bpy.c
index 78f9e6eba5e..2ce1da81a2a 100644
--- a/source/blender/python/intern/bpy.c
+++ b/source/blender/python/intern/bpy.c
@@ -113,7 +113,15 @@ static PyObject *bpy_blend_paths(PyObject *UNUSED(self), PyObject *args, PyObjec
bool local = false;
static const char *_keywords[] = {"absolute", "packed", "local", NULL};
- static _PyArg_Parser _parser = {"|$O&O&O&:blend_paths", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "|$" /* Optional keyword only arguments. */
+ "O&" /* `absolute` */
+ "O&" /* `packed` */
+ "O&" /* `local` */
+ ":blend_paths",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args,
kw,
&_parser,
@@ -171,7 +179,6 @@ static PyObject *bpy_flip_name(PyObject *UNUSED(self), PyObject *args, PyObject
"s#" /* `name` */
"|$" /* Optional, keyword only arguments. */
"O&" /* `strip_digits` */
- /* Name to show in the case of an error. */
":flip_name",
_keywords,
0,
@@ -211,7 +218,14 @@ static PyObject *bpy_user_resource(PyObject *UNUSED(self), PyObject *args, PyObj
const char *path;
static const char *_keywords[] = {"type", "path", NULL};
- static _PyArg_Parser _parser = {"O&|$s:user_resource", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "O&" /* `type` */
+ "|$" /* Optional keyword only arguments. */
+ "s" /* `path` */
+ ":user_resource",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args, kw, &_parser, PyC_ParseStringEnum, &type, &subdir)) {
return NULL;
}
@@ -247,7 +261,14 @@ static PyObject *bpy_system_resource(PyObject *UNUSED(self), PyObject *args, PyO
const char *path;
static const char *_keywords[] = {"type", "path", NULL};
- static _PyArg_Parser _parser = {"O&|$s:system_resource", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "O&" /* `type` */
+ "|$" /* Optional keyword only arguments. */
+ "s" /* `path` */
+ ":system_resource",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args, kw, &_parser, PyC_ParseStringEnum, &type, &subdir)) {
return NULL;
}
@@ -285,7 +306,15 @@ static PyObject *bpy_resource_path(PyObject *UNUSED(self), PyObject *args, PyObj
const char *path;
static const char *_keywords[] = {"type", "major", "minor", NULL};
- static _PyArg_Parser _parser = {"O&|$ii:resource_path", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "O&" /* `type` */
+ "|$" /* Optional keyword only arguments. */
+ "i" /* `major` */
+ "i" /* `minor` */
+ ":resource_path",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(
args, kw, &_parser, PyC_ParseStringEnum, &type, &major, &minor)) {
return NULL;
diff --git a/source/blender/python/intern/bpy_app_icons.c b/source/blender/python/intern/bpy_app_icons.c
index 48e3072008c..3f884338bbb 100644
--- a/source/blender/python/intern/bpy_app_icons.c
+++ b/source/blender/python/intern/bpy_app_icons.c
@@ -40,7 +40,14 @@ static PyObject *bpy_app_icons_new_triangles(PyObject *UNUSED(self), PyObject *a
PyObject *py_coords, *py_colors;
static const char *_keywords[] = {"range", "coords", "colors", NULL};
- static _PyArg_Parser _parser = {"(BB)SS:new_triangles", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "(BB)" /* `range` */
+ "S" /* `coords` */
+ "S" /* `colors` */
+ ":new_triangles",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(
args, kw, &_parser, &coords_range[0], &coords_range[1], &py_coords, &py_colors)) {
return NULL;
@@ -93,7 +100,12 @@ static PyObject *bpy_app_icons_new_triangles_from_file(PyObject *UNUSED(self),
char *filename;
static const char *_keywords[] = {"filename", NULL};
- static _PyArg_Parser _parser = {"s:new_triangles_from_file", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "s" /* `filename` */
+ ":new_triangles_from_file",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args, kw, &_parser, &filename)) {
return NULL;
}
@@ -115,7 +127,12 @@ static PyObject *bpy_app_icons_release(PyObject *UNUSED(self), PyObject *args, P
{
int icon_id;
static const char *_keywords[] = {"icon_id", NULL};
- static _PyArg_Parser _parser = {"i:release", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "i" /* `icon_id` */
+ ":release",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args, kw, &_parser, &icon_id)) {
return NULL;
}
diff --git a/source/blender/python/intern/bpy_app_timers.c b/source/blender/python/intern/bpy_app_timers.c
index 1ef3fabacf5..5a42ecfdbc8 100644
--- a/source/blender/python/intern/bpy_app_timers.c
+++ b/source/blender/python/intern/bpy_app_timers.c
@@ -93,7 +93,15 @@ static PyObject *bpy_app_timers_register(PyObject *UNUSED(self), PyObject *args,
int persistent = false;
static const char *_keywords[] = {"function", "first_interval", "persistent", NULL};
- static _PyArg_Parser _parser = {"O|$dp:register", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "O" /* `function` */
+ "|$" /* Optional keyword only arguments. */
+ "d" /* `first_interval` */
+ "p" /* `persistent` */
+ ":register",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(
args, kw, &_parser, &function, &first_interval, &persistent)) {
return NULL;
diff --git a/source/blender/python/intern/bpy_gizmo_wrap.c b/source/blender/python/intern/bpy_gizmo_wrap.c
index 88cddac659f..ad235e691c4 100644
--- a/source/blender/python/intern/bpy_gizmo_wrap.c
+++ b/source/blender/python/intern/bpy_gizmo_wrap.c
@@ -51,7 +51,15 @@ static bool bpy_gizmotype_target_property_def(wmGizmoType *gzt, PyObject *item)
};
static const char *const _keywords[] = {"id", "type", "array_length", NULL};
- static _PyArg_Parser _parser = {"|$sO&i:register_class", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "|$" /* Optional keyword only arguments. */
+ "s" /* `id` */
+ "O&" /* `type` */
+ "i" /* `array_length` */
+ ":register_class",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(empty_tuple,
item,
&_parser,
diff --git a/source/blender/python/intern/bpy_library_load.c b/source/blender/python/intern/bpy_library_load.c
index e3a1ca16660..e0e5dd869ba 100644
--- a/source/blender/python/intern/bpy_library_load.c
+++ b/source/blender/python/intern/bpy_library_load.c
@@ -186,7 +186,17 @@ static PyObject *bpy_lib_load(BPy_PropertyRNA *self, PyObject *args, PyObject *k
bool is_rel = false, is_link = false, use_assets_only = false;
static const char *_keywords[] = {"filepath", "link", "relative", "assets_only", NULL};
- static _PyArg_Parser _parser = {"s|$O&O&O&:load", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "s" /* `filepath` */
+ /* Optional keyword only arguments. */
+ "|$"
+ "O&" /* `link` */
+ "O&" /* `relative` */
+ "O&" /* `assets_only` */
+ ":load",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args,
kw,
&_parser,
diff --git a/source/blender/python/intern/bpy_library_write.c b/source/blender/python/intern/bpy_library_write.c
index a3f2f27a452..79a3680b78d 100644
--- a/source/blender/python/intern/bpy_library_write.c
+++ b/source/blender/python/intern/bpy_library_write.c
@@ -78,13 +78,22 @@ static PyObject *bpy_lib_write(BPy_PropertyRNA *self, PyObject *args, PyObject *
static const char *_keywords[] = {
"filepath",
"datablocks",
- /* optional */
"path_remap",
"fake_user",
"compress",
NULL,
};
- static _PyArg_Parser _parser = {"sO!|$O&O&O&:write", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "s" /* `filepath` */
+ "O!" /* `datablocks` */
+ "|$" /* Optional keyword only arguments. */
+ "O&" /* `path_remap` */
+ "O&" /* `fake_user` */
+ "O&" /* `compress` */
+ ":write",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args,
kw,
&_parser,
diff --git a/source/blender/python/intern/bpy_msgbus.c b/source/blender/python/intern/bpy_msgbus.c
index 88740762ad8..10165bf6b0d 100644
--- a/source/blender/python/intern/bpy_msgbus.c
+++ b/source/blender/python/intern/bpy_msgbus.c
@@ -240,7 +240,17 @@ static PyObject *bpy_msgbus_subscribe_rna(PyObject *UNUSED(self), PyObject *args
"options",
NULL,
};
- static _PyArg_Parser _parser = {"OOO!O|$O!:subscribe_rna", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "O" /* `key` */
+ "O" /* `owner` */
+ "O!" /* `args` */
+ "O" /* `notify` */
+ "|$" /* Optional keyword only arguments. */
+ "O!" /* `options` */
+ ":subscribe_rna",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args,
kw,
&_parser,
@@ -329,7 +339,12 @@ static PyObject *bpy_msgbus_publish_rna(PyObject *UNUSED(self), PyObject *args,
"key",
NULL,
};
- static _PyArg_Parser _parser = {"O:publish_rna", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "O" /* `key` */
+ ":publish_rna",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args, kw, &_parser, &py_sub)) {
return NULL;
}
diff --git a/source/blender/python/intern/bpy_props.c b/source/blender/python/intern/bpy_props.c
index 6f278c1c771..893ea90a235 100644
--- a/source/blender/python/intern/bpy_props.c
+++ b/source/blender/python/intern/bpy_props.c
@@ -2730,7 +2730,23 @@ static PyObject *BPy_BoolProperty(PyObject *self, PyObject *args, PyObject *kw)
"set",
NULL,
};
- static _PyArg_Parser _parser = {"O&|$ssO&O&O&O&O&OOO:BoolProperty", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "O&" /* `attr` */
+ "|$" /* Optional, keyword only arguments. */
+ "s" /* `name` */
+ "s" /* `description` */
+ "O&" /* `default` */
+ "O&" /* `options` */
+ "O&" /* `override` */
+ "O&" /* `tags` */
+ "O&" /* `subtype` */
+ "O" /* `update` */
+ "O" /* `get` */
+ "O" /* `set` */
+ ":BoolProperty",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args,
kw,
&_parser,
@@ -2862,7 +2878,24 @@ static PyObject *BPy_BoolVectorProperty(PyObject *self, PyObject *args, PyObject
"set",
NULL,
};
- static _PyArg_Parser _parser = {"O&|$ssOO&O&O&O&O&OOO:BoolVectorProperty", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "O&" /* `attr` */
+ "|$" /* Optional, keyword only arguments. */
+ "s" /* `name` */
+ "s" /* `description` */
+ "O" /* `default` */
+ "O&" /* `options` */
+ "O&" /* `override` */
+ "O&" /* `tags` */
+ "O&" /* `subtype` */
+ "O&" /* `size` */
+ "O" /* `update` */
+ "O" /* `get` */
+ "O" /* `set` */
+ ":BoolVectorProperty",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args,
kw,
&_parser,
@@ -3025,7 +3058,28 @@ static PyObject *BPy_IntProperty(PyObject *self, PyObject *args, PyObject *kw)
"set",
NULL,
};
- static _PyArg_Parser _parser = {"O&|$ssiiiiiiO&O&O&O&OOO:IntProperty", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "O&" /* `attr` */
+ "|$" /* Optional, keyword only arguments. */
+ "s" /* `name` */
+ "s" /* `description` */
+ "i" /* `default` */
+ "i" /* `min` */
+ "i" /* `max` */
+ "i" /* `soft_min` */
+ "i" /* `soft_max` */
+ "i" /* `step` */
+ "O&" /* `options` */
+ "O&" /* `override` */
+ "O&" /* `tags` */
+ "O&" /* `subtype` */
+ "O" /* `update` */
+ "O" /* `get` */
+ "O" /* `set` */
+ ":IntProperty",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args,
kw,
&_parser,
@@ -3178,7 +3232,29 @@ static PyObject *BPy_IntVectorProperty(PyObject *self, PyObject *args, PyObject
"set",
NULL,
};
- static _PyArg_Parser _parser = {"O&|$ssOiiiiiO&O&O&O&O&OOO:IntVectorProperty", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "O&" /* `attr` */
+ "|$" /* Optional, keyword only arguments. */
+ "s" /* `name` */
+ "s" /* `description` */
+ "O" /* `default` */
+ "i" /* `min` */
+ "i" /* `max` */
+ "i" /* `soft_min` */
+ "i" /* `soft_max` */
+ "i" /* `step` */
+ "O&" /* `options` */
+ "O&" /* `override` */
+ "O&" /* `tags` */
+ "O&" /* `subtype` */
+ "O&" /* `size` */
+ "O" /* `update` */
+ "O" /* `get` */
+ "O" /* `set` */
+ ":IntVectorProperty",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args,
kw,
&_parser,
@@ -3343,7 +3419,30 @@ static PyObject *BPy_FloatProperty(PyObject *self, PyObject *args, PyObject *kw)
"soft_max", "step", "precision", "options", "override", "tags", "subtype",
"unit", "update", "get", "set", NULL,
};
- static _PyArg_Parser _parser = {"O&|$ssffffffiO&O&O&O&O&OOO:FloatProperty", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "O&" /* `attr` */
+ "|$" /* Optional, keyword only arguments. */
+ "s" /* `name` */
+ "s" /* `description` */
+ "f" /* `default` */
+ "f" /* `min` */
+ "f" /* `max` */
+ "f" /* `soft_min` */
+ "f" /* `soft_max` */
+ "f" /* `step` */
+ "i" /* `precision` */
+ "O&" /* `options` */
+ "O&" /* `override` */
+ "O&" /* `tags` */
+ "O&" /* `subtype` */
+ "O&" /* `unit` */
+ "O" /* `update` */
+ "O" /* `get` */
+ "O" /* `set` */
+ ":FloatProperty",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args,
kw,
&_parser,
@@ -3493,7 +3592,30 @@ static PyObject *BPy_FloatVectorProperty(PyObject *self, PyObject *args, PyObjec
"unit", "size", "update", "get", "set", NULL,
};
static _PyArg_Parser _parser = {
- "O&|$ssOfffffiO&O&O&O&O&O&OOO:FloatVectorProperty", _keywords, 0};
+ "O&" /* `attr` */
+ "|$" /* Optional, keyword only arguments. */
+ "s" /* `name` */
+ "s" /* `description` */
+ "O" /* `default` */
+ "f" /* `min` */
+ "f" /* `max` */
+ "f" /* `soft_min` */
+ "f" /* `soft_max` */
+ "f" /* `step` */
+ "i" /* `precision` */
+ "O&" /* `options` */
+ "O&" /* `override` */
+ "O&" /* `tags` */
+ "O&" /* `subtype` */
+ "O&" /* `unit` */
+ "O&" /* `size` */
+ "O" /* `update` */
+ "O" /* `get` */
+ "O" /* `set` */
+ ":FloatVectorProperty",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args,
kw,
&_parser,
@@ -3661,7 +3783,24 @@ static PyObject *BPy_StringProperty(PyObject *self, PyObject *args, PyObject *kw
"set",
NULL,
};
- static _PyArg_Parser _parser = {"O&|$sssiO&O&O&O&OOO:StringProperty", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "O&" /* `attr` */
+ "|$" /* Optional, keyword only arguments. */
+ "s" /* `name` */
+ "s" /* `description` */
+ "s" /* `default` */
+ "i" /* `maxlen` */
+ "O&" /* `options` */
+ "O&" /* `override` */
+ "O&" /* `tags` */
+ "O&" /* `subtype` */
+ "O" /* `update` */
+ "O" /* `get` */
+ "O" /* `set` */
+ ":StringProperty",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args,
kw,
&_parser,
@@ -3831,7 +3970,23 @@ static PyObject *BPy_EnumProperty(PyObject *self, PyObject *args, PyObject *kw)
"set",
NULL,
};
- static _PyArg_Parser _parser = {"O&O|$ssOO&O&O&OOO:EnumProperty", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "O&" /* `attr` */
+ "O" /* `items` */
+ "|$" /* Optional, keyword only arguments. */
+ "s" /* `name` */
+ "s" /* `description` */
+ "O" /* `default` */
+ "O&" /* `options` */
+ "O&" /* `override` */
+ "O&" /* `tags` */
+ "O" /* `update` */
+ "O" /* `get` */
+ "O" /* `set` */
+ ":EnumProperty",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args,
kw,
&_parser,
@@ -4031,7 +4186,21 @@ PyObject *BPy_PointerProperty(PyObject *self, PyObject *args, PyObject *kw)
"update",
NULL,
};
- static _PyArg_Parser _parser = {"O&O|$ssO&O&O&OO:PointerProperty", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "O&" /* `attr` */
+ "O" /* `type` */
+ "|$" /* Optional, keyword only arguments. */
+ "s" /* `name` */
+ "s" /* `description` */
+ "O&" /* `options` */
+ "O&" /* `override` */
+ "O&" /* `tags` */
+ "O" /* `poll` */
+ "O" /* `update` */
+ ":PointerProperty",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args,
kw,
&_parser,
@@ -4151,7 +4320,19 @@ PyObject *BPy_CollectionProperty(PyObject *self, PyObject *args, PyObject *kw)
"tags",
NULL,
};
- static _PyArg_Parser _parser = {"O&O|$ssO&O&O&:CollectionProperty", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "O&" /* `attr` */
+ "O" /* `type` */
+ "|$" /* Optional, keyword only arguments. */
+ "s" /* `name` */
+ "s" /* `description` */
+ "O&" /* `options` */
+ "O&" /* `override` */
+ "O&" /* `tags` */
+ ":CollectionProperty",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args,
kw,
&_parser,
@@ -4251,7 +4432,12 @@ static PyObject *BPy_RemoveProperty(PyObject *self, PyObject *args, PyObject *kw
"attr",
NULL,
};
- static _PyArg_Parser _parser = {"s:RemoveProperty", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "s" /* `attr` */
+ ":RemoveProperty",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args, kw, &_parser, &id)) {
return NULL;
}
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index a28137c3bed..5db66405403 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -3462,7 +3462,14 @@ static PyObject *pyrna_struct_is_property_set(BPy_StructRNA *self, PyObject *arg
PYRNA_STRUCT_CHECK_OBJ(self);
static const char *_keywords[] = {"", "ghost", NULL};
- static _PyArg_Parser _parser = {"s|$O&:is_property_set", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "s" /* `name` (positional). */
+ "|$" /* Optional keyword only arguments. */
+ "O&" /* `ghost` */
+ ":is_property_set",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args, kw, &_parser, &name, PyC_ParseBool, &use_ghost)) {
return NULL;
}
diff --git a/source/blender/python/intern/bpy_rna_data.c b/source/blender/python/intern/bpy_rna_data.c
index 3f82f176a5d..cc0b4aa57d5 100644
--- a/source/blender/python/intern/bpy_rna_data.c
+++ b/source/blender/python/intern/bpy_rna_data.c
@@ -157,7 +157,13 @@ static PyObject *bpy_rna_data_temp_data(PyObject *UNUSED(self), PyObject *args,
BPy_DataContext *ret;
const char *filepath = NULL;
static const char *_keywords[] = {"filepath", NULL};
- static _PyArg_Parser _parser = {"|$z:temp_data", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "|$" /* Optional keyword only arguments. */
+ "z" /* `filepath` */
+ ":temp_data",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args, kw, &_parser, &filepath)) {
return NULL;
}
diff --git a/source/blender/python/intern/bpy_rna_gizmo.c b/source/blender/python/intern/bpy_rna_gizmo.c
index f193be40931..61f439e5152 100644
--- a/source/blender/python/intern/bpy_rna_gizmo.c
+++ b/source/blender/python/intern/bpy_rna_gizmo.c
@@ -336,7 +336,17 @@ static PyObject *bpy_gizmo_target_set_handler(PyObject *UNUSED(self), PyObject *
* 'Gizmo.target_set_prop & target_set_operator'
* (see: rna_wm_gizmo_api.c). conventions should match. */
static const char *const _keywords[] = {"self", "target", "get", "set", "range", NULL};
- static _PyArg_Parser _parser = {"O&O&|$OOO:target_set_handler", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "O&" /* `self` */
+ "O&" /* `target` */
+ "|$" /* Optional keyword only arguments. */
+ "O" /* `get` */
+ "O" /* `set` */
+ "O" /* `range` */
+ ":target_set_handler",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args,
kw,
&_parser,
@@ -423,7 +433,13 @@ static PyObject *bpy_gizmo_target_get_value(PyObject *UNUSED(self), PyObject *ar
};
static const char *const _keywords[] = {"self", "target", NULL};
- static _PyArg_Parser _parser = {"O&O&:target_get_value", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "O&" /* `self` */
+ "O&" /* `target` */
+ ":target_get_value",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args,
kw,
&_parser,
@@ -481,7 +497,14 @@ static PyObject *bpy_gizmo_target_set_value(PyObject *UNUSED(self), PyObject *ar
};
static const char *const _keywords[] = {"self", "target", "value", NULL};
- static _PyArg_Parser _parser = {"O&O&O:target_set_value", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "O&" /* `self` */
+ "O&" /* `target` */
+ "O" /* `value` */
+ ":target_set_value",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args,
kw,
&_parser,
@@ -550,7 +573,13 @@ static PyObject *bpy_gizmo_target_get_range(PyObject *UNUSED(self), PyObject *ar
};
static const char *const _keywords[] = {"self", "target", NULL};
- static _PyArg_Parser _parser = {"O&O&:target_get_range", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "O&" /* `self` */
+ "O&" /* `target` */
+ ":target_get_range",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args,
kw,
&_parser,
diff --git a/source/blender/python/intern/bpy_rna_id_collection.c b/source/blender/python/intern/bpy_rna_id_collection.c
index 792e33f03a5..766c74c0bbc 100644
--- a/source/blender/python/intern/bpy_rna_id_collection.c
+++ b/source/blender/python/intern/bpy_rna_id_collection.c
@@ -158,7 +158,15 @@ static PyObject *bpy_user_map(PyObject *UNUSED(self), PyObject *args, PyObject *
IDUserMapData data_cb = {NULL};
static const char *_keywords[] = {"subset", "key_types", "value_types", NULL};
- static _PyArg_Parser _parser = {"|$OO!O!:user_map", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "|$" /* Optional keyword only arguments. */
+ "O" /* `subset` */
+ "O!" /* `key_types` */
+ "O!" /* `value_types` */
+ ":user_map",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(
args, kwds, &_parser, &subset, &PySet_Type, &key_types, &PySet_Type, &val_types)) {
return NULL;
@@ -291,7 +299,12 @@ static PyObject *bpy_batch_remove(PyObject *UNUSED(self), PyObject *args, PyObje
PyObject *ret = NULL;
static const char *_keywords[] = {"ids", NULL};
- static _PyArg_Parser _parser = {"O:batch_remove", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "O" /* `ids` */
+ ":batch_remove",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args, kwds, &_parser, &ids)) {
return ret;
}
@@ -364,7 +377,15 @@ static PyObject *bpy_orphans_purge(PyObject *UNUSED(self), PyObject *args, PyObj
bool do_recursive_cleanup = false;
static const char *_keywords[] = {"do_local_ids", "do_linked_ids", "do_recursive", NULL};
- static _PyArg_Parser _parser = {"|O&O&O&:orphans_purge", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "|" /* Optional arguments. */
+ "O&" /* `do_local_ids` */
+ "O&" /* `do_linked_ids` */
+ "O&" /* `do_recursive` */
+ ":orphans_purge",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args,
kwds,
&_parser,
diff --git a/source/blender/python/intern/bpy_utils_units.c b/source/blender/python/intern/bpy_utils_units.c
index 6f080dcb178..3e0698caa50 100644
--- a/source/blender/python/intern/bpy_utils_units.c
+++ b/source/blender/python/intern/bpy_utils_units.c
@@ -169,7 +169,16 @@ static PyObject *bpyunits_to_value(PyObject *UNUSED(self), PyObject *args, PyObj
"str_ref_unit",
NULL,
};
- static _PyArg_Parser _parser = {"sss#|$z:to_value", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "s" /* `unit_system` */
+ "s" /* `unit_category` */
+ "s#" /* `str_input` */
+ "|$" /* Optional keyword only arguments. */
+ "z" /* `str_ref_unit` */
+ ":to_value",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(
args, kw, &_parser, &usys_str, &ucat_str, &inpt, &str_len, &uref)) {
return NULL;
@@ -246,7 +255,18 @@ static PyObject *bpyunits_to_string(PyObject *UNUSED(self), PyObject *args, PyOb
"compatible_unit",
NULL,
};
- static _PyArg_Parser _parser = {"ssd|$iO&O&:to_string", _keywords, 0};
+ static _PyArg_Parser _parser = {
+ "s" /* `unit_system` */
+ "s" /* `unit_category` */
+ "d" /* `value` */
+ "|$" /* Optional keyword only arguments. */
+ "i" /* `precision` */
+ "O&" /* `split_unit` */
+ "O&" /* `compatible_unit` */
+ ":to_string",
+ _keywords,
+ 0,
+ };
if (!_PyArg_ParseTupleAndKeywordsFast(args,
kw,
&_parser,