New toolsettings variable "select_thresh" was not initialized. This caused
the option "similar normals" to not work really (uses a dot product).

It now is initialized (scene.c) as well as corrected in do_versions for
saved files.
This commit is contained in:
2006-08-13 11:11:22 +00:00
parent b416e3eeb4
commit 4718a22cd0
2 changed files with 10 additions and 1 deletions

View File

@@ -224,6 +224,7 @@ Scene *add_scene(char *name)
sce->toolsettings->uvcalc_mapdir = 1;
sce->toolsettings->uvcalc_mapalign = 1;
sce->toolsettings->unwrapper = 1;
sce->toolsettings->select_thresh= 0.01f;
sce->jumpframe = 10;
sce->audio.mixrate = 44100;

View File

@@ -5561,7 +5561,15 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
}
if(main->versionfile <= 242) {
Scene *sce;
for(sce= main->scene.first; sce; sce= sce->id.next) {
if (sce->toolsettings->select_thresh == 0.0f)
sce->toolsettings->select_thresh= 0.01f;
}
}
/* WATCH IT!!!: pointers from libdata have not been converted yet here! */
/* WATCH IT 2!: Userdef struct init has to be in src/usiblender.c! */