diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-12-04 18:02:05 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-12-04 18:02:05 +0300 |
commit | 8600dc6365a544fdee2ec2d00b5b7b980f61613e (patch) | |
tree | 5104566d0ea4e1c854e58db933006f7bb77e80c0 /source/blender/blenkernel | |
parent | 2f637004d57b4220e483dc60f72edc86b88d3102 (diff) |
Fix T42800: Blender suddenly closes after pressing solve camera motion
Couple of issues:
- Fist/last frame calculation was wrong
- Keyframe selection might silently fail leading to unpredictable math
errors all over the place. Now if keyframe selection fails solver wouldn't
run.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/tracking_solver.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/tracking_solver.c b/source/blender/blenkernel/intern/tracking_solver.c index 6d4e7efa815..d5e2f24e9ed 100644 --- a/source/blender/blenkernel/intern/tracking_solver.c +++ b/source/blender/blenkernel/intern/tracking_solver.c @@ -391,7 +391,7 @@ MovieReconstructContext *BKE_tracking_reconstruction_context_new(MovieClip *clip last_marker--; } - if (first < track->markersnr - 1) + if (first <= track->markersnr - 1) sfra = min_ii(sfra, first_marker->framenr); if (last >= 0) @@ -509,6 +509,11 @@ bool BKE_tracking_reconstruction_finish(MovieReconstructContext *context, MovieT MovieTrackingReconstruction *reconstruction; MovieTrackingObject *object; + if (!libmv_reconstructionIsValid(context->reconstruction)) { + printf("Failed solve the motion: most likely there are no good keyframes\n"); + return false; + } + tracks_map_merge(context->tracks_map, tracking); BKE_tracking_dopesheet_tag_update(tracking); |