Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-12-17 08:44:39 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-12-17 08:44:39 +0400
commitfe006c042661586a03d27ad5418ca373bfa48e45 (patch)
tree9ed12baff2fa5a3b75be519ab33024c67332f00f /source/blender/editors/space_sequencer/sequencer_buttons.c
parent519378fca6fb3982568ab975c904658954e44c7f (diff)
don't draw the sequencer grease pencil panel when in the channel view or scopes.
also don't draw grease pencil over scopes.
Diffstat (limited to 'source/blender/editors/space_sequencer/sequencer_buttons.c')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_buttons.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_buttons.c b/source/blender/editors/space_sequencer/sequencer_buttons.c
index bd4bb0896ed..21128408a97 100644
--- a/source/blender/editors/space_sequencer/sequencer_buttons.c
+++ b/source/blender/editors/space_sequencer/sequencer_buttons.c
@@ -41,6 +41,7 @@
#include "ED_screen.h"
#include "ED_gpencil.h"
+#include "ED_sequencer.h"
#include "WM_api.h"
#include "WM_types.h"
@@ -51,6 +52,14 @@
/* **************************** buttons ********************************* */
+static int sequencer_grease_pencil_panel_poll(const bContext *C, PanelType *UNUSED(pt))
+{
+ SpaceSeq *sseq = CTX_wm_space_seq(C);
+
+ /* don't show the gpencil if we are not showing the image */
+ return ED_space_sequencer_check_show_imbuf(sseq);
+}
+
void sequencer_buttons_register(ARegionType *art)
{
PanelType *pt;
@@ -60,6 +69,7 @@ void sequencer_buttons_register(ARegionType *art)
strcpy(pt->label, N_("Grease Pencil"));
pt->draw_header = gpencil_panel_standard_header;
pt->draw = gpencil_panel_standard;
+ pt->poll = sequencer_grease_pencil_panel_poll;
BLI_addtail(&art->paneltypes, pt);
}