Merging r47572 through r47580 form trunk into soc-2011-tomato
[blender.git] / source / blender / blenkernel / intern / movieclip.c
index 985fc433c13ffbde18c913daddb3373be5b8f1e4..84d6141b470316d532afda712bcf7e5ba2dee4ec 100644 (file)
@@ -1087,10 +1087,18 @@ void BKE_movieclip_update_scopes(MovieClip *clip, MovieClipUser *user, MovieClip
                        }
 
                        if ((track->flag & TRACK_LOCKED) == 0) {
+                               float pat_min[2], pat_max[2];
+
                                scopes->marker = marker;
                                scopes->track = track;
-                               scopes->slide_scale[0] = track->pat_max[0] - track->pat_min[0];
-                               scopes->slide_scale[1] = track->pat_max[1] - track->pat_min[1];
+
+                               /* XXX: would work fine with non-transformed patterns, but would likely fail
+                                *      with transformed patterns, but that would be easier to debug when
+                                *      we'll have real pattern sampling (at least to test) */
+                               BKE_tracking_marker_pattern_minmax(marker, pat_min, pat_max);
+
+                               scopes->slide_scale[0] = pat_max[0] - pat_min[0];
+                               scopes->slide_scale[1] = pat_max[1] - pat_min[1];
                        }
                }
        }