[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [48032] trunk/blender/source/blender/ makesrna/intern/rna_screen.c: RNA: add Area and Region window xy coordinates access.

Brecht Van Lommel brechtvanlommel at pandora.be
Mon Jun 18 14:48:58 CEST 2012


Revision: 48032
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48032
Author:   blendix
Date:     2012-06-18 12:48:51 +0000 (Mon, 18 Jun 2012)
Log Message:
-----------
RNA: add Area and Region window xy coordinates access.

Modified Paths:
--------------
    trunk/blender/source/blender/makesrna/intern/rna_screen.c

Modified: trunk/blender/source/blender/makesrna/intern/rna_screen.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_screen.c	2012-06-18 12:39:19 UTC (rev 48031)
+++ trunk/blender/source/blender/makesrna/intern/rna_screen.c	2012-06-18 12:48:51 UTC (rev 48032)
@@ -193,6 +193,16 @@
 	RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
 	RNA_def_property_update(prop, 0, "rna_Area_type_update");
 
+	prop = RNA_def_property(srna, "x", PROP_INT, PROP_NONE);
+	RNA_def_property_int_sdna(prop, NULL, "totrct.xmin");
+	RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+	RNA_def_property_ui_text(prop, "X Position", "The window relative vertical location of the area");
+
+	prop = RNA_def_property(srna, "y", PROP_INT, PROP_NONE);
+	RNA_def_property_int_sdna(prop, NULL, "totrct.ymin");
+	RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+	RNA_def_property_ui_text(prop, "Y Position", "The window relative horizontal location of the area");
+
 	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);
@@ -230,6 +240,16 @@
 	RNA_def_property_clear_flag(prop, PROP_EDITABLE);
 	RNA_def_property_ui_text(prop, "Region Type", "Type of this region");
 
+	prop = RNA_def_property(srna, "x", PROP_INT, PROP_NONE);
+	RNA_def_property_int_sdna(prop, NULL, "winrct.xmin");
+	RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+	RNA_def_property_ui_text(prop, "X Position", "The window relative vertical location of the region");
+
+	prop = RNA_def_property(srna, "y", PROP_INT, PROP_NONE);
+	RNA_def_property_int_sdna(prop, NULL, "winrct.ymin");
+	RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+	RNA_def_property_ui_text(prop, "Y Position", "The window relative horizontal location of the region");
+
 	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);




More information about the Bf-blender-cvs mailing list