[Bf-blender-cvs] [ce5561b8153] blender-v3.0-release: Fix Py API: wrong doc about type of Collection property.

Bastien Montagne noreply at git.blender.org
Thu Nov 25 10:12:42 CET 2021


Commit: ce5561b815366f714e68bd81fc130afb79c267ef
Author: Bastien Montagne
Date:   Thu Nov 25 10:10:47 2021 +0100
Branches: blender-v3.0-release
https://developer.blender.org/rBce5561b815366f714e68bd81fc130afb79c267ef

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.

===================================================================

M	source/blender/python/intern/bpy_props.c

===================================================================

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)



More information about the Bf-blender-cvs mailing list