diff options
Diffstat (limited to 'source/blender/editors/space_clip')
-rw-r--r-- | source/blender/editors/space_clip/clip_buttons.c | 1 | ||||
-rw-r--r-- | source/blender/editors/space_clip/space_clip.c | 14 |
2 files changed, 10 insertions, 5 deletions
diff --git a/source/blender/editors/space_clip/clip_buttons.c b/source/blender/editors/space_clip/clip_buttons.c index 969b0e25928..2cb6d8c9234 100644 --- a/source/blender/editors/space_clip/clip_buttons.c +++ b/source/blender/editors/space_clip/clip_buttons.c @@ -78,6 +78,7 @@ void ED_clip_buttons_register(ARegionType *art) pt = MEM_callocN(sizeof(PanelType), "spacetype clip panel gpencil"); strcpy(pt->idname, "CLIP_PT_gpencil"); strcpy(pt->label, "Grease Pencil"); + pt->draw_header = gpencil_panel_standard_header; pt->draw = gpencil_panel_standard; pt->flag |= PNL_DEFAULT_CLOSED; pt->poll = clip_grease_pencil_panel_poll; diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c index 7befa490d41..dc7b6d77c9e 100644 --- a/source/blender/editors/space_clip/space_clip.c +++ b/source/blender/editors/space_clip/space_clip.c @@ -246,7 +246,7 @@ static SpaceLink *clip_new(const bContext *C) sc = MEM_callocN(sizeof(SpaceClip), "initclip"); sc->spacetype = SPACE_CLIP; sc->flag = SC_SHOW_MARKER_PATTERN | SC_SHOW_TRACK_PATH | SC_MANUAL_CALIBRATION | - SC_SHOW_GRAPH_TRACKS | SC_SHOW_GRAPH_FRAMES; + SC_SHOW_GRAPH_TRACKS | SC_SHOW_GRAPH_FRAMES | SC_SHOW_GPENCIL; sc->zoom = 1.0f; sc->path_length = 20; sc->scopes.track_preview_height = 120; @@ -1151,14 +1151,18 @@ static void clip_main_area_draw(const bContext *C, ARegion *ar) } - /* Grease Pencil */ - clip_draw_grease_pencil((bContext *)C, 1); + if (sc->flag & SC_SHOW_GPENCIL) { + /* Grease Pencil */ + clip_draw_grease_pencil((bContext *)C, TRUE); + } /* reset view matrix */ UI_view2d_view_restore(C); - /* draw Grease Pencil - screen space only */ - clip_draw_grease_pencil((bContext *)C, 0); + if (sc->flag & SC_SHOW_GPENCIL) { + /* draw Grease Pencil - screen space only */ + clip_draw_grease_pencil((bContext *)C, FALSE); + } } static void clip_main_area_listener(ARegion *ar, wmNotifier *wmn) |