[Bf-blender-cvs] [310d85678ea] lanpr-under-gp: API Docs: Correct syntax for bpy.utils.register_class

Aaron Carlisle noreply at git.blender.org
Fri Oct 2 07:40:26 CEST 2020


Commit: 310d85678eada414c0ea306a6a330a92b5553b47
Author: Aaron Carlisle
Date:   Tue Sep 29 16:45:29 2020 -0400
Branches: lanpr-under-gp
https://developer.blender.org/rB310d85678eada414c0ea306a6a330a92b5553b47

API Docs: Correct syntax for bpy.utils.register_class

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

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

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

diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index e71adbfdf62..30174e9c605 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -8700,16 +8700,21 @@ void pyrna_free_types(void)
 PyDoc_STRVAR(pyrna_register_class_doc,
              ".. method:: register_class(cls)\n"
              "\n"
-             "   Register a subclass of a blender type in (:class:`bpy.types.Panel`,\n"
-             "   :class:`bpy.types.UIList`, :class:`bpy.types.Menu`, :class:`bpy.types.Header`,\n"
-             "   :class:`bpy.types.Operator`, :class:`bpy.types.KeyingSetInfo`,\n"
-             "   :class:`bpy.types.RenderEngine`).\n"
-             "\n"
-             "   If the class has a *register* class method it will be called\n"
-             "   before registration.\n"
+             "   Register a subclass of a Blender type class.\n"
              "\n"
+             "   :arg cls: Blender type class in:\n"
+             "      :class:`bpy.types.Panel`, :class:`bpy.types.UIList`,\n"
+             "      :class:`bpy.types.Menu`, :class:`bpy.types.Header`,\n"
+             "      :class:`bpy.types.Operator`, :class:`bpy.types.KeyingSetInfo`,\n"
+             "      :class:`bpy.types.RenderEngine`\n"
+             "   :type cls: class\n"
              "   :raises ValueError:\n"
-             "      if the class is not a subclass of a registerable blender class.\n");
+             "      if the class is not a subclass of a registerable blender class.\n"
+             "\n"
+             "   .. note::\n"
+             "\n"
+             "      If the class has a *register* class method it will be called\n"
+             "      before registration.\n");
 PyMethodDef meth_bpy_register_class = {
     "register_class", pyrna_register_class, METH_O, pyrna_register_class_doc};
 static PyObject *pyrna_register_class(PyObject *UNUSED(self), PyObject *py_class)



More information about the Bf-blender-cvs mailing list