Cleanup: remove redundant theme versioning

All themes older than 2.8x are initialized from the defaults,
there is no need to version them.
This commit is contained in:
Campbell Barton 2020-10-02 20:58:43 +10:00
parent d858859402
commit dd95a2e1d5
1 changed files with 0 additions and 10 deletions

View File

@ -6887,22 +6887,12 @@ static void link_global(FileData *fd, BlendFileData *bfd)
/* other initializers (such as theme color defaults) go to resources.c */
static void do_versions_userdef(FileData *fd, BlendFileData *bfd)
{
Main *bmain = bfd->main;
UserDef *user = bfd->user;
if (user == NULL) {
return;
}
if (MAIN_VERSION_OLDER(bmain, 266, 4)) {
/* Themes for Node and Sequence editor were not using grid color,
* but back. we copy this over then. */
LISTBASE_FOREACH (bTheme *, btheme, &user->themes) {
copy_v4_v4_uchar(btheme->space_node.grid, btheme->space_node.back);
copy_v4_v4_uchar(btheme->space_sequencer.grid, btheme->space_sequencer.back);
}
}
if (!DNA_struct_elem_find(fd->filesdna, "UserDef", "WalkNavigation", "walk_navigation")) {
user->walk_navigation.mouse_speed = 1.0f;
user->walk_navigation.walk_speed = 2.5f; /* m/s */