diff --git a/projectfiles_vc9/blender/makesrna/RNA_makesrna.vcproj b/projectfiles_vc9/blender/makesrna/RNA_makesrna.vcproj
index 8a576c2da6d..52f47918580 100644
--- a/projectfiles_vc9/blender/makesrna/RNA_makesrna.vcproj
+++ b/projectfiles_vc9/blender/makesrna/RNA_makesrna.vcproj
@@ -636,6 +636,10 @@
RelativePath="..\..\..\source\blender\makesrna\intern\rna_ipo.c"
>
+
+
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c
index 81ef806b648..c98b88da1c2 100644
--- a/source/blender/editors/interface/view2d.c
+++ b/source/blender/editors/interface/view2d.c
@@ -42,8 +42,6 @@
#include "BIF_gl.h"
#include "BIF_glutil.h"
-#include "ED_screen.h"
-
#include "UI_resources.h"
#include "UI_view2d.h"
@@ -365,7 +363,17 @@ void UI_view2d_view_orthospecial(const bContext *C, View2D *v2d, short xaxis)
/* Restore view matrices after drawing */
void UI_view2d_view_restore(const bContext *C)
{
- ED_region_pixelspace(C, C->region);
+ ARegion *region= C->region;
+ int winx, winy;
+
+ /* calculate extents of region */
+ winx= region->winrct.xmax - region->winrct.xmin;
+ winy= region->winrct.ymax - region->winrct.ymin;
+
+ /* set default region matrix - pixel offsets (0.375) for 1:1 correspondance are not applied,
+ * as they were causing some unwanted offsets when drawing
+ */
+ wmOrtho2(C->window, 0, winx, 0, winy);
}
/* *********************************************************************** */
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index dc9b8b251bc..cd3c32edf50 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -72,6 +72,8 @@ extern StructRNA RNA_Ipo;
extern StructRNA RNA_IpoCurve;
extern StructRNA RNA_IpoDriver;
extern StructRNA RNA_JoystickSensor;
+extern StructRNA RNA_Key;
+extern StructRNA RNA_KeyBlock;
extern StructRNA RNA_KeyboardSensor;
extern StructRNA RNA_Lamp;
extern StructRNA RNA_Lattice;
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index b5c0c7644f8..20993c3ee52 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -902,6 +902,7 @@ RNAProcessItem PROCESS_ITEMS[]= {
{"rna_group.c", RNA_def_group},
{"rna_image.c", RNA_def_image},
{"rna_ipo.c", RNA_def_ipo},
+ {"rna_key.c", RNA_def_key},
{"rna_lamp.c", RNA_def_lamp},
{"rna_lattice.c", RNA_def_lattice},
{"rna_main.c", RNA_def_main},
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index 695188b7983..57622200ee6 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -64,6 +64,7 @@ static StructRNA *rna_ID_refine(PointerRNA *ptr)
case ID_GR: return &RNA_Group;
case ID_IM: return &RNA_Image;
case ID_IP: return &RNA_Ipo;
+ case ID_KE: return &RNA_Key;
case ID_LA: return &RNA_Lamp;
case ID_LI: return &RNA_Library;
case ID_LT: return &RNA_Lattice;
diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h
index 9bb6eb24056..ecab1f99cf1 100644
--- a/source/blender/makesrna/intern/rna_internal.h
+++ b/source/blender/makesrna/intern/rna_internal.h
@@ -105,6 +105,7 @@ void RNA_def_gameproperty(struct BlenderRNA *brna);
void RNA_def_group(struct BlenderRNA *brna);
void RNA_def_image(struct BlenderRNA *brna);
void RNA_def_ipo(struct BlenderRNA *brna);
+void RNA_def_key(struct BlenderRNA *brna);
void RNA_def_lamp(struct BlenderRNA *brna);
void RNA_def_lattice(struct BlenderRNA *brna);
void RNA_def_main(struct BlenderRNA *brna);
diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c
new file mode 100644
index 00000000000..27d471a61e7
--- /dev/null
+++ b/source/blender/makesrna/intern/rna_key.c
@@ -0,0 +1,135 @@
+/**
+ * $Id$
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Contributor(s): Blender Foundation (2008).
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include
+
+#include "RNA_define.h"
+#include "RNA_types.h"
+
+#include "rna_internal.h"
+
+#include "DNA_key_types.h"
+
+#ifdef RNA_RUNTIME
+#else
+
+void RNA_def_keyblock(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ static EnumPropertyItem prop_keyblock_type_items[] = {
+ {KEY_LINEAR, "KEY_LINEAR", "Linear", ""},
+ {KEY_CARDINAL, "KEY_CARDINAL", "Cardinal", ""},
+ {KEY_BSPLINE, "KEY_BSPLINE", "BSpline", ""},
+ {0, NULL, NULL, NULL}};
+
+ srna= RNA_def_struct(brna, "KeyBlock", NULL, "KeyBlock");
+
+ prop= RNA_def_property(srna, "current_pos", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "pos");
+ RNA_def_property_ui_text(prop, "CurrentPosition", "Current Position.");
+
+ prop= RNA_def_property(srna, "current_val", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "curval");
+ RNA_def_property_ui_text(prop, "CurrentValue", "Current Value.");
+
+ prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "type", 0);
+ RNA_def_property_enum_items(prop, prop_keyblock_type_items);
+ RNA_def_property_ui_text(prop, "Type", "");
+
+ prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "name");
+ RNA_def_property_ui_text(prop, "Name", "Current Shape Key name.");
+ RNA_def_property_string_maxlength(prop, 32);
+
+ prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "vgroup");
+ RNA_def_property_ui_text(prop, "Vertex Group", "");
+ RNA_def_property_string_maxlength(prop, 32);
+
+ /* XXX couldn't quite figure this one out: shape key number, channel code? */
+ prop= RNA_def_property(srna, "channel", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "adrcode");
+ RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
+ RNA_def_property_ui_text(prop, "Channel", "");
+
+ prop= RNA_def_property(srna, "relative", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "relative", 1);
+ RNA_def_property_ui_text(prop, "Relative", "Makes Shape Keys relative.");
+
+ prop= RNA_def_property(srna, "slidermin", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "slidermin");
+ RNA_def_property_ui_text(prop, "SliderMin", "Minimum for Slider.");
+
+ prop= RNA_def_property(srna, "slidermax", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "slidermax");
+ RNA_def_property_ui_text(prop, "SliderMax", "Maximum for Slider.");
+
+}
+
+void RNA_def_key(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ RNA_def_keyblock(brna);
+
+ srna= RNA_def_struct(brna, "Key", "ID", "Key");
+
+ prop= RNA_def_property(srna, "refkey", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "KeyBlock");
+ RNA_def_property_ui_text(prop, "Reference Key", "");
+
+ prop= RNA_def_property(srna, "keyblocks", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_collection_sdna(prop, NULL, "block", NULL);
+ RNA_def_property_struct_type(prop, "KeyBlock");
+ RNA_def_property_ui_text(prop, "KeyBlocks", "Key Blocks.");
+
+ prop= RNA_def_property(srna, "num_keyblocks", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "totkey");
+ RNA_def_property_ui_text(prop, "NumKeyBlocks", "Number of KeyBlocks.");
+
+ prop= RNA_def_property(srna, "ipo", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "Ipo");
+ RNA_def_property_ui_text(prop, "Ipo", "");
+
+ prop= RNA_def_property(srna, "from", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "ID");
+ RNA_def_property_ui_text(prop, "From", "");
+
+ prop= RNA_def_property(srna, "relative", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "type", 1);
+ RNA_def_property_ui_text(prop, "Relative", "");
+
+ prop= RNA_def_property(srna, "slurph", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "slurph");
+ RNA_def_property_ui_text(prop, "Slurph", "");
+
+
+}
+
+#endif
+
diff --git a/source/blender/makesrna/intern/rna_lattice.c b/source/blender/makesrna/intern/rna_lattice.c
index 89299e1c6ca..a7bc8d46128 100644
--- a/source/blender/makesrna/intern/rna_lattice.c
+++ b/source/blender/makesrna/intern/rna_lattice.c
@@ -81,6 +81,14 @@ void RNA_def_lattice(BlenderRNA *brna)
prop= RNA_def_property(srna, "outside", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LT_OUTSIDE);
RNA_def_property_ui_text(prop, "Outside", "Only draw, and take into account, the outer vertices.");
+
+ prop= RNA_def_property(srna, "ipo", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "Ipo");
+ RNA_def_property_ui_text(prop, "Ipo", "");
+
+ prop= RNA_def_property(srna, "key", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "Key");
+ RNA_def_property_ui_text(prop, "Key", "");
}
#endif