diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2013-01-01 19:55:21 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2013-01-01 19:55:21 +0400 |
commit | b88836a45ba03d97c23bda95ca4ead6b5f8f2637 (patch) | |
tree | b527c4390010b96a6ee97d394fca2bd6c6e1909a /source/blender/python/intern/bpy_props.c | |
parent | 16afa704cccd5822f1d03f826ec45c7da9612b1b (diff) |
Add a warning to enum props' items parameter, to *never* use a generator as value for this param! It works in most cases, but in some it leads to an empty set of values for the enum (see [#33716]), and it's not an easy bug to track down!
Diffstat (limited to 'source/blender/python/intern/bpy_props.c')
-rw-r--r-- | source/blender/python/intern/bpy_props.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/python/intern/bpy_props.c b/source/blender/python/intern/bpy_props.c index bd033736865..57ddee0c8c0 100644 --- a/source/blender/python/intern/bpy_props.c +++ b/source/blender/python/intern/bpy_props.c @@ -1233,6 +1233,8 @@ BPY_PROPDEF_DESC_DOC " 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 triplets or a function\n" BPY_PROPDEF_UPDATE_DOC ); |