Merging r47572 through r47580 form trunk into soc-2011-tomato
[blender.git] / source / blender / editors / space_clip / clip_draw.c
index 3f3bacfabdf18db0ba6a7a79307dc0a86c57f733..9332413b33bca7910918ca7af3dcfc8f25d053fd 100644 (file)
@@ -1451,7 +1451,6 @@ void clip_draw_grease_pencil(bContext *C, int onlyv2d)
 {
        SpaceClip *sc = CTX_wm_space_clip(C);
        MovieClip *clip = ED_space_clip(sc);
-       ImBuf *ibuf;
 
        if (!clip)
                return;
@@ -1460,28 +1459,23 @@ void clip_draw_grease_pencil(bContext *C, int onlyv2d)
                /* if manual calibration is used then grease pencil data is already
                 * drawed in draw_distortion */
                if ((sc->flag & SC_MANUAL_CALIBRATION) == 0 || sc->mode != SC_MODE_DISTORTION) {
-                       ibuf = ED_space_clip_get_buffer(sc);
-
-                       if (ibuf) {
-                               glPushMatrix();
-                               glMultMatrixf(sc->unistabmat);
+                       glPushMatrix();
+                       glMultMatrixf(sc->unistabmat);
 
-                               if (sc->gpencil_src == SC_GPENCIL_SRC_TRACK) {
-                                       MovieTrackingTrack *track = BKE_tracking_active_track(&sc->clip->tracking);
+                       if (sc->gpencil_src == SC_GPENCIL_SRC_TRACK) {
+                               MovieTrackingTrack *track = BKE_tracking_active_track(&sc->clip->tracking);
 
-                                       if (track) {
-                                               int framenr = sc->user.framenr;
-                                               MovieTrackingMarker *marker = BKE_tracking_exact_marker(track, framenr);
+                               if (track) {
+                                       int framenr = sc->user.framenr;
+                                       MovieTrackingMarker *marker = BKE_tracking_exact_marker(track, framenr);
 
-                                               glTranslatef(marker->pos[0], marker->pos[1], 0.0f);
-                                       }
+                                       glTranslatef(marker->pos[0], marker->pos[1], 0.0f);
                                }
+                       }
 
-                               draw_gpencil_2dimage(C, ibuf);
+                       draw_gpencil_2dimage(C);
 
-                               IMB_freeImBuf(ibuf);
-                               glPopMatrix();
-                       }
+                       glPopMatrix();
                }
        }
        else {