diff options
-rw-r--r-- | source/blender/editors/include/UI_resources.h | 1 | ||||
-rw-r--r-- | source/blender/editors/interface/resources.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_draw.c | 5 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 6 |
4 files changed, 13 insertions, 3 deletions
diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index c470b13aa69..1531ade5ba3 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -158,6 +158,7 @@ enum { TH_SEQ_PLUGIN, TH_SEQ_TRANSITION, TH_SEQ_META, + TH_SEQ_PREVIEW, TH_EDGE_SHARP, TH_EDITMESH_ACTIVE, diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index 124ce77325b..a534fe11856 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -384,6 +384,8 @@ const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colo cp= ts->transition; break; case TH_SEQ_META: cp= ts->meta; break; + case TH_SEQ_PREVIEW: + cp= ts->preview_back; break; case TH_CONSOLE_OUTPUT: cp= ts->console_output; break; @@ -770,7 +772,7 @@ void ui_theme_init_default(void) rgba_char_args_set(btheme->tseq.plugin, 126, 126, 80, 255); rgba_char_args_set(btheme->tseq.transition, 162, 95, 111, 255); rgba_char_args_set(btheme->tseq.meta, 109, 145, 131, 255); - + rgba_char_args_set(btheme->tseq.preview_back, 0, 0, 0, 255); /* space image */ btheme->tima= btheme->tv3d; diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index 99888ba4a37..d0659cfc01d 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -778,6 +778,7 @@ void draw_image_seq(const bContext* C, Scene *scene, ARegion *ar, SpaceSeq *sseq float viewrectx, viewrecty; float render_size = 0.0; float proxy_size = 100.0; + float col[3]; GLuint texid; GLuint last_texid; SeqRenderData context; @@ -805,8 +806,8 @@ void draw_image_seq(const bContext* C, Scene *scene, ARegion *ar, SpaceSeq *sseq } if(frame_ofs == 0) { - /* XXX TODO: take color from theme */ - glClearColor(0.0, 0.0, 0.0, 0.0); + UI_GetThemeColor3fv(TH_SEQ_PREVIEW, col); + glClearColor(col[0], col[1], col[2], 0.0); glClear(GL_COLOR_BUFFER_BIT); } diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 8e4ebe0b22e..360f8222619 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -1799,6 +1799,12 @@ static void rna_def_userdef_theme_space_seq(BlenderRNA *brna) RNA_def_property_array(prop, 3); RNA_def_property_ui_text(prop, "Draw Action", ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); + + prop = RNA_def_property(srna, "preview_back", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_float_sdna(prop, NULL, "preview_back"); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Preview Background", ""); + RNA_def_property_update(prop, 0, "rna_userdef_update"); } static void rna_def_userdef_theme_space_action(BlenderRNA *brna) |