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>2014-10-28 20:51:28 +0300
committerCampbell Barton <ideasman42@gmail.com>2014-10-28 20:51:28 +0300
commit36da579d122fe49f3db8759e38d6ff1921939ad4 (patch)
treebad70381af315f67e824f9d23d794c171e122a02 /source/blender/editors/animation
parentb2b1d8e2908e5960b700c70a6baf93b9745845bc (diff)
Markers: show the area that handles marker events
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r--source/blender/editors/animation/anim_markers.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c
index 58db93b4586..bb959ad06e5 100644
--- a/source/blender/editors/animation/anim_markers.c
+++ b/source/blender/editors/animation/anim_markers.c
@@ -418,12 +418,25 @@ void draw_markers_time(const bContext *C, int flag)
TimeMarker *marker;
Scene *scene;
- if (markers == NULL)
+ if (markers == NULL || BLI_listbase_is_empty(markers)) {
return;
+ }
scene = CTX_data_scene(C);
v2d = UI_view2d_fromcontext(C);
+ if (flag & DRAW_MARKERS_MARGIN) {
+ const unsigned char shade[4] = {0, 0, 0, 16};
+ glColor4ubv(shade);
+
+ glEnable(GL_BLEND);
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+
+ glRectf(v2d->cur.xmin, 0, v2d->cur.xmax, UI_MARKER_MARGIN_Y);
+
+ glDisable(GL_BLEND);
+ }
+
/* unselected markers are drawn at the first time */
for (marker = markers->first; marker; marker = marker->next) {
if ((marker->flag & SELECT) == 0) {