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 | |
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')
-rw-r--r-- | source/blender/editors/include/ED_screen.h | 2 | ||||
-rw-r--r-- | source/blender/editors/screen/area.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_internal.h | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_screen.c | 6 |
4 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h index d95011c5961..7059e607218 100644 --- a/source/blender/editors/include/ED_screen.h +++ b/source/blender/editors/include/ED_screen.h @@ -80,7 +80,7 @@ void ED_area_do_listen(ScrArea *sa, struct wmNotifier *note); void ED_area_tag_redraw(ScrArea *sa); void ED_area_tag_refresh(ScrArea *sa); void ED_area_do_refresh(struct bContext *C, ScrArea *sa); -void ED_area_headerprint(ScrArea *sa, const char *str); +void ED_area_headerprint(ScrArea *sa, char *str); void ED_area_newspace(struct bContext *C, ScrArea *sa, int type); void ED_area_prevspace(struct bContext *C, ScrArea *sa); void ED_area_swapspace(struct bContext *C, ScrArea *sa1, ScrArea *sa2); diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index d0361c5fa01..7f5485ae8b6 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -414,7 +414,7 @@ void ED_area_tag_refresh(ScrArea *sa) /* *************************************************************** */ /* use NULL to disable it */ -void ED_area_headerprint(ScrArea *sa, const char *str) +void ED_area_headerprint(ScrArea *sa, char *str) { ARegion *ar; 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) |