Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-11-11 23:42:18 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-11-11 23:42:18 +0300
commit70a88611ffd049b0b2e557c06125f21a1cf39307 (patch)
treed6df8bc2c5263295d69a980e4462f9d2b203c050 /source/blender/makesrna/intern/rna_screen.c
parent53250f85dbecdc4cdd6eded772972b137f3f8c6c (diff)
region width and height readonly rna access (for UI scripts) - see context.region.width/height
Diffstat (limited to 'source/blender/makesrna/intern/rna_screen.c')
-rw-r--r--source/blender/makesrna/intern/rna_screen.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c
index 004c57eedfc..66231cef90b 100644
--- a/source/blender/makesrna/intern/rna_screen.c
+++ b/source/blender/makesrna/intern/rna_screen.c
@@ -148,6 +148,16 @@ static void rna_def_region(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "swinid");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Region ID", "Uniqute ID for this region.");
+
+ prop= RNA_def_property(srna, "width", PROP_INT, PROP_NONE);
+ 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_NONE);
+ 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.");
}
static void rna_def_screen(BlenderRNA *brna)