From bef30b270b3113fc31cb6c9bcea7d463c7bcebb5 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 21 Oct 2010 11:20:44 +0000 Subject: bugfix [#24342] Wrong Bubble description when creation add-on without python comment on class --- source/blender/makesrna/intern/rna_wm.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source') diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index 7e54a3b14fa..1bc22b7af25 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -829,6 +829,9 @@ static StructRNA *rna_Operator_register(const bContext *C, ReportList *reports, dummyot.description= _operator_descr; /* only assigne the pointer, string is NULL'd */ RNA_pointer_create(NULL, &RNA_Operator, &dummyop, &dummyotr); + /* clear incase they are left unset */ + _operator_idname[0]= _operator_name[0]= _operator_descr[0]= '\0'; + /* validate the python class */ if(validate(&dummyotr, data, have_function) != 0) return NULL; @@ -1096,7 +1099,7 @@ static void rna_def_operator(BlenderRNA *brna) prop= RNA_def_property(srna, "bl_description", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "type->description"); RNA_def_property_string_maxlength(prop, 1024); /* else it uses the pointer size! */ - RNA_def_property_flag(prop, PROP_REGISTER); + RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); prop= RNA_def_property(srna, "bl_options", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "type->flag"); @@ -1151,7 +1154,7 @@ static void rna_def_macro_operator(BlenderRNA *brna) prop= RNA_def_property(srna, "bl_description", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "type->description"); RNA_def_property_string_maxlength(prop, 1024); /* else it uses the pointer size! */ - RNA_def_property_flag(prop, PROP_REGISTER); + RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); prop= RNA_def_property(srna, "bl_options", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "type->flag"); -- cgit v1.2.3