Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2006-08-04 18:08:21 +0400
committerCampbell Barton <ideasman42@gmail.com>2006-08-04 18:08:21 +0400
commita8461d2c408ebc4234e898c18f0b64a667fb7cc6 (patch)
tree7e105d044ffb852c229928396cf895154871f528 /source/blender
parent0c748032a6ce1c92ef4dd99f65ddcdba1bf7b9de (diff)
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.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/ipo.c4
-rw-r--r--source/blender/makesdna/DNA_ipo_types.h4
-rw-r--r--source/blender/src/editipo_mods.c6
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);
}