diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2020-02-07 14:20:05 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2020-02-07 15:15:54 +0300 |
commit | 3e738a60d06acc3ebecc8f4e23bf0262d7b57f3c (patch) | |
tree | f8007c90420b779ade2da9a86f482b107d78b17a /source | |
parent | dfa7e1cd9f6d495c6bdf01a140fdc59b0cced38f (diff) |
Cleanup: Tracking, reduce scope of variables
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/tracking.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c index 37ca6b1885d..9caecb73e89 100644 --- a/source/blender/blenkernel/intern/tracking.c +++ b/source/blender/blenkernel/intern/tracking.c @@ -836,7 +836,7 @@ void BKE_tracking_tracks_join(MovieTracking *tracking, MovieTrackingMarker *marker_a, *marker_b; int start_a = a, start_b = b, len = 0, frame = src_track->markers[a].framenr; - int j, inverse = 0; + int inverse = 0; inverse = (b == 0) || (dst_track->markers[b - 1].flag & MARKER_DISABLED) || (dst_track->markers[b - 1].framenr != frame - 1); @@ -864,7 +864,7 @@ void BKE_tracking_tracks_join(MovieTracking *tracking, b = start_b; /* linear interpolation for intersecting frames */ - for (j = 0; j < len; j++) { + for (int j = 0; j < len; j++) { float fac = 0.5f; if (len > 1) { @@ -2897,8 +2897,6 @@ static void tracking_dopesheet_channels_calc(MovieTracking *tracking) bool show_hidden = (dopesheet->flag & TRACKING_DOPE_SHOW_HIDDEN) != 0; for (MovieTrackingTrack *track = tracksbase->first; track; track = track->next) { - MovieTrackingDopesheetChannel *channel; - if (!show_hidden && (track->flag & TRACK_HIDDEN) != 0) { continue; } @@ -2907,7 +2905,8 @@ static void tracking_dopesheet_channels_calc(MovieTracking *tracking) continue; } - channel = MEM_callocN(sizeof(MovieTrackingDopesheetChannel), "tracking dopesheet channel"); + MovieTrackingDopesheetChannel *channel = MEM_callocN(sizeof(MovieTrackingDopesheetChannel), + "tracking dopesheet channel"); channel->track = track; if (reconstruction->flag & TRACKING_RECONSTRUCTED) { |