== Action/IPO Cleaning Cleanup ==
authorJoshua Leung <aligorith@gmail.com>
Wed, 10 Jan 2007 08:51:24 +0000 (08:51 +0000)
committerJoshua Leung <aligorith@gmail.com>
Wed, 10 Jan 2007 08:51:24 +0000 (08:51 +0000)
Further cleanups, this time moving all the checks for making sure that
the cleaning threshold is defined are centralised in the do_versions code.

source/blender/blenloader/intern/readfile.c
source/blender/src/editaction.c
source/blender/src/editipo.c
source/blender/src/usiblender.c

index 477ef6ac55c370f211c4f488379410503d85d449..23a7ed8b747f59fce46eef169b8c6f7eca1d4c82 100644 (file)
@@ -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;
index 4b2f0d175c6766963dcb296137e68cf10def9305..77057a2478c792d5f6e87ef6c6f33ff03d1ed0d2 100644 (file)
@@ -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");
index 6129786988f6f45495b559c16b3487329a47ced2..b78db42c01891cbdf4131c0bfcf56b319f68ec91 100644 (file)
@@ -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");
index fe801d0f908585c9b8f2c5f6becaf5109fa4e64e..0b35488ac3541af0355f7c06f945e0f339b8c710 100644 (file)
@@ -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;
                        }