I’m setting an EnumProperty’s items argument via a callback to a function. In the api docs (http://www.blender.org/api/blender_python_api_2_75_3/bpy.props.html?highlight=enumproperty#bpy.props.EnumProperty) it says:
- items (sequence of string tuples or a function) – sequence of enum items formatted: [(identifier, name, description, icon, number), …] where the identifier is used for python access and other values are used for the interface. The three first elements of the tuples are mandatory. The forth one is either the (unique!) number id of the item or, if followed by a fith element (which must be the numid), an icon string identifier or integer icon value (e.g. returned by icon()…). Note the item is optional. For dynamic values a callback can be passed which returns a list in the same format as the static list. This function must take 2 arguments (self, context), context may be None. WARNING: There is a known bug with using a callback, Python must keep a reference to the strings returned or Blender will crash.
To use an icon I need to set an unique number id as well, for what can I use this number id? Why can’t I use an icon without also using an id? Is this id simply for blenders internal use or what?