diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-12-05 00:36:37 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-12-05 00:36:37 +0300 |
commit | 45c11c1a1bd07cca255abdb1923e69f0242c36fd (patch) | |
tree | ad7192373298e04b927436d5129b0c1afb0b98c6 /source | |
parent | 22bba02bc8109f392fce50a24a4825390bca1bda (diff) |
Fix T49624: Fly uses camera settings outside camera view
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_fly.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_walk.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_view3d/view3d_fly.c b/source/blender/editors/space_view3d/view3d_fly.c index 320c00240c1..175dab28cbe 100644 --- a/source/blender/editors/space_view3d/view3d_fly.c +++ b/source/blender/editors/space_view3d/view3d_fly.c @@ -240,7 +240,7 @@ static void drawFlyPixel(const struct bContext *UNUSED(C), ARegion *UNUSED(ar), int xoff, yoff; float x1, x2, y1, y2; - if (fly->scene->camera) { + if (ED_view3d_cameracontrol_object_get(fly->v3d_camera_control)) { ED_view3d_calc_camera_border(fly->scene, fly->ar, fly->v3d, fly->rv3d, &viewborder, false); xoff = viewborder.xmin; yoff = viewborder.ymin; @@ -411,7 +411,7 @@ static bool initFlyInfo(bContext *C, FlyInfo *fly, wmOperator *op, const wmEvent (U.uiflag & USER_CAM_LOCK_NO_PARENT) == 0); /* calculate center */ - if (fly->scene->camera) { + if (ED_view3d_cameracontrol_object_get(fly->v3d_camera_control)) { ED_view3d_calc_camera_border(fly->scene, fly->ar, fly->v3d, fly->rv3d, &viewborder, false); fly->width = BLI_rctf_size_x(&viewborder); diff --git a/source/blender/editors/space_view3d/view3d_walk.c b/source/blender/editors/space_view3d/view3d_walk.c index 33173ad3fd6..b81d84a1436 100644 --- a/source/blender/editors/space_view3d/view3d_walk.c +++ b/source/blender/editors/space_view3d/view3d_walk.c @@ -327,7 +327,7 @@ static void drawWalkPixel(const struct bContext *UNUSED(C), ARegion *ar, void *a int xoff, yoff; rctf viewborder; - if (walk->scene->camera) { + if (ED_view3d_cameracontrol_object_get(walk->v3d_camera_control)) { ED_view3d_calc_camera_border(walk->scene, ar, walk->v3d, walk->rv3d, &viewborder, false); xoff = viewborder.xmin + BLI_rctf_size_x(&viewborder) * 0.5f; yoff = viewborder.ymin + BLI_rctf_size_y(&viewborder) * 0.5f; |