From 51be0a765e44512dbc2b89ff9c3f8b225f7b7565 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 30 Jul 2019 13:00:22 +0200 Subject: Tracking: Fix wrong usage of draw buffers Curve drawing was attempting to draw reprojection error curve when it was not visible. Worst thing is that the imm was not informed about vertices, so the code was causing an assert in debug mode. Probably, it is also what have caused random crashes after recent changes. --- source/blender/editors/space_clip/clip_graph_draw.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/space_clip/clip_graph_draw.c') diff --git a/source/blender/editors/space_clip/clip_graph_draw.c b/source/blender/editors/space_clip/clip_graph_draw.c index f9c72741979..3f705aad89a 100644 --- a/source/blender/editors/space_clip/clip_graph_draw.c +++ b/source/blender/editors/space_clip/clip_graph_draw.c @@ -58,12 +58,16 @@ typedef struct TrackMotionCurveUserData { static void tracking_segment_point_cb(void *userdata, MovieTrackingTrack *UNUSED(track), MovieTrackingMarker *UNUSED(marker), - eClipCurveValueSource UNUSED(value_source), + eClipCurveValueSource value_source, int scene_framenr, float val) { TrackMotionCurveUserData *data = (TrackMotionCurveUserData *)userdata; + if (!clip_graph_value_visible(data->sc, value_source)) { + return; + } + immVertex2f(data->pos, scene_framenr, val); } -- cgit v1.2.3