diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-12-11 18:39:30 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-12-11 18:39:30 +0400 |
commit | 1e5cc7c51b3c7d3c2f99fc748d3978a90d2133d3 (patch) | |
tree | e811e686428ef5dc5401fb039c26a192a466ed02 | |
parent | 68efcca5ea0db71856dbad2cff21b64ab51f3fd7 (diff) |
RNA: add Window x/y position and size access.
-rw-r--r-- | source/blender/makesrna/intern/rna_wm.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index f83410e7cc1..f3e28f1d7a3 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -1617,6 +1617,26 @@ static void rna_def_window(BlenderRNA *brna) RNA_def_property_pointer_funcs(prop, NULL, "rna_Window_screen_set", NULL, NULL); RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE); RNA_def_property_update(prop, 0, "rna_Window_screen_update"); + + prop = RNA_def_property(srna, "x", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "posx"); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); + RNA_def_property_ui_text(prop, "X Position", "Vertical location of the window"); + + prop = RNA_def_property(srna, "y", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "posy"); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); + RNA_def_property_ui_text(prop, "Y Position", "Horizontal location of the window"); + + prop = RNA_def_property(srna, "width", PROP_INT, PROP_UNSIGNED); + RNA_def_property_int_sdna(prop, NULL, "sizex"); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); + RNA_def_property_ui_text(prop, "Width", "Window width"); + + prop = RNA_def_property(srna, "height", PROP_INT, PROP_UNSIGNED); + RNA_def_property_int_sdna(prop, NULL, "sizey"); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); + RNA_def_property_ui_text(prop, "Height", "Window height"); } /* curve.splines */ |