diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-10-26 16:36:50 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-10-26 16:36:50 +0400 |
commit | 9b110f2f64812eef5dfc02a4f2fcbd6d64fb4d35 (patch) | |
tree | 86259fd2c85b55f76a5fc64cc02224e9c8fd9f52 /source | |
parent | de72ffa69b70f0b059d0cf1a4f14cdc3073d4da8 (diff) |
Camera tracking fixes
- Dopesheet should be invalidated after solution
- Prevent crash when non-camera object is set as scene camera
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/tracking.c | 5 | ||||
-rw-r--r-- | source/blender/editors/space_clip/tracking_ops.c | 3 |
2 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c index e6904a23d51..9d422b0d28d 100644 --- a/source/blender/blenkernel/intern/tracking.c +++ b/source/blender/blenkernel/intern/tracking.c @@ -2138,7 +2138,7 @@ void BKE_tracking_context_sync(MovieTrackingContext *context) context->sync_frame = newframe; - tracking->dopesheet.ok = FALSE; + BKE_tracking_dopesheet_tag_update(tracking); } void BKE_tracking_context_sync_user(const MovieTrackingContext *context, MovieClipUser *user) @@ -2953,6 +2953,7 @@ int BKE_tracking_reconstruction_finish(MovieReconstructContext *context, MovieTr MovieTrackingReconstruction *reconstruction; tracks_map_merge(context->tracks_map, tracking); + BKE_tracking_dopesheet_tag_update(tracking); if (context->is_camera) { reconstruction = &tracking->reconstruction; @@ -3651,7 +3652,7 @@ static void channels_segments_calc(MovieTrackingDopesheetChannel *channel) } } -static void tracking_dopesheet_sort(MovieTracking *tracking, int sort_method, int inverse) +static void tracking_dopesheet_sort(MovieTracking *tracking, int sort_method, int inverse) { MovieTrackingDopesheet *dopesheet = &tracking->dopesheet; diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c index 521b1383db8..2f1265b6a4d 100644 --- a/source/blender/editors/space_clip/tracking_ops.c +++ b/source/blender/editors/space_clip/tracking_ops.c @@ -1396,7 +1396,6 @@ static void solve_camera_freejob(void *scv) } solved = BKE_tracking_reconstruction_finish(scj->context, tracking); - if (!solved) BKE_report(scj->reports, RPT_WARNING, "Some data failed to reconstruct, see console for details"); else @@ -1410,7 +1409,7 @@ static void solve_camera_freejob(void *scv) id_us_plus(&clip->id); /* set blender camera focal length so result would look fine there */ - if (scene->camera) { + if (scene->camera && GS(scene->camera->id.name) == ID_CA) { Camera *camera = (Camera *)scene->camera->data; int width, height; |