diff options
author | Bastien Montagne <bastien@blender.org> | 2021-11-25 12:10:47 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2021-11-25 12:12:35 +0300 |
commit | ce5561b815366f714e68bd81fc130afb79c267ef (patch) | |
tree | 00988a43c7c13c3962d96feab83ffd5bac96dbcd /source/blender/python/intern/bpy_props.c | |
parent | 40d28b40dfd0b0093263947f66fc1760abd55ad6 (diff) |
Fix Py API: wrong doc about type of Collection property.
Collection property only accepts PropertyGroup type, not ID ones.
Reported on IRC by @frameshift, thanks.
Diffstat (limited to 'source/blender/python/intern/bpy_props.c')
-rw-r--r-- | source/blender/python/intern/bpy_props.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/python/intern/bpy_props.c b/source/blender/python/intern/bpy_props.c index 6d384ed9358..77c2d46eda4 100644 --- a/source/blender/python/intern/bpy_props.c +++ b/source/blender/python/intern/bpy_props.c @@ -2630,10 +2630,14 @@ static int bpy_prop_arg_parse_tag_defines(PyObject *o, void *p) " This function must take 2 values (self, value) and return None.\n" \ " :type set: function\n" -#define BPY_PROPDEF_TYPE_DOC \ +#define BPY_PROPDEF_POINTER_TYPE_DOC \ " :arg type: A subclass of :class:`bpy.types.PropertyGroup` or :class:`bpy.types.ID`.\n" \ " :type type: class\n" +#define BPY_PROPDEF_COLLECTION_TYPE_DOC \ + " :arg type: A subclass of :class:`bpy.types.PropertyGroup`.\n" \ + " :type type: class\n" + #define BPY_PROPDEF_TAGS_DOC \ " :arg tags: Enumerator of tags that are defined by parent class.\n" \ " :type tags: set\n" @@ -3981,7 +3985,7 @@ PyDoc_STRVAR(BPy_PointerProperty_doc, "update=None)\n" "\n" " Returns a new pointer property definition.\n" - "\n" BPY_PROPDEF_TYPE_DOC BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC + "\n" BPY_PROPDEF_POINTER_TYPE_DOC BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC BPY_PROPDEF_OPTIONS_DOC BPY_PROPDEF_OPTIONS_OVERRIDE_DOC BPY_PROPDEF_TAGS_DOC BPY_PROPDEF_POLL_DOC BPY_PROPDEF_UPDATE_DOC); PyObject *BPy_PointerProperty(PyObject *self, PyObject *args, PyObject *kw) @@ -4104,7 +4108,7 @@ PyDoc_STRVAR(BPy_CollectionProperty_doc, "tags=set())\n" "\n" " Returns a new collection property definition.\n" - "\n" BPY_PROPDEF_TYPE_DOC BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC + "\n" BPY_PROPDEF_COLLECTION_TYPE_DOC BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC BPY_PROPDEF_OPTIONS_DOC BPY_PROPDEF_OPTIONS_OVERRIDE_COLLECTION_DOC BPY_PROPDEF_TAGS_DOC); PyObject *BPy_CollectionProperty(PyObject *self, PyObject *args, PyObject *kw) |