diff --git a/release/datafiles/userdef/userdef_default_theme.c b/release/datafiles/userdef/userdef_default_theme.c index 04ad04d4812..7d0cf9b031c 100644 --- a/release/datafiles/userdef/userdef_default_theme.c +++ b/release/datafiles/userdef/userdef_default_theme.c @@ -370,6 +370,7 @@ const bTheme U_theme_default = { .clipping_border_3d = RGBA(0x3f3f3fff), .bundle_solid = RGBA(0xc8c8c8ff), .camera_path = RGBA(0x000000ff), + .camera_passepartout = RGBA(0x000000), .gp_vertex_size = 3, .gp_vertex = RGBA(0x000000ff), .gp_vertex_select = RGBA(0xff8500ff), diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index 9a46728097c..9023f1662ab 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -236,6 +236,7 @@ typedef enum ThemeColorID { TH_PATH_KEYFRAME_BEFORE, TH_PATH_KEYFRAME_AFTER, TH_CAMERA_PATH, + TH_CAMERA_PASSEPARTOUT, TH_LOCK_MARKER, TH_STITCH_PREVIEW_FACE, diff --git a/source/blender/editors/interface/resources.cc b/source/blender/editors/interface/resources.cc index 606f9d5a11f..5982f8ad1c9 100644 --- a/source/blender/editors/interface/resources.cc +++ b/source/blender/editors/interface/resources.cc @@ -803,6 +803,9 @@ const uchar *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid) case TH_CAMERA_PATH: cp = ts->camera_path; break; + case TH_CAMERA_PASSEPARTOUT: + cp = ts->camera_passepartout; + break; case TH_LOCK_MARKER: cp = ts->lock_marker; break; diff --git a/source/blender/editors/space_view3d/view3d_draw.cc b/source/blender/editors/space_view3d/view3d_draw.cc index 7146f5e1f67..7018fa16fe6 100644 --- a/source/blender/editors/space_view3d/view3d_draw.cc +++ b/source/blender/editors/space_view3d/view3d_draw.cc @@ -585,7 +585,7 @@ static void drawviewborder(Scene *scene, Depsgraph *depsgraph, ARegion *region, alpha = ca->passepartalpha; } - immUniformColor4f(0.0f, 0.0f, 0.0f, alpha); + immUniformThemeColorAlpha(TH_CAMERA_PASSEPARTOUT, alpha); if (x1i > 0.0f) { immRectf(shdr_pos, 0.0f, winy, x1i, 0.0f); diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index b48c58ee752..bdf2210deae 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -354,7 +354,8 @@ typedef struct ThemeSpace { unsigned char path_before[4], path_after[4]; unsigned char path_keyframe_before[4], path_keyframe_after[4]; unsigned char camera_path[4]; - unsigned char _pad1[6]; + unsigned char camera_passepartout[4]; + unsigned char _pad1[2]; unsigned char gp_vertex_size; unsigned char gp_vertex[4], gp_vertex_select[4]; diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 3015c34f2f3..1b10a924b12 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -2345,6 +2345,11 @@ static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Camera Path", ""); RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + prop = RNA_def_property(srna, "camera_passepartout", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Camera Passepartout", ""); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + prop = RNA_def_property(srna, "skin_root", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_array(prop, 3); RNA_def_property_ui_text(prop, "Skin Root", "");