Fix camera curve in clip editor not being remapped by a clip's start frame
authorSergey Sharybin <sergey.vfx@gmail.com>
Tue, 12 Jun 2012 21:07:14 +0000 (21:07 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Tue, 12 Jun 2012 21:07:14 +0000 (21:07 +0000)
source/blender/editors/space_clip/clip_graph_draw.c

index ce48681c5bddc7ee3acc36ffe1ad8cb3ff0bfde6..d3d01f9f87eb4f12b4e09f104d57c1b545380c47 100644 (file)
@@ -189,6 +189,7 @@ static void draw_frame_curves(SpaceClip *sc)
 
        for (i = 0; i < reconstruction->camnr; i++) {
                MovieReconstructedCamera *camera = &reconstruction->cameras[i];
+               int framenr;
 
                if (lines && camera->framenr != prevfra + 1) {
                        glEnd();
@@ -200,7 +201,8 @@ static void draw_frame_curves(SpaceClip *sc)
                        lines = 1;
                }
 
-               glVertex2f(camera->framenr, camera->error);
+               framenr = BKE_movieclip_remap_clip_to_scene_frame(clip, camera->framenr);
+               glVertex2f(framenr, camera->error);
 
                prevfra = camera->framenr;
        }