diff options
-rw-r--r-- | source/blender/blenkernel/intern/ipo.c | 4 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_ipo_types.h | 4 | ||||
-rw-r--r-- | source/blender/src/editipo_mods.c | 6 |
3 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c index 311ffb28019..8f3bb46a5e3 100644 --- a/source/blender/blenkernel/intern/ipo.c +++ b/source/blender/blenkernel/intern/ipo.c @@ -453,7 +453,9 @@ void calchandles_ipocurve(IpoCurve *icu) int a; a= icu->totvert; - if(a<2) return; + + /* IPO_CONST or IPO_LIN, dont have handels */ + if(a<2 || icu->ipo==IPO_LIN || icu->ipo==IPO_CONST) return; bezt= icu->bezt; prev= 0; diff --git a/source/blender/makesdna/DNA_ipo_types.h b/source/blender/makesdna/DNA_ipo_types.h index fc30c1ec5e6..0bea05bb634 100644 --- a/source/blender/makesdna/DNA_ipo_types.h +++ b/source/blender/makesdna/DNA_ipo_types.h @@ -367,11 +367,11 @@ typedef short IPO_Channel; #define IPO_SHORT_BIT 17 #define IPO_INT_BIT 18 -/* icu->ipo */ +/* icu->ipo: the type of curve */ #define IPO_CONST 0 #define IPO_LIN 1 #define IPO_BEZ 2 -#define IPO_MIXED 3 +#define IPO_MIXED 3 /* not used yet */ /* icu->extrap */ #define IPO_HORIZ 0 diff --git a/source/blender/src/editipo_mods.c b/source/blender/src/editipo_mods.c index 22bd0d55303..39a05573145 100644 --- a/source/blender/src/editipo_mods.c +++ b/source/blender/src/editipo_mods.c @@ -651,7 +651,13 @@ static void set_ipocurve_linear(struct IpoCurve *icu) { static void set_ipocurve_bezier(struct IpoCurve *icu) { /* Sets the type of the IPO curve to bezier */ + + /* dont regenerate hendels for bezier ipo curves */ + if (icu->ipo==IPO_BEZ) return; + + /* curve handels aren't generated for non bezier curve types */ icu->ipo= IPO_BEZ; + calchandles_ipocurve(icu); } |