diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-01-25 17:37:11 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-01-25 17:37:11 +0400 |
commit | bce89860f52b150ea7da7bbeefd2cdd62b75ae33 (patch) | |
tree | fc5a694b6a4ac65cadb7272eb98101306f3cb226 /source/blender/blenkernel/intern/tracking.c | |
parent | b8586f4ec347430b2bf00494ab885bd787f26869 (diff) |
Various fixes for camera tracking stuff
- Fixed tooltip displaying for track sequence forwards in clip editor
- Corrected detection of 8 tracks so it wouldn't count tracks disabled
on keyframes.
- Scale track preview to actual track widget size instead of scaling the
whole preview image with given zoom ratio, so no extra memory needed to
store zoomed margin would be used.
- Track's statistics text will fit pattern position instead of search if
marker is disabled on current frame.
- Fixed toggle selection operator if selected track is hidden due to
"Hide Disabled" policy.
Diffstat (limited to 'source/blender/blenkernel/intern/tracking.c')
-rw-r--r-- | source/blender/blenkernel/intern/tracking.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c index 370463b650c..ea3f076523f 100644 --- a/source/blender/blenkernel/intern/tracking.c +++ b/source/blender/blenkernel/intern/tracking.c @@ -395,6 +395,13 @@ int BKE_tracking_has_marker(MovieTrackingTrack *track, int framenr) return BKE_tracking_exact_marker(track, framenr) != 0; } +int BKE_tracking_has_enabled_marker(MovieTrackingTrack *track, int framenr) +{ + MovieTrackingMarker *marker = BKE_tracking_exact_marker(track, framenr); + + return marker && (marker->flag & MARKER_DISABLED) == 0; +} + void BKE_tracking_free_track(MovieTrackingTrack *track) { if(track->markers) MEM_freeN(track->markers); @@ -1741,8 +1748,8 @@ static int count_tracks_on_both_keyframes(MovieTracking *tracking, ListBase *tra track= tracksbase->first; while(track) { - if(BKE_tracking_has_marker(track, frame1)) - if(BKE_tracking_has_marker(track, frame2)) + if(BKE_tracking_has_enabled_marker(track, frame1)) + if(BKE_tracking_has_enabled_marker(track, frame2)) tot++; track= track->next; @@ -1758,7 +1765,7 @@ int BKE_tracking_can_reconstruct(MovieTracking *tracking, MovieTrackingObject *o ListBase *tracksbase= BKE_tracking_object_tracks(tracking, object); if(count_tracks_on_both_keyframes(tracking, tracksbase)<8) { - BLI_strncpy(error_msg, "At least 8 tracks on both of keyframes are needed for reconstruction", error_size); + BLI_strncpy(error_msg, "At least 8 common tracks on both of keyframes are needed for reconstruction", error_size); return 0; } |