[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [40869] trunk/blender/source/blender/ python/intern: correction to RNA class api references (only used for docs)

Campbell Barton ideasman42 at gmail.com
Sun Oct 9 04:24:52 CEST 2011


Revision: 40869
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40869
Author:   campbellbarton
Date:     2011-10-09 02:24:51 +0000 (Sun, 09 Oct 2011)
Log Message:
-----------
correction to RNA class api references (only used for docs)

Modified Paths:
--------------
    trunk/blender/source/blender/python/intern/bpy_rna.c
    trunk/blender/source/blender/python/intern/bpy_rna_anim.c

Modified: trunk/blender/source/blender/python/intern/bpy_rna.c
===================================================================
--- trunk/blender/source/blender/python/intern/bpy_rna.c	2011-10-09 02:11:43 UTC (rev 40868)
+++ trunk/blender/source/blender/python/intern/bpy_rna.c	2011-10-09 02:24:51 UTC (rev 40869)
@@ -84,6 +84,11 @@
 static PyObject* pyrna_struct_Subtype(PointerRNA *ptr);
 static PyObject *pyrna_prop_collection_values(BPy_PropertyRNA *self);
 
+#define BPY_DOC_ID_PROP_TYPE_NOTE \
+"   .. note:: Only :class:`bpy.types.ID`, :class:`bpy.types.Bone` and \n" \
+"      :class:`bpy.types.PoseBone` classes support custom properties.\n"
+
+
 int pyrna_struct_validity_check(BPy_StructRNA *pysrna)
 {
 	if(pysrna->ptr.type)
@@ -2746,8 +2751,7 @@
 "   :return: custom property keys.\n"
 "   :rtype: list of strings\n"
 "\n"
-"   .. note:: Only :class:`ID`, :class:`Bone` and :class:`PoseBone` classes\n"
-"      support custom properties.\n"
+BPY_DOC_ID_PROP_TYPE_NOTE
 );
 static PyObject *pyrna_struct_keys(BPy_PropertyRNA *self)
 {
@@ -2775,8 +2779,7 @@
 "   :return: custom property key, value pairs.\n"
 "   :rtype: list of key, value tuples\n"
 "\n"
-"   .. note:: Only :class:`ID`, :class:`Bone` and :class:`PoseBone`\n"
-"      classes support custom properties.\n"
+BPY_DOC_ID_PROP_TYPE_NOTE
 );
 static PyObject *pyrna_struct_items(BPy_PropertyRNA *self)
 {
@@ -2804,8 +2807,7 @@
 "   :return: custom property values.\n"
 "   :rtype: list\n"
 "\n"
-"   .. note:: Only :class:`ID`, :class:`Bone` and :class:`PoseBone`\n"
-"      classes support custom properties.\n"
+BPY_DOC_ID_PROP_TYPE_NOTE
 );
 static PyObject *pyrna_struct_values(BPy_PropertyRNA *self)
 {
@@ -3669,14 +3671,14 @@
 /*****************************************************************************/
 
 static PyGetSetDef pyrna_prop_getseters[]= {
-	{(char *)"id_data", (getter)pyrna_struct_get_id_data, (setter)NULL, (char *)"The :class:`ID` object this datablock is from or None, (not available for all data types)", NULL},
+	{(char *)"id_data", (getter)pyrna_struct_get_id_data, (setter)NULL, (char *)"The :class:`bpy.types.ID` object this datablock is from or None, (not available for all data types)", NULL},
 	{(char *)"rna_type", (getter)pyrna_struct_get_rna_type, (setter)NULL, (char *)"The property type for introspection", NULL},
 	{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
 };
 
 
 static PyGetSetDef pyrna_struct_getseters[]= {
-	{(char *)"id_data", (getter)pyrna_struct_get_id_data, (setter)NULL, (char *)"The :class:`ID` object this datablock is from or None, (not available for all data types)", NULL},
+	{(char *)"id_data", (getter)pyrna_struct_get_id_data, (setter)NULL, (char *)"The :class:`bpy.types.ID` object this datablock is from or None, (not available for all data types)", NULL},
 	{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
 };
 
@@ -3783,8 +3785,7 @@
 "      *key* is not found.\n"
 "   :type default: Undefined\n"
 "\n"
-"   .. note:: Only :class:`ID`, :class:`Bone` and :class:`PoseBone`\n"
-"      classes support custom properties.\n"
+BPY_DOC_ID_PROP_TYPE_NOTE
 );
 static PyObject *pyrna_struct_get(BPy_StructRNA *self, PyObject *args)
 {

Modified: trunk/blender/source/blender/python/intern/bpy_rna_anim.c
===================================================================
--- trunk/blender/source/blender/python/intern/bpy_rna_anim.c	2011-10-09 02:11:43 UTC (rev 40868)
+++ trunk/blender/source/blender/python/intern/bpy_rna_anim.c	2011-10-09 02:24:51 UTC (rev 40869)
@@ -273,7 +273,7 @@
 "   :arg index: array index of the property drive. Defaults to -1 for all indices or a single channel if the property is not an array.\n"
 "   :type index: int\n"
 "   :return: The driver(s) added.\n"
-"   :rtype: :class:`FCurve` or list if index is -1 with an array property.\n"
+"   :rtype: :class:`bpy.types.FCurve` or list if index is -1 with an array property.\n"
 ;
 PyObject *pyrna_struct_driver_add(BPy_StructRNA *self, PyObject *args)
 {




More information about the Bf-blender-cvs mailing list