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>2013-08-30 15:49:35 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-08-30 15:49:35 +0400
commit658e72f47d6299b8009a04b8aa40ecf95f69bd96 (patch)
treed24b4c147ef62fa2a78b637f73f361657227d67a /source/blender/blenkernel/intern/curve.c
parent5f694a5078eb776fd8fdc78e265a1b5a9a8472ca (diff)
minor ui edits
- move addon refresh button into header - uilist, use icon for sorting by name (gives more room for name, icon is used in fileselector for same purpose). - rename orderby to sort in rna and flag names. - simplify BKE_nurb_handle_calc_simple
Diffstat (limited to 'source/blender/blenkernel/intern/curve.c')
-rw-r--r--source/blender/blenkernel/intern/curve.c21
1 files changed, 2 insertions, 19 deletions
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c
index 0255e986661..ab6cf5ac5d1 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -3088,25 +3088,8 @@ void BKE_nurb_handles_calc(Nurb *nu) /* first, if needed, set handle flags */
* figures out the previous and next for us */
void BKE_nurb_handle_calc_simple(Nurb *nu, BezTriple *bezt)
{
- int index = (int)(bezt - nu->bezt);
- BezTriple *prev, *next;
-
- BLI_assert(ARRAY_HAS_ITEM(bezt, nu->bezt, nu->pntsu));
-
- if (nu->pntsu > 1) {
- if (index == 0) {
- prev = (nu->flagu & CU_NURB_CYCLIC) ? &nu->bezt[nu->pntsu - 1] : NULL;
- next = bezt + 1;
- }
- else if (index == nu->pntsu - 1) {
- prev = bezt - 1;
- next = (nu->flagu & CU_NURB_CYCLIC) ? &nu->bezt[0] : NULL;
- }
- }
- else {
- prev = next = NULL;
- }
-
+ BezTriple *prev = BKE_nurb_bezt_get_prev(nu, bezt);
+ BezTriple *next = BKE_nurb_bezt_get_next(nu, bezt);
BKE_nurb_handle_calc(bezt, prev, next, 0);
}