[Bf-blender-cvs] [51be0a765e4] master: Tracking: Fix wrong usage of draw buffers

Sergey Sharybin noreply at git.blender.org
Tue Jul 30 13:01:45 CEST 2019


Commit: 51be0a765e44512dbc2b89ff9c3f8b225f7b7565
Author: Sergey Sharybin
Date:   Tue Jul 30 13:00:22 2019 +0200
Branches: master
https://developer.blender.org/rB51be0a765e44512dbc2b89ff9c3f8b225f7b7565

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.

===================================================================

M	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);
 }



More information about the Bf-blender-cvs mailing list