region width and height readonly rna access (for UI scripts) - see context.region...
authorCampbell Barton <ideasman42@gmail.com>
Wed, 11 Nov 2009 20:42:18 +0000 (20:42 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 11 Nov 2009 20:42:18 +0000 (20:42 +0000)
source/blender/makesrna/intern/rna_screen.c

index 004c57eedfc79f4b9c1e49c3910b7fc081be61ac..66231cef90b8ea60d25989b9f21c534f7f74e266 100644 (file)
@@ -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)