diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-10-03 01:02:40 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-10-03 01:02:40 +0400 |
commit | 491aebbf671d14f760da6ca87b8594420c932009 (patch) | |
tree | 775930005a27322be821c675d398d9c3ec028652 /source/blender/makesrna | |
parent | 3f768cb47228d0b9853f02839ef18d9f5f6d15ee (diff) |
py/rna access to setting the header text - can be used in modal operators.
eg: context.area.header_text_set("Some Text")
included example in the view3d modal operator template.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_internal.h | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_screen.c | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h index 2bfe86a15ee..cae9e5bb974 100644 --- a/source/blender/makesrna/intern/rna_internal.h +++ b/source/blender/makesrna/intern/rna_internal.h @@ -233,6 +233,7 @@ void RNA_api_keyconfig(struct StructRNA *srna); void RNA_api_keyingset(struct StructRNA *srna); void RNA_api_keymap(struct StructRNA *srna); void RNA_api_keymapitem(struct StructRNA *srna); +void RNA_api_area(struct StructRNA *srna); void RNA_api_main(struct StructRNA *srna); void RNA_api_material(StructRNA *srna); void RNA_api_mesh(struct StructRNA *srna); diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c index da8aab32f31..93b38499673 100644 --- a/source/blender/makesrna/intern/rna_screen.c +++ b/source/blender/makesrna/intern/rna_screen.c @@ -106,6 +106,8 @@ static void rna_def_area(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; + FunctionRNA *func; + PropertyRNA *parm; srna= RNA_def_struct(brna, "Area", NULL); RNA_def_struct_ui_text(srna, "Area", "Area in a subdivided screen, containing an editor"); @@ -139,6 +141,10 @@ static void rna_def_area(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_Area_type_update"); RNA_def_function(srna, "tag_redraw", "ED_area_tag_redraw"); + + func= RNA_def_function(srna, "header_text_set", "ED_area_headerprint"); + RNA_def_function_ui_description(func, "Set the header text"); + parm= RNA_def_string(func, "text", NULL, 0, "Text", "New string for the header, no argument clears the text."); } static void rna_def_region(BlenderRNA *brna) |