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:
authorSergey Sharybin <sergey.vfx@gmail.com>2019-07-30 14:00:22 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-07-30 14:00:22 +0300
commit51be0a765e44512dbc2b89ff9c3f8b225f7b7565 (patch)
tree549ce60bccc972ad140063b0aa304e3bf44e02ff /source/blender/editors/space_clip/clip_graph_draw.c
parentedb3b7a323a1808da9e9ab7c8b268cafc1671207 (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/clip_graph_draw.c')
-rw-r--r--source/blender/editors/space_clip/clip_graph_draw.c6
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);
}