forked from bartvdbraak/blender
Fix [#34023] r54146 breaks name-display of default "UI_UL_list"
draw_item *is* optional (it then uses default C function), even though there is not much sense to register a class without it, except for our default UI_UL_list!
This commit is contained in:
parent
8042ecba96
commit
6fdaa9c99a
@ -138,7 +138,6 @@ def unregister():
|
||||
|
||||
# Define a default UIList, when a list does not need any custom drawing...
|
||||
class UI_UL_list(bpy.types.UIList):
|
||||
def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
|
||||
pass
|
||||
pass
|
||||
|
||||
bpy.utils.register_class(UI_UL_list)
|
||||
|
@ -863,7 +863,7 @@ static void rna_def_uilist(BlenderRNA *brna)
|
||||
func = RNA_def_function(srna, "draw_item", NULL);
|
||||
RNA_def_function_ui_description(func, "Draw an item in the list (NOTE: when you define your own draw_item "
|
||||
"function, you may want to check given 'item' is of the right type...)");
|
||||
RNA_def_function_flag(func, FUNC_REGISTER);
|
||||
RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL);
|
||||
parm = RNA_def_pointer(func, "context", "Context", "", "");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
parm = RNA_def_pointer(func, "layout", "UILayout", "", "Layout to draw the item");
|
||||
|
Loading…
Reference in New Issue
Block a user