diff options
author | Hans Goudey <h.goudey@me.com> | 2020-06-02 22:58:38 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2020-06-02 22:58:38 +0300 |
commit | e391b3e0fb46c760d3dad3ba65a299e948a2423a (patch) | |
tree | 1da99d07e0350700d316fcf24c470848d31e076a /source | |
parent | a87eee65fc768b7bc3c2f8c33d043b577f84f124 (diff) | |
parent | 7fc0053c27e5e9ba3cc946898c7c11a8545f2777 (diff) |
Merge branch 'blender-v2.83-release'
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenloader/intern/versioning_userdef.c | 6 | ||||
-rw-r--r-- | source/blender/editors/include/UI_resources.h | 3 | ||||
-rw-r--r-- | source/blender/editors/interface/resources.c | 9 | ||||
-rw-r--r-- | source/blender/editors/space_info/info_ops.c | 6 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_userdef_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 15 |
6 files changed, 38 insertions, 3 deletions
diff --git a/source/blender/blenloader/intern/versioning_userdef.c b/source/blender/blenloader/intern/versioning_userdef.c index 1b0e41ec54a..3774811c75e 100644 --- a/source/blender/blenloader/intern/versioning_userdef.c +++ b/source/blender/blenloader/intern/versioning_userdef.c @@ -216,6 +216,12 @@ static void do_versions_theme(const UserDef *userdef, bTheme *btheme) btheme->tui.transparent_checker_size = U_theme_default.tui.transparent_checker_size; } + if (!USER_VERSION_ATLEAST(283, 18)) { + FROM_DEFAULT_V4_UCHAR(space_info.info_report_error); + FROM_DEFAULT_V4_UCHAR(space_info.info_report_warning); + FROM_DEFAULT_V4_UCHAR(space_info.info_report_info); + } + /** * Versioning code until next subversion bump goes here. * diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index c5c4ca79f14..79e1ac63641 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -340,6 +340,9 @@ typedef enum ThemeColorID { TH_INFO_OPERATOR, TH_INFO_OPERATOR_TEXT, TH_VIEW_OVERLAY, + TH_INFO_REPORT_ERROR, + TH_INFO_REPORT_WARNING, + TH_INFO_REPORT_INFO, TH_V3D_CLIPPING_BORDER, diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index 01c9716ec86..ac7d8783123 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -1013,6 +1013,15 @@ const uchar *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid) case TH_INFO_OPERATOR_TEXT: cp = ts->info_operator_text; break; + case TH_INFO_REPORT_ERROR: + cp = ts->info_report_error; + break; + case TH_INFO_REPORT_WARNING: + cp = ts->info_report_warning; + break; + case TH_INFO_REPORT_INFO: + cp = ts->info_report_info; + break; case TH_V3D_CLIPPING_BORDER: cp = ts->clipping_border_3d; break; diff --git a/source/blender/editors/space_info/info_ops.c b/source/blender/editors/space_info/info_ops.c index 30f36509b41..2e639879447 100644 --- a/source/blender/editors/space_info/info_ops.c +++ b/source/blender/editors/space_info/info_ops.c @@ -568,13 +568,13 @@ static int update_reports_display_invoke(bContext *C, wmOperator *UNUSED(op), co /* set target color based on report type */ if (report->type & RPT_ERROR_ALL) { - UI_GetThemeColorType3fv(TH_INFO_ERROR, SPACE_INFO, target_col); + UI_GetThemeColorType3fv(TH_INFO_REPORT_ERROR, SPACE_INFO, target_col); } else if (report->type & RPT_WARNING_ALL) { - UI_GetThemeColorType3fv(TH_INFO_WARNING, SPACE_INFO, target_col); + UI_GetThemeColorType3fv(TH_INFO_REPORT_WARNING, SPACE_INFO, target_col); } else if (report->type & RPT_INFO_ALL) { - UI_GetThemeColorType3fv(TH_INFO_INFO, SPACE_INFO, target_col); + UI_GetThemeColorType3fv(TH_INFO_REPORT_INFO, SPACE_INFO, target_col); } target_col[3] = 0.65f; diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 019e4c9ea9e..31063791cd8 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -422,6 +422,8 @@ typedef struct ThemeSpace { unsigned char info_debug[4], info_debug_text[4]; unsigned char info_property[4], info_property_text[4]; unsigned char info_operator[4], info_operator_text[4]; + unsigned char info_report_error[4], info_report_warning[4], info_report_info[4]; + char _pad[4]; unsigned char paint_curve_pivot[4]; unsigned char paint_curve_handle[4]; diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 49a0121dadb..0332e5a60f7 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -2669,6 +2669,21 @@ static void rna_def_userdef_theme_space_info(BlenderRNA *brna) RNA_def_property_array(prop, 3); RNA_def_property_ui_text(prop, "Operator Icon Foreground", "Foreground color of Operator icon"); RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + + prop = RNA_def_property(srna, "info_report_error", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Error Banner Background", ""); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + + prop = RNA_def_property(srna, "info_report_warning", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Warning Banner Background", ""); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + + prop = RNA_def_property(srna, "info_report_info", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Info Banner Background", ""); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); } static void rna_def_userdef_theme_space_text(BlenderRNA *brna) |