diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-12-31 12:26:32 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-12-31 12:26:32 +0400 |
commit | 70d13da457921bca2c911c025264f852c1e0731c (patch) | |
tree | fa827f69bb632e65113780a83a406da8927bb5d3 /source/blender/editors/space_clip | |
parent | 33b1717d59332e079c0286c89418b06dea39299c (diff) |
Do not set scene's camera on camera solving and cursor snapping
Diffstat (limited to 'source/blender/editors/space_clip')
-rw-r--r-- | source/blender/editors/space_clip/tracking_ops.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c index 2178d6d9cc6..d6940d14dbf 100644 --- a/source/blender/editors/space_clip/tracking_ops.c +++ b/source/blender/editors/space_clip/tracking_ops.c @@ -1613,9 +1613,6 @@ 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) - scene->camera= scene_find_camera(scene); - if(scene->camera) { Camera *camera= (Camera*)scene->camera->data; int width, height; @@ -2468,16 +2465,16 @@ static int do_set_scale(bContext *C, wmOperator *op, int scale_solution) if(tracking_object->flag&TRACKING_OBJECT_CAMERA) { mul_v3_fl(object->size, scale); mul_v3_fl(object->loc, scale); - } else - if(!scale_solution){ - Object *camera= object_solver_camera(scene, object); + } + else if(!scale_solution){ + Object *solver_camera= object_solver_camera(scene, object); object->size[0]= object->size[1]= object->size[2]= 1.0f/scale; - if(camera) { - object->size[0]/= camera->size[0]; - object->size[1]/= camera->size[1]; - object->size[2]/= camera->size[2]; + if(solver_camera) { + object->size[0]/= solver_camera->size[0]; + object->size[1]/= solver_camera->size[1]; + object->size[2]/= solver_camera->size[2]; } } else { |