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!

This commit is contained in:
2013-01-01 15:55:21 +00:00
parent 16afa704cc
commit b88836a45b

View File

@@ -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
);