Dopesheet: Keyframe size can be adjusted as part of theme settings
[blender.git] / source / blender / editors / interface / resources.c
index e2e2413c717f213b2a03bb2c57fb77d6d5f5efa5..a9607d93672547875b123f23bfccfcf4e967230e 100644 (file)
@@ -1011,6 +1011,8 @@ void ui_theme_init_default(void)
        rgba_char_args_set(btheme->tact.keyborder,               0,   0,   0, 255);
        rgba_char_args_set(btheme->tact.keyborder_select,        0,   0,   0, 255);
        
+       btheme->tact.keyframe_scale_fac = 1.0f;
+       
        /* space nla */
        btheme->tnla = btheme->tact;
        
@@ -2699,6 +2701,14 @@ void init_userdef_do_versions(void)
                        }
                }
        }
+       
+       if (!USER_VERSION_ATLEAST(277, 2)) {
+               bTheme *btheme;
+               for (btheme = U.themes.first; btheme; btheme = btheme->next) {
+                       if (btheme->tact.keyframe_scale_fac < 0.1f)
+                               btheme->tact.keyframe_scale_fac = 1.0f;
+               }
+       }
 
        /**
         * Include next version bump.