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>2008-04-04 19:22:19 +0400
committerCampbell Barton <ideasman42@gmail.com>2008-04-04 19:22:19 +0400
commite8e100738674cba65f70c7be49e0fb210645c06a (patch)
tree63c62be7935c1641cab4e63fefb9a3be30c83fa9 /source/blender/src/editipo.c
parent6b6e5eb4c979e050478baa39d7402c03bcc73c80 (diff)
moved some duplicate lines into their own function
Diffstat (limited to 'source/blender/src/editipo.c')
-rw-r--r--source/blender/src/editipo.c22
1 files changed, 3 insertions, 19 deletions
diff --git a/source/blender/src/editipo.c b/source/blender/src/editipo.c
index c0a6330b9f0..fb8a3e5f769 100644
--- a/source/blender/src/editipo.c
+++ b/source/blender/src/editipo.c
@@ -5172,23 +5172,12 @@ void make_ipo_transdata (TransInfo *t)
/* only include handles if selected, and interpolaton mode uses beztriples */
if (ei->icu->ipo==IPO_BEZ) {
if (bezt->f1 & SELECT) {
- td->flag |= TD_BEZTRIPLE;
- hdata = td->misc.hdata = MEM_mallocN(sizeof(TransDataCurveHandleFlags), "CuHandle Data");
- hdata->ih1 = bezt->h1;
- hdata->h1 = &bezt->h1;
- hdata->ih2 = bezt->h2; /* incase the second is not selected */
- hdata->h2 = &bezt->h2;
-
+ hdata = initTransDataCurveHandes(td, bezt);
bezt_to_transdata(td++, td2d++, bezt->vec[0], bezt->vec[1], 1, onlytime);
}
if (bezt->f3 & SELECT) {
if (hdata==NULL) {
- td->flag |= TD_BEZTRIPLE;
- hdata = td->misc.hdata = MEM_mallocN(sizeof(TransDataCurveHandleFlags), "CuHandle Data");
- hdata->ih1 = bezt->h1;
- hdata->h1 = &bezt->h1;
- hdata->ih2 = bezt->h2; /* incase the second is not selected */
- hdata->h2 = &bezt->h2;
+ hdata = initTransDataCurveHandes(td, bezt);
}
bezt_to_transdata(td++, td2d++, bezt->vec[2], bezt->vec[1], 1, onlytime);
}
@@ -5199,12 +5188,7 @@ void make_ipo_transdata (TransInfo *t)
if ((bezt->f1&SELECT)==0 && (bezt->f3&SELECT)==0) {
if (hdata==NULL) {
- td->flag |= TD_BEZTRIPLE;
- hdata = td->misc.hdata = MEM_mallocN(sizeof(TransDataCurveHandleFlags), "CuHandle Data");
- hdata->ih1 = bezt->h1;
- hdata->h1 = &bezt->h1;
- hdata->ih2 = bezt->h2; /* incase the second is not selected */
- hdata->h2 = &bezt->h2;
+ hdata = initTransDataCurveHandes(td, bezt);
}
}