== Action/IPO Cleaning Cleanup ==

Further cleanups, this time moving all the checks for making sure that
the cleaning threshold is defined are centralised in the do_versions code.
This commit is contained in:
Joshua Leung 2007-01-10 08:51:24 +00:00
parent 253b98d98c
commit 242db4a960
4 changed files with 7 additions and 12 deletions

@ -6132,6 +6132,9 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
for(sce= main->scene.first; sce; sce= sce->id.next) {
if (sce->toolsettings->select_thresh == 0.0f)
sce->toolsettings->select_thresh= 0.01f;
if (sce->toolsettings->clean_thresh == 0.0f)
sce->toolsettings->clean_thresh = 0.1f;
if (sce->r.threads==0) {
if (sce->r.mode & R_THREADS)
sce->r.threads= 2;

@ -1963,8 +1963,6 @@ void clean_shapekeys(Key *key)
/* don't proceed if user refuses */
if (!key) return;
if (G.scene->toolsettings->clean_thresh==0)
G.scene->toolsettings->clean_thresh= 0.1f;
ok= fbutton(&G.scene->toolsettings->clean_thresh,
0.0000001f, 1.0, 0.001, 0.1,
"Clean Threshold");
@ -1998,8 +1996,6 @@ void clean_actionchannels(bAction *act)
/* don't proceed any further if no action or user refuses */
if (!act) return;
if (G.scene->toolsettings->clean_thresh==0)
G.scene->toolsettings->clean_thresh= 0.1f;
ok= fbutton(&G.scene->toolsettings->clean_thresh,
0.0000001f, 1.0, 0.001, 0.1,
"Clean Threshold");

@ -3089,8 +3089,6 @@ void clean_ipo(void)
short ok;
int b;
if (G.scene->toolsettings->clean_thresh==0)
G.scene->toolsettings->clean_thresh= 0.1f;
ok= fbutton(&G.scene->toolsettings->clean_thresh,
0.0000001f, 1.0, 0.001, 0.1,
"Clean Threshold");

@ -336,19 +336,17 @@ static void init_userdef_file(void)
}
if (G.main->versionfile <= 242) {
bTheme *btheme;
/* long keyframe colour */
for(btheme= U.themes.first; btheme; btheme= btheme->next) {
/* long keyframe colour */
/* check for alpha==0 is safe, then color was never set */
if(btheme->tact.strip[3]==0) {
SETCOL(btheme->tv3d.edge_sharp, 255, 32, 32, 255);
SETCOL(btheme->tact.strip_select, 0xff, 0xff, 0xaa, 204);
SETCOL(btheme->tact.strip, 0xe4, 0x9c, 0xc6, 204);
}
}
}
if (G.main->versionfile <= 242) {
bTheme *btheme;
for(btheme= U.themes.first; btheme; btheme= btheme->next) {
/* IPO-Editor - Vertex Size*/
if(btheme->tipo.vertex_size == 0) {
btheme->tipo.vertex_size= 3;
}