Fix #141889: Broken themes in 5.0
Blender 5.0 got a theme overhaul, removing hundreds of options and adding some more. While versioning was attempted to keep themes looking as close as possible, some settings are impossible to guess so they require manual editing. Reset the theme to the default. Similarly to how it was done in other major overhauls (2.80, 3.0). Documentation and tools to migrate themes will be available at: https://developer.blender.org/docs/release_notes/5.0/user_interface/ Pull Request: https://projects.blender.org/blender/blender/pulls/147637
This commit is contained in:
committed by
Pablo Vazquez
parent
316fe67295
commit
829c6a7b98
@@ -289,7 +289,7 @@ const bTheme U_theme_default = {
|
||||
},
|
||||
.regions = {
|
||||
.asset_shelf = {
|
||||
.back = RGBA(0x303030ff),
|
||||
.back = RGBA(0x303030e6),
|
||||
.header_back = RGBA(0x1d1d1dff),
|
||||
},
|
||||
.channels = {
|
||||
@@ -298,10 +298,10 @@ const bTheme U_theme_default = {
|
||||
.text_selected = RGBA(0xffaf23ff),
|
||||
},
|
||||
.scrubbing = {
|
||||
.back = RGBA(0x161616ff),
|
||||
.text = RGBA(0xc3c3c3ff),
|
||||
.time_marker = RGBA(0xffffff4d),
|
||||
.time_marker_selected = RGBA(0xffffffb3),
|
||||
.back = RGBA(0x1d1d1dff),
|
||||
.text = RGBA(0x808080ff),
|
||||
.time_marker = RGBA(0xffffff80),
|
||||
.time_marker_selected = RGBA(0xffffffff),
|
||||
},
|
||||
.sidebars = {
|
||||
.back = RGBA(0x30303000),
|
||||
@@ -312,7 +312,6 @@ const bTheme U_theme_default = {
|
||||
.anim = {
|
||||
.playhead = RGBA(0x4772b3ff),
|
||||
.preview_range = RGBA(0xa14d0066),
|
||||
.scene_strip_range = RGBA(0x00000080),
|
||||
.channels = RGBA(0x194e8080),
|
||||
.channels_sub = RGBA(0x0f2c4d80),
|
||||
.channel_group = RGBA(0x1a332d37),
|
||||
@@ -333,6 +332,7 @@ const bTheme U_theme_default = {
|
||||
.keyframe_generated_selected = RGBA(0xa28962ff),
|
||||
.long_key = RGBA(0xffffff1f),
|
||||
.long_key_selected = RGBA(0xff8c0099),
|
||||
.scene_strip_range = RGBA(0x00000080),
|
||||
},
|
||||
.curves = {
|
||||
.handle_free = RGBA(0x745900ff),
|
||||
@@ -646,15 +646,15 @@ const bTheme U_theme_default = {
|
||||
.row_alternate = RGBA(0xffffff04),
|
||||
},
|
||||
.space_node = {
|
||||
.back = RGBA(0x1d1d1d00),
|
||||
.back = RGBA(0x1a1a1a00),
|
||||
.title = RGBA(0xeeeeeeff),
|
||||
.text = RGBA(0xe6e6e6ff),
|
||||
.text_hi = RGBA(0xffffffff),
|
||||
.header = RGBA(0x1d1d1db3),
|
||||
.header = RGBA(0x1a1a1ab3),
|
||||
.header_text = RGBA(0xeeeeeeff),
|
||||
.header_text_hi = RGBA(0xffffffff),
|
||||
.shade2 = RGBA(0x7f7f7f64),
|
||||
.grid = RGBA(0x28282800),
|
||||
.grid = RGBA(0x30303000),
|
||||
.wire = RGBA(0x1a1a1aff),
|
||||
.select = RGBA(0xed5700ff),
|
||||
.active = RGBA(0xffffffff),
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
/* Blender file format version. */
|
||||
#define BLENDER_FILE_VERSION BLENDER_VERSION
|
||||
#define BLENDER_FILE_SUBVERSION 110
|
||||
#define BLENDER_FILE_SUBVERSION 111
|
||||
|
||||
/* Minimum Blender version that supports reading file written with the current
|
||||
* version. Older Blender versions will test this and cancel loading the file, showing a warning to
|
||||
|
||||
@@ -390,6 +390,26 @@ static void do_versions_theme(const UserDef *userdef, bTheme *btheme)
|
||||
FROM_DEFAULT_V4_UCHAR(common.anim.scene_strip_range);
|
||||
}
|
||||
|
||||
/* Reset the theme due to compatibility breaking changes in 5.0. */
|
||||
if (!USER_VERSION_ATLEAST(500, 111)) {
|
||||
MEMCPY_STRUCT_AFTER(btheme, &U_theme_default, name);
|
||||
/* Update text styles to match. */
|
||||
LISTBASE_FOREACH (uiStyle *, style, &userdef->uistyles) {
|
||||
style->paneltitle.points = 11.0f;
|
||||
style->paneltitle.shadow = 3;
|
||||
style->paneltitle.shadowalpha = 0.5f;
|
||||
style->paneltitle.shadowcolor = 0.0f;
|
||||
style->widget.points = 11.0f;
|
||||
style->widget.shadow = 1;
|
||||
style->widget.shadowalpha = 0.5f;
|
||||
style->widget.shadowcolor = 0.0f;
|
||||
style->tooltip.shadow = 1;
|
||||
style->tooltip.points = 11.0f;
|
||||
style->tooltip.shadowalpha = 0.5f;
|
||||
style->tooltip.shadowcolor = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Always bump subversion in BKE_blender_version.h when adding versioning
|
||||
* code here, and wrap it inside a USER_VERSION_ATLEAST check.
|
||||
|
||||
Reference in New Issue
Block a user