diff options
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface_draw.c | 9 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c index 7b69e820467..22aa1031f48 100644 --- a/source/blender/editors/interface/interface_draw.c +++ b/source/blender/editors/interface/interface_draw.c @@ -1550,7 +1550,8 @@ void ui_draw_but_TRACKPREVIEW(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wc IMB_freeImBuf(scopes->track_preview); tmpibuf = BKE_tracking_sample_pattern_imbuf(scopes->frame_width, scopes->frame_height, - scopes->track_search, &scopes->undist_marker, + scopes->track_search, scopes->track, + &scopes->undist_marker, scopes->use_track_mask, width, height, scopes->track_pos); if (tmpibuf->rect_float) @@ -1582,6 +1583,12 @@ void ui_draw_but_TRACKPREVIEW(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wc if (width > 0 && height > 0) { drawibuf = scopes->track_preview; + if (scopes->use_track_mask) { + glColor4f(0.0f, 0.0f, 0.0f, 0.3f); + uiSetRoundBox(15); + uiDrawBox(GL_POLYGON, rect.xmin - 1, rect.ymin, rect.xmax + 1, rect.ymax + 1, 3.0f); + } + glaDrawPixelsSafe(rect.xmin, rect.ymin + 1, drawibuf->x, drawibuf->y, drawibuf->x, GL_RGBA, GL_UNSIGNED_BYTE, drawibuf->rect); diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index a2adbd7a143..4615906b0da 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -4201,7 +4201,7 @@ static int ui_numedit_but_TRACKPREVIEW(bContext *C, uiBut *but, uiHandleButtonDa scopes->track_preview_height = (but->y2 - but->y1) + (data->dragstarty - my); } else { - if (scopes->marker) { + if (!scopes->track_locked) { if (scopes->marker->framenr != scopes->framenr) scopes->marker = BKE_tracking_ensure_marker(scopes->track, scopes->framenr); |