DNA_ipo_types.h comments only

other are changes so calchandles_ipocurve only calc handels on a bezier line.
This makes bvh import faster but should also speed up internal IPO operations.
This commit is contained in:
Campbell Barton
2006-08-04 14:08:21 +00:00
parent 0c748032a6
commit a8461d2c40
3 changed files with 11 additions and 3 deletions

View File

@@ -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;

View File

@@ -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

View File

@@ -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);
}