I've been trying to set up some custom enum flags. In my situation, there are two variables that I want to share the same enum type setup. So I would like the flags to be interchangeable between them. This is how I currently have it set up. For some reason, the controls do not show up when I draw them after moving the items into their own definition. They seemed to be fine when they defined their own items. Can anyone see where I'm doing this wrong? Or does a UI element just fail to draw when it uses "external" enum items?
def FBXG_Mode(self,context):
items=[ ('GA', "Asset", "Game Asset"),
('LP', "Low", "Low Poly"),
('HP', "High", "High Poly"),
]
return items
bpy.types.collection.FBXGSpawner : EnumProperty(
name="File Spawners",
options={'ENUM_FLAG'},
items=FBXG_Mode,
description="Info",
)
bpy.types.object.FBXGBlocker : EnumProperty(
name="Object Blockers",
options={'ENUM_FLAG'},
items=FBXG_Mode,
description="Info",
)
ENUM_FLAG
allows multi-select of enum items and requires the item number to be set. Is this what you want? to for example have ability to mark item as both low and high poly? (Probably not). Appears there is no need for the dynamic items method here either, could define the items listitems = [(a, b, c), ..]
then in defining propitems=items
$\endgroup$items = [(identifier, name, description, icon,
number), ...].
$\endgroup$