From 9fc6256c66708d0b368fb65203a89fd1c852b4a2 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 29 Mar 2011 05:49:34 +0000 Subject: add rna read-only width/height for screen areas. --- source/blender/makesrna/intern/rna_screen.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source/blender/makesrna/intern/rna_screen.c') diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c index d190277f9aa..d129fccc717 100644 --- a/source/blender/makesrna/intern/rna_screen.c +++ b/source/blender/makesrna/intern/rna_screen.c @@ -153,6 +153,16 @@ static void rna_def_area(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE); RNA_def_property_update(prop, 0, "rna_Area_type_update"); + prop= RNA_def_property(srna, "width", PROP_INT, PROP_UNSIGNED); + RNA_def_property_int_sdna(prop, NULL, "winx"); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); + RNA_def_property_ui_text(prop, "Width", "Area width"); + + prop= RNA_def_property(srna, "height", PROP_INT, PROP_UNSIGNED); + RNA_def_property_int_sdna(prop, NULL, "winy"); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); + RNA_def_property_ui_text(prop, "Height", "Area height"); + RNA_def_function(srna, "tag_redraw", "ED_area_tag_redraw"); func= RNA_def_function(srna, "header_text_set", "ED_area_headerprint"); -- cgit v1.2.3