diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-07-30 14:00:22 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-07-30 14:00:22 +0300 |
commit | 51be0a765e44512dbc2b89ff9c3f8b225f7b7565 (patch) | |
tree | 549ce60bccc972ad140063b0aa304e3bf44e02ff /source/blender/editors/space_clip | |
parent | edb3b7a323a1808da9e9ab7c8b268cafc1671207 (diff) |
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.
Diffstat (limited to 'source/blender/editors/space_clip')
-rw-r--r-- | source/blender/editors/space_clip/clip_graph_draw.c | 6 |
1 files changed, 5 insertions, 1 deletions
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); } |