[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55569] trunk/blender/source/blender/ python/intern/bpy_props.c: Fix to EnumProperty doc ( content of items tuples was rather fuzzy, ways how these "parameters" are interpreted are rather strange, current text should now reflect exactly code's behavior).

Bastien Montagne montagne29 at wanadoo.fr
Mon Mar 25 15:46:34 CET 2013


Revision: 55569
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55569
Author:   mont29
Date:     2013-03-25 14:46:34 +0000 (Mon, 25 Mar 2013)
Log Message:
-----------
Fix to EnumProperty doc (content of items tuples was rather fuzzy, ways how these "parameters" are interpreted are rather strange, current text should now reflect exactly code's behavior).

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

Modified: trunk/blender/source/blender/python/intern/bpy_props.c
===================================================================
--- trunk/blender/source/blender/python/intern/bpy_props.c	2013-03-25 11:35:42 UTC (rev 55568)
+++ trunk/blender/source/blender/python/intern/bpy_props.c	2013-03-25 14:46:34 UTC (rev 55569)
@@ -2527,13 +2527,16 @@
 "   :arg items: sequence of enum items formatted:\n"
 "      [(identifier, name, description, icon, number), ...] where the identifier is used\n"
 "      for python access and other values are used for the interface.\n"
+"      The three first elements of the tuples are mandatory.\n"
+"      The forth one is either the (unique!) number id of the item or, if followed by a fith element \n"
+"      (which must be the numid), an icon string identifier.\n"
 "      Note the item is optional.\n"
 "      For dynamic values a callback can be passed which returns a list in\n"
 "      the same format as the static list.\n"
 "      This function must take 2 arguments (self, context)\n"
 "      WARNING: Do not use generators here (they will work the first time, but will lead to empty values\n"
-"               in some unload/reload scenarii)!\n"
-"   :type items: sequence of string triples or a function\n"
+"      in some unload/reload scenarii)!\n"
+"   :type items: sequence of string tuples or a function\n"
 BPY_PROPDEF_UPDATE_DOC
 );
 static PyObject *BPy_EnumProperty(PyObject *self, PyObject *args, PyObject *kw)




More information about the Bf-blender-cvs mailing list