From c92be1a9a5491621b42f791e5c596494e1937254 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 10 Jan 2013 18:11:56 +0000 Subject: Correction to do_versions() in 53676 Affect on curve radius only if offset/extrude was used, otherwise radius could have been used for other things (like controlling hair) which will likely break compatibility. Reported by Tube project guys. --- source/blender/blenloader/intern/readfile.c | 34 +++++++++++++++-------------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'source/blender/blenloader') diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 2235906329d..44499f1ae77 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -8617,27 +8617,29 @@ static void do_versions(FileData *fd, Library *lib, Main *main) for (cu = main->curve.first; cu; cu = cu->id.next) { if (cu->flag & (CU_FRONT | CU_BACK)) { - Nurb *nu; + if ( cu->ext1 != 0.0f || cu->ext2 != 0.0f) { + Nurb *nu; - for (nu = cu->nurb.first; nu; nu = nu->next) { - int a; + for (nu = cu->nurb.first; nu; nu = nu->next) { + int a; - if (nu->bezt) { - BezTriple *bezt = nu->bezt; - a = nu->pntsu; + if (nu->bezt) { + BezTriple *bezt = nu->bezt; + a = nu->pntsu; - while (a--) { - bezt->radius = 1.0f; - bezt++; + while (a--) { + bezt->radius = 1.0f; + bezt++; + } } - } - else if (nu->bp) { - BPoint *bp = nu->bp; - a = nu->pntsu * nu->pntsv; + else if (nu->bp) { + BPoint *bp = nu->bp; + a = nu->pntsu * nu->pntsv; - while (a--) { - bp->radius = 1.0f; - bp++; + while (a--) { + bp->radius = 1.0f; + bp++; + } } } } -- cgit v1.2.3