Revision: 46882
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46882
Author:   campbellbarton
Date:     2012-05-22 13:43:36 +0000 (Tue, 22 May 2012)
Log Message:
-----------
expose absolute shape keyblock interpolation in the ui

Modified Paths:
--------------
    trunk/blender/release/scripts/startup/bl_ui/properties_data_mesh.py
    trunk/blender/source/blender/makesrna/RNA_enum_types.h
    trunk/blender/source/blender/makesrna/intern/rna_key.c
    trunk/blender/source/blender/makesrna/intern/rna_lattice.c

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_data_mesh.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_data_mesh.py 
2012-05-22 13:20:01 UTC (rev 46881)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_data_mesh.py 
2012-05-22 13:43:36 UTC (rev 46882)
@@ -262,6 +262,7 @@
                     col.prop_search(kb, "relative_key", key, "key_blocks", 
text="")
 
             else:
+                layout.prop(kb, "interpolation")
                 row = layout.column()
                 row.active = enable_edit_value
                 row.prop(key, "eval_time")

Modified: trunk/blender/source/blender/makesrna/RNA_enum_types.h
===================================================================
--- trunk/blender/source/blender/makesrna/RNA_enum_types.h      2012-05-22 
13:20:01 UTC (rev 46881)
+++ trunk/blender/source/blender/makesrna/RNA_enum_types.h      2012-05-22 
13:43:36 UTC (rev 46882)
@@ -60,6 +60,8 @@
 extern EnumPropertyItem beztriple_interpolation_mode_items[];
 extern EnumPropertyItem keyframe_handle_type_items[];
 
+extern EnumPropertyItem keyblock_type_items[];
+
 extern EnumPropertyItem keyingset_path_grouping_items[];
 
 extern EnumPropertyItem keyframe_paste_offset_items[];

Modified: trunk/blender/source/blender/makesrna/intern/rna_key.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_key.c      2012-05-22 
13:20:01 UTC (rev 46881)
+++ trunk/blender/source/blender/makesrna/intern/rna_key.c      2012-05-22 
13:43:36 UTC (rev 46882)
@@ -445,6 +445,13 @@
 
 #else
 
+EnumPropertyItem keyblock_type_items[] = {
+       {KEY_LINEAR, "KEY_LINEAR", 0, "Linear", ""},
+       {KEY_CARDINAL, "KEY_CARDINAL", 0, "Cardinal", ""},
+       {KEY_BSPLINE, "KEY_BSPLINE", 0, "BSpline", ""},
+       {0, NULL, 0, NULL, NULL}
+};
+
 static void rna_def_keydata(BlenderRNA *brna)
 {
        StructRNA *srna;
@@ -515,13 +522,6 @@
        StructRNA *srna;
        PropertyRNA *prop;
 
-       static EnumPropertyItem prop_keyblock_type_items[] = {
-               {KEY_LINEAR, "KEY_LINEAR", 0, "Linear", ""},
-               {KEY_CARDINAL, "KEY_CARDINAL", 0, "Cardinal", ""},
-               {KEY_BSPLINE, "KEY_BSPLINE", 0, "BSpline", ""},
-               {0, NULL, 0, NULL, NULL}
-       };
-
        srna = RNA_def_struct(brna, "ShapeKey", NULL);
        RNA_def_struct_ui_text(srna, "Shape Key", "Shape key in a shape keys 
datablock");
        RNA_def_struct_sdna(srna, "KeyBlock");
@@ -551,8 +551,8 @@
 
        prop = RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
        RNA_def_property_enum_sdna(prop, NULL, "type");
-       RNA_def_property_enum_items(prop, prop_keyblock_type_items);
-       RNA_def_property_ui_text(prop, "Interpolation", "Interpolation type");
+       RNA_def_property_enum_items(prop, keyblock_type_items);
+       RNA_def_property_ui_text(prop, "Interpolation", "Interpolation type for 
absolute shape keys");
        RNA_def_property_update(prop, 0, "rna_Key_update_data");
 
        prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);

Modified: trunk/blender/source/blender/makesrna/intern/rna_lattice.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_lattice.c  2012-05-22 
13:20:01 UTC (rev 46881)
+++ trunk/blender/source/blender/makesrna/intern/rna_lattice.c  2012-05-22 
13:43:36 UTC (rev 46882)
@@ -28,6 +28,7 @@
 #include <stdlib.h>
 
 #include "RNA_define.h"
+#include "RNA_enum_types.h"
 
 #include "rna_internal.h"
 
@@ -248,13 +249,6 @@
        StructRNA *srna;
        PropertyRNA *prop;
 
-       static EnumPropertyItem prop_keyblock_type_items[] = {
-               {KEY_LINEAR, "KEY_LINEAR", 0, "Linear", ""},
-               {KEY_CARDINAL, "KEY_CARDINAL", 0, "Cardinal", ""},
-               {KEY_BSPLINE, "KEY_BSPLINE", 0, "BSpline", ""},
-               {0, NULL, 0, NULL, NULL}
-       };
-
        srna = RNA_def_struct(brna, "Lattice", "ID");
        RNA_def_struct_ui_text(srna, "Lattice", "Lattice datablock defining a 
grid for deforming other objects");
        RNA_def_struct_ui_icon(srna, ICON_LATTICE_DATA);
@@ -285,19 +279,19 @@
 
        prop = RNA_def_property(srna, "interpolation_type_u", PROP_ENUM, 
PROP_NONE);
        RNA_def_property_enum_sdna(prop, NULL, "typeu");
-       RNA_def_property_enum_items(prop, prop_keyblock_type_items);
+       RNA_def_property_enum_items(prop, keyblock_type_items);
        RNA_def_property_ui_text(prop, "Interpolation Type U", "");
        RNA_def_property_update(prop, 0, "rna_Lattice_update_data");
 
        prop = RNA_def_property(srna, "interpolation_type_v", PROP_ENUM, 
PROP_NONE);
        RNA_def_property_enum_sdna(prop, NULL, "typev");
-       RNA_def_property_enum_items(prop, prop_keyblock_type_items);
+       RNA_def_property_enum_items(prop, keyblock_type_items);
        RNA_def_property_ui_text(prop, "Interpolation Type V", "");
        RNA_def_property_update(prop, 0, "rna_Lattice_update_data");
 
        prop = RNA_def_property(srna, "interpolation_type_w", PROP_ENUM, 
PROP_NONE);
        RNA_def_property_enum_sdna(prop, NULL, "typew");
-       RNA_def_property_enum_items(prop, prop_keyblock_type_items);
+       RNA_def_property_enum_items(prop, keyblock_type_items);
        RNA_def_property_ui_text(prop, "Interpolation Type W", "");
        RNA_def_property_update(prop, 0, "rna_Lattice_update_data");
 

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to