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>2014-09-03 10:40:06 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-09-03 10:40:47 +0400
commit8bda880b57acb79a9273587a5d8d42cf351d0e77 (patch)
treef4f8d971e64cbc1c572de4b3571985eb9466a801
parent802ac0cb8f7e910c5d2c0a26915bd7ec9722b6d4 (diff)
Skip distortion of the grease pencil associated with the track
-rw-r--r--source/blender/editors/space_clip/clip_draw.c26
1 files changed, 7 insertions, 19 deletions
diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c
index b5c08e7a08a..a35251e71ef 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) {