Fix for errors caused by fixing RNA function register flags. Default UIList class now has a dummy draw_item callback. Panel draw_header is now optional (most panel classes don't define it).
This commit is contained in:
@@ -138,6 +138,7 @@ def unregister():
|
||||
|
||||
# Define a default UIList, when a list does not need any custom drawing...
|
||||
class UI_UL_list(bpy.types.UIList):
|
||||
pass
|
||||
def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
|
||||
pass
|
||||
|
||||
bpy.utils.register_class(UI_UL_list)
|
||||
|
||||
@@ -791,7 +791,7 @@ static void rna_def_panel(BlenderRNA *brna)
|
||||
|
||||
func = RNA_def_function(srna, "draw_header", NULL);
|
||||
RNA_def_function_ui_description(func, "Draw UI elements into the panel's header UI layout");
|
||||
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 | PROP_NEVER_NULL);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user