diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2020-02-10 14:36:49 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2020-02-10 14:48:45 +0300 |
commit | a605775298f3f335b33270be7686c52ada10a45d (patch) | |
tree | 36c8ec5eb4c4f024304c853192a24e18b34bd0a4 /source/blender/blenkernel/intern/tracking.c | |
parent | 379ee3e52779050c63f531454c9c60e310601e77 (diff) |
Tracking: Fix usage PLACEHOLDER function
Don't use BKE_view_layer_context_active_PLACEHOLDER which is marked
as "never use this".
In fact, it isn't needed to lookup for camera in the tracking function
at all: camera object is always explicitly passed to it.
Diffstat (limited to 'source/blender/blenkernel/intern/tracking.c')
-rw-r--r-- | source/blender/blenkernel/intern/tracking.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c index 86fb2ab58bc..731051f2f34 100644 --- a/source/blender/blenkernel/intern/tracking.c +++ b/source/blender/blenkernel/intern/tracking.c @@ -395,23 +395,10 @@ MovieTrackingReconstruction *BKE_tracking_get_active_reconstruction(MovieTrackin /* Get transformation matrix for a given object which is used * for parenting motion tracker reconstruction to 3D world. */ -void BKE_tracking_get_camera_object_matrix(Scene *scene, Object *ob, float mat[4][4]) +void BKE_tracking_get_camera_object_matrix(Object *ob, float mat[4][4]) { - if (!ob) { - if (scene->camera) { - ob = scene->camera; - } - else { - ob = BKE_view_layer_camera_find(BKE_view_layer_context_active_PLACEHOLDER(scene)); - } - } - - if (ob) { - BKE_object_where_is_calc_mat4(ob, mat); - } - else { - unit_m4(mat); - } + BLI_assert(ob != NULL); + BKE_object_where_is_calc_mat4(ob, mat); } /* Get projection matrix for camera specified by given tracking object |