[Bf-blender-cvs] [ab4c921] master: Clarified warning in EnumProperty

Sybren A. Stüvel noreply at git.blender.org
Tue Oct 18 11:24:37 CEST 2016


Commit: ab4c921e82a37d1a34879b0db7fd125749691272
Author: Sybren A. Stüvel
Date:   Tue Oct 18 11:24:33 2016 +0200
Branches: master
https://developer.blender.org/rBab4c921e82a37d1a34879b0db7fd125749691272

Clarified warning in EnumProperty

Blender doesn't necessarily crash when Python doesn't keep references to
the returned strings. As a result, someone that implements this incorrectly
could be lulled into a false sense of correctness by Blender not crashing.

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

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

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

diff --git a/source/blender/python/intern/bpy_props.c b/source/blender/python/intern/bpy_props.c
index 3baeae0..e610188 100644
--- a/source/blender/python/intern/bpy_props.c
+++ b/source/blender/python/intern/bpy_props.c
@@ -2648,7 +2648,8 @@ PyDoc_STRVAR(BPy_EnumProperty_doc,
 "      .. warning::\n"
 "\n"
 "         There is a known bug with using a callback,\n"
-"         Python must keep a reference to the strings returned or Blender will crash.\n"
+"         Python must keep a reference to the strings returned or Blender will misbehave\n"
+"         or even crash."
 "\n"
 "   :type items: sequence of string tuples or a function\n"
 BPY_PROPDEF_NAME_DOC




More information about the Bf-blender-cvs mailing list