From ff9cf0664529db88bd2ea6e13dde6f002054c745 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 27 Nov 2017 08:50:01 +0100 Subject: Tracking: Cleanup. make code friendly for multi-column editing --- source/blender/blenkernel/intern/tracking_auto.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/intern/tracking_auto.c b/source/blender/blenkernel/intern/tracking_auto.c index 50451b90581..4ff4a129768 100644 --- a/source/blender/blenkernel/intern/tracking_auto.c +++ b/source/blender/blenkernel/intern/tracking_auto.c @@ -449,8 +449,10 @@ static void autotrack_context_step_cb(void *userdata, int track) options->failed_frame = frame + frame_delta; } - /* Note: Atomic is probably not actually needed here, I doubt we could get any other result than a true bool anyway. - * But for sake of consistency, and since it costs nothing... */ + /* Note: Atomic is probably not actually needed here, I doubt we could get + * any other result than a true bool anyway. + * But for sake of consistency, and since it costs nothing... + */ atomic_fetch_and_or_uint8((uint8_t *)&context->step_ok, true); } @@ -459,7 +461,10 @@ bool BKE_autotrack_context_step(AutoTrackContext *context) const int frame_delta = context->backwards ? -1 : 1; context->step_ok = false; - BLI_task_parallel_range(0, context->num_tracks, context, autotrack_context_step_cb, context->num_tracks > 1); + BLI_task_parallel_range(0, context->num_tracks, + context, + autotrack_context_step_cb, + context->num_tracks > 1); /* Advance the frame. */ BLI_spin_lock(&context->spin_lock); @@ -567,8 +572,9 @@ void BKE_autotrack_context_finish(AutoTrackContext *context) if ((plane_track->flag & PLANE_TRACK_AUTOKEY) == 0) { int track; for (track = 0; track < context->num_tracks; ++track) { - if (BKE_tracking_plane_track_has_point_track(plane_track, - context->options[track].track)) + if (BKE_tracking_plane_track_has_point_track( + plane_track, + context->options[track].track)) { BKE_tracking_track_plane_from_existing_motion( plane_track, -- cgit v1.2.3