Camera tracking integration
authorSergey Sharybin <sergey.vfx@gmail.com>
Sat, 30 Jul 2011 14:22:15 +0000 (14:22 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Sat, 30 Jul 2011 14:22:15 +0000 (14:22 +0000)
===========================

- Fixed bug with transforming several markers at the same time.
  (Memory access issue, index was chacging in wrong way).
- Do not check result of BKE_tracking_get_marker -- it should
  always return valid marker.

source/blender/editors/transform/transform_conversions.c

index 19e573a9d6e333f4e86d6f8d9b090f7c96260afd..839dd7f6a704b0f19115d3e82d3d312a20abff72 100644 (file)
@@ -5358,28 +5358,26 @@ static void createTransTrackingData(bContext *C, TransInfo *t)
                if(TRACK_SELECTED(track) && (track->flag&TRACK_LOCKED)==0) {
                        marker= BKE_tracking_get_marker(track, framenr);
 
-                       if(marker) {
-                               trackToTransData(sc, td, td2d, tdt, track);
+                       trackToTransData(sc, td, td2d, tdt, track);
 
-                               td++;
-                               td2d++;
-                               tdt++;
+                       td++;
+                       td2d++;
+                       tdt++;
 
-                               if((marker->flag&MARKER_DISABLED)==0) {
-                                       if(track->flag&SELECT) {td++; td2d++; tdt+=2;}
-                                       if(track->pat_flag&SELECT) {td+= 2; td2d+= 2;tdt+=2;}
-                               }
+                       if((marker->flag&MARKER_DISABLED)==0) {
+                               if(track->flag&SELECT) {td++; td2d++; tdt++;}
+                               if(track->pat_flag&SELECT) {td+= 2; td2d+= 2;tdt+=2;}
+                       }
 
-                               if(track->search_flag&SELECT) {
-                                       td+= 2;
-                                       td2d+= 2;
-                                       tdt+= 2;
+                       if(track->search_flag&SELECT) {
+                               td+= 2;
+                               td2d+= 2;
+                               tdt+= 2;
 
-                                       if(marker->flag&MARKER_DISABLED) {
-                                               td+= 3;
-                                               td2d+= 3;
-                                               tdt+= 3;
-                                       }
+                               if(marker->flag&MARKER_DISABLED) {
+                                       td+= 3;
+                                       td2d+= 3;
+                                       tdt+= 3;
                                };
                        }
                }