From 971065ec9a596fc9009ed542dfa1f3ab32ef96c8 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 18 Nov 2011 08:48:33 +0000 Subject: Set floor fails to make camera be in positive Z half-space if it was parented to other object. --- source/blender/editors/space_clip/tracking_ops.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c index 7ef7e69c143..43df8b0ea47 100644 --- a/source/blender/editors/space_clip/tracking_ops.c +++ b/source/blender/editors/space_clip/tracking_ops.c @@ -1919,11 +1919,10 @@ static int set_floor_exec(bContext *C, wmOperator *op) object_apply_mat4(parent, newmat, 0, 0); /* make camera have positive z-coordinate */ - mul_v3_m4v3(vec[0], mat, camera->loc); - if(camera->loc[2]<0) { + if(parent->loc[2]<0) { invert_m4(rot); mul_m4_m4m4(newmat, mat, rot); - object_apply_mat4(camera, newmat, 0, 0); + object_apply_mat4(parent, newmat, 0, 0); } where_is_object(scene, parent); -- cgit v1.2.3