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:
Diffstat (limited to 'source/blender/editors/mask/mask_draw.c')
-rw-r--r--source/blender/editors/mask/mask_draw.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/mask/mask_draw.c b/source/blender/editors/mask/mask_draw.c
index 7247697dcb7..85fedac05ce 100644
--- a/source/blender/editors/mask/mask_draw.c
+++ b/source/blender/editors/mask/mask_draw.c
@@ -38,6 +38,7 @@
#include "ED_clip.h"
#include "ED_mask.h" /* own include */
+#include "ED_screen.h"
#include "ED_space_api.h"
#include "BIF_glutil.h"
@@ -802,6 +803,10 @@ void ED_mask_draw_frames(Mask *mask, ARegion *ar, const int cfra, const int sfra
unsigned int num_lines = BLI_listbase_count(&masklay->splines_shapes);
if (num_lines > 0) {
+ /* Local coordinate visible rect inside region, to accommodate overlapping ui. */
+ const rcti *rect_visible = ED_region_visible_rect(ar);
+ const int region_bottom = rect_visible->ymin;
+
uint pos = GPU_vertformat_attr_add(
immVertexFormat(), "pos", GPU_COMP_I32, 2, GPU_FETCH_INT_TO_FLOAT);
@@ -817,8 +822,8 @@ void ED_mask_draw_frames(Mask *mask, ARegion *ar, const int cfra, const int sfra
/* draw_keyframe(i, CFRA, sfra, framelen, 1); */
int height = (frame == cfra) ? 22 : 10;
int x = (frame - sfra) * framelen;
- immVertex2i(pos, x, 0);
- immVertex2i(pos, x, height);
+ immVertex2i(pos, x, region_bottom);
+ immVertex2i(pos, x, region_bottom + height * UI_DPI_FAC);
}
immEnd();
immUnbindProgram();