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
path: root/source
diff options
context:
space:
mode:
authorMatt Ebb <matt@mke3.net>2006-09-25 07:22:54 +0400
committerMatt Ebb <matt@mke3.net>2006-09-25 07:22:54 +0400
commit71284959d5afad06e1a5a2fdf0cd12f15e7319bd (patch)
tree46b79caf4d45e5175dc9344bb86669039e4dc368 /source
parent7639f0890a55057c476765f8eff0f084124570f4 (diff)
* Added backwards compat check for curve radius value, so old files act properly.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenloader/intern/readfile.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 0a149ce5b06..2c25e1fe71c 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -5588,12 +5588,35 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
if(main->versionfile <= 242) {
Scene *sce;
Object *ob;
+ Curve *cu;
+ Nurb *nu;
+ BezTriple *bezt;
+ BPoint *bp;
+ int a;
for(sce= main->scene.first; sce; sce= sce->id.next) {
if (sce->toolsettings->select_thresh == 0.0f)
sce->toolsettings->select_thresh= 0.01f;
}
+ /* add default radius values to old curve points */
+ for(cu= main->curve.first; cu; cu= cu->id.next) {
+ for(nu= cu->nurb.first; nu; nu= nu->next) {
+ if (nu) {
+ if(nu->bezt) {
+ for(bezt=nu->bezt, a=0; a<nu->pntsu; a++, bezt++) {
+ bezt->radius= 1.0;
+ }
+ }
+ else if(nu->bp) {
+ for(bp=nu->bp, a=0; a<nu->pntsu*nu->pntsv; a++, bp++) {
+ bp->radius= 1.0;
+ }
+ }
+ }
+ }
+ }
+
ob = main->object.first;
while (ob) {
@@ -5635,7 +5658,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
}
- }
+ }
}
ob = ob->id.next;