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-12-15 12:39:59 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2014-12-15 12:39:59 +0300
commitc167ac155696dac2ded87ca2de1626d5fb3b23cf (patch)
tree435a2f24d0b7cc28d728d60a9cdac81aa7037caf /source/blender/blenkernel/intern/tracking_auto.c
parent06ea819c0d717b831447e1a2d424e2f4979b27cd (diff)
Tracking: Fix wrong logic in tracks synchronization
There was some stupidness in the way how tracks are synchronized from the job to actual DNA data leading to all sort of weird and wonderful failures again.
Diffstat (limited to 'source/blender/blenkernel/intern/tracking_auto.c')
-rw-r--r--source/blender/blenkernel/intern/tracking_auto.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/source/blender/blenkernel/intern/tracking_auto.c b/source/blender/blenkernel/intern/tracking_auto.c
index 8f84b222015..22a380ea835 100644
--- a/source/blender/blenkernel/intern/tracking_auto.c
+++ b/source/blender/blenkernel/intern/tracking_auto.c
@@ -431,7 +431,7 @@ bool BKE_autotrack_context_step(AutoTrackContext *context)
}
else {
options->is_failed = true;
- options->failed_frame = frame;
+ options->failed_frame = frame + frame_delta;
}
ok = true;
}
@@ -463,22 +463,18 @@ void BKE_autotrack_context_sync(AutoTrackContext *context)
AutoTrackOptions *options = &context->options[track];
int track_frame = BKE_movieclip_remap_scene_to_clip_frame(
context->clips[options->clip_index], frame);
- if (options->is_failed) {
- if (options->failed_frame == track_frame) {
- MovieTrackingMarker *prev_marker =
- BKE_tracking_marker_get_exact(
- options->track,
- frame);
- if (prev_marker) {
- marker = *prev_marker;
- marker.framenr = context->backwards ?
- track_frame - 1 :
- track_frame + 1;
- marker.flag |= MARKER_DISABLED;
- BKE_tracking_marker_insert(options->track, &marker);
- }
+ if (options->is_failed && options->failed_frame == track_frame) {
+ MovieTrackingMarker *prev_marker =
+ BKE_tracking_marker_get_exact(options->track, frame);
+ if (prev_marker) {
+ marker = *prev_marker;
+ marker.framenr = context->backwards ?
+ track_frame - 1 :
+ track_frame + 1;
+ marker.flag |= MARKER_DISABLED;
+ BKE_tracking_marker_insert(options->track, &marker);
+ continue;
}
- continue;
}
if (libmv_autoTrackGetMarker(context->autotrack,
clip,