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>2020-02-10 14:36:49 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2020-02-10 14:48:45 +0300
commita605775298f3f335b33270be7686c52ada10a45d (patch)
tree36c8ec5eb4c4f024304c853192a24e18b34bd0a4 /source/blender/blenkernel
parent379ee3e52779050c63f531454c9c60e310601e77 (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')
-rw-r--r--source/blender/blenkernel/BKE_tracking.h4
-rw-r--r--source/blender/blenkernel/intern/constraint.c2
-rw-r--r--source/blender/blenkernel/intern/tracking.c19
3 files changed, 5 insertions, 20 deletions
diff --git a/source/blender/blenkernel/BKE_tracking.h b/source/blender/blenkernel/BKE_tracking.h
index c64d684de5a..2091078fd30 100644
--- a/source/blender/blenkernel/BKE_tracking.h
+++ b/source/blender/blenkernel/BKE_tracking.h
@@ -56,9 +56,7 @@ struct MovieTrackingReconstruction *BKE_tracking_get_active_reconstruction(
struct MovieTracking *tracking);
/* matrices for constraints and drawing */
-void BKE_tracking_get_camera_object_matrix(struct Scene *scene,
- struct Object *ob,
- float mat[4][4]);
+void BKE_tracking_get_camera_object_matrix(struct Object *ob, float mat[4][4]);
void BKE_tracking_get_projection_matrix(struct MovieTracking *tracking,
struct MovieTrackingObject *object,
int framenr,
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index 708d0600e91..229578a38b7 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -4611,7 +4611,7 @@ static void followtrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase
cob->matrix, track->bundle_pos[0], track->bundle_pos[1], track->bundle_pos[2]);
}
else {
- BKE_tracking_get_camera_object_matrix(cob->scene, camob, mat);
+ BKE_tracking_get_camera_object_matrix(camob, mat);
mul_m4_m4m4(cob->matrix, obmat, mat);
translate_m4(
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