Revision: 31275
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31275
Author:   campbellbarton
Date:     2010-08-12 08:28:46 +0200 (Thu, 12 Aug 2010)

Log Message:
-----------
fix for the rna curve interpolation enum, 'ease' was using the same value as 
Bezier.

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/curve.c
    trunk/blender/source/blender/makesdna/DNA_curve_types.h
    trunk/blender/source/blender/makesrna/intern/rna_curve.c

Modified: trunk/blender/source/blender/blenkernel/intern/curve.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/curve.c      2010-08-12 
04:03:40 UTC (rev 31274)
+++ trunk/blender/source/blender/blenkernel/intern/curve.c      2010-08-12 
06:28:46 UTC (rev 31275)
@@ -1573,7 +1573,7 @@
        
        for(a=0; a<resolu; a++, fac+= dfac) {
                if (tilt_array) {
-                       if (nu->tilt_interp==3) { /* May as well support for 
tilt also 2.47 ease interp */
+                       if (nu->tilt_interp==KEY_CU_EASE) { /* May as well 
support for tilt also 2.47 ease interp */
                                *tilt_array = prevbezt->alfa + (bezt->alfa - 
prevbezt->alfa)*(3.0f*fac*fac - 2.0f*fac*fac*fac);
                        } else {
                                key_curve_position_weights(fac, t, 
nu->tilt_interp);
@@ -1584,7 +1584,7 @@
                }
                
                if (radius_array) {
-                       if (nu->radius_interp==3) {
+                       if (nu->radius_interp==KEY_CU_EASE) {
                                /* Support 2.47 ease interp
                                 * Note! - this only takes the 2 points into 
account,
                                 * giving much more localized results to 
changes in radius, sometimes you want that */

Modified: trunk/blender/source/blender/makesdna/DNA_curve_types.h
===================================================================
--- trunk/blender/source/blender/makesdna/DNA_curve_types.h     2010-08-12 
04:03:40 UTC (rev 31274)
+++ trunk/blender/source/blender/makesdna/DNA_curve_types.h     2010-08-12 
06:28:46 UTC (rev 31275)
@@ -346,5 +346,9 @@
 #define CU_CHINFO_SMALLCAPS    (1<<4)
 #define CU_CHINFO_SMALLCAPS_CHECK (1<<5) /* set at runtime, checks if case 
switching is needed */
 
+/* mixed with KEY_LINEAR but define here since only curve supports */
+#define KEY_CU_EASE                    3
+
+
 #endif
 

Modified: trunk/blender/source/blender/makesrna/intern/rna_curve.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_curve.c    2010-08-12 
04:03:40 UTC (rev 31274)
+++ trunk/blender/source/blender/makesrna/intern/rna_curve.c    2010-08-12 
06:28:46 UTC (rev 31275)
@@ -29,6 +29,7 @@
 #include "rna_internal.h"
 
 #include "DNA_curve_types.h"
+#include "DNA_key_types.h"
 #include "DNA_material_types.h"
 #include "DNA_scene_types.h"
 
@@ -1252,10 +1253,10 @@
 static void rna_def_curve_nurb(BlenderRNA *brna)
 {
        static EnumPropertyItem spline_interpolation_items[] = {
-               {BEZT_IPO_CONST, "LINEAR", 0, "Linear", ""},
-               {BEZT_IPO_LIN, "CARDINAL", 0, "Cardinal", ""},
-               {BEZT_IPO_BEZ, "BSPLINE", 0, "BSpline", ""},
-               {BEZT_IPO_BEZ, "EASE", 0, "Ease", ""},
+               {KEY_LINEAR, "LINEAR", 0, "Linear", ""},
+               {KEY_CARDINAL, "CARDINAL", 0, "Cardinal", ""},
+               {KEY_BSPLINE, "BSPLINE", 0, "BSpline", ""},
+               {KEY_CU_EASE, "EASE", 0, "Ease", ""}, /* todo, define 
somewhere, not one of BEZT_IPO_* */
                {0, NULL, 0, NULL, NULL}};
 
        StructRNA *srna;


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

Reply via email to