[Bf-blender-cvs] [8bda880] master: Skip distortion of the grease pencil associated with the track

Sergey Sharybin noreply at git.blender.org
Wed Sep 3 08:40:54 CEST 2014


Commit: 8bda880b57acb79a9273587a5d8d42cf351d0e77
Author: Sergey Sharybin
Date:   Wed Sep 3 12:40:06 2014 +0600
Branches: master
https://developer.blender.org/rB8bda880b57acb79a9273587a5d8d42cf351d0e77

Skip distortion of the grease pencil associated with the track

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

M	source/blender/editors/space_clip/clip_draw.c

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

diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c
index b5c08e7..a35251e 100644
--- a/source/blender/editors/space_clip/clip_draw.c
+++ b/source/blender/editors/space_clip/clip_draw.c
@@ -1595,21 +1595,7 @@ static void draw_distortion(SpaceClip *sc, ARegion *ar, MovieClip *clip,
 		}
 	}
 
-	if (sc->gpencil_src == SC_GPENCIL_SRC_TRACK) {
-		MovieTrackingTrack *track = BKE_tracking_track_get_active(&sc->clip->tracking);
-
-		if (track) {
-			int framenr = ED_space_clip_get_clip_frame_number(sc);
-			MovieTrackingMarker *marker = BKE_tracking_marker_get(track, framenr);
-
-			offsx = marker->pos[0];
-			offsy = marker->pos[1];
-
-			gpd = track->gpd;
-		}
-
-	}
-	else {
+	if (sc->gpencil_src != SC_GPENCIL_SRC_TRACK) {
 		gpd = clip->gpd;
 	}
 
@@ -1778,13 +1764,15 @@ void clip_draw_grease_pencil(bContext *C, int onlyv2d)
 		return;
 
 	if (onlyv2d) {
-		/* if manual calibration is used then grease pencil data is already
-		 * drawn in draw_distortion */
-		if ((sc->flag & SC_MANUAL_CALIBRATION) == 0) {
+		bool is_track_source = sc->gpencil_src == SC_GPENCIL_SRC_TRACK;
+		/* if manual calibration is used then grease pencil data
+		 * associated with the clip is already drawn in draw_distortion
+		 */
+		if ((sc->flag & SC_MANUAL_CALIBRATION) == 0 || is_track_source) {
 			glPushMatrix();
 			glMultMatrixf(sc->unistabmat);
 
-			if (sc->gpencil_src == SC_GPENCIL_SRC_TRACK) {
+			if (is_track_source) {
 				MovieTrackingTrack *track = BKE_tracking_track_get_active(&sc->clip->tracking);
 
 				if (track) {




More information about the Bf-blender-cvs mailing list