diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-12-05 03:03:48 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-12-05 03:03:48 +0300 |
commit | 9c963d363e9f392318ffd3c8f2ed15e1b84e5a51 (patch) | |
tree | d58a81e53137cdcc7746f7beb6a7966203651586 /source/blender/editors/space_view3d | |
parent | b83cf9d340c54ec3cd5e2cde98d6dfb0e739c4bf (diff) | |
parent | 45c11c1a1bd07cca255abdb1923e69f0242c36fd (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_fly.c | 5 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_walk.c | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/editors/space_view3d/view3d_fly.c b/source/blender/editors/space_view3d/view3d_fly.c index 345d9fe39de..de5d5d29e52 100644 --- a/source/blender/editors/space_view3d/view3d_fly.c +++ b/source/blender/editors/space_view3d/view3d_fly.c @@ -195,7 +195,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->depsgraph, fly->ar, fly->v3d, fly->rv3d, &viewborder, false); xoff = viewborder.xmin; yoff = viewborder.ymin; @@ -297,7 +297,6 @@ enum { static bool initFlyInfo(bContext *C, FlyInfo *fly, wmOperator *op, const wmEvent *event) { wmWindow *win = CTX_wm_window(C); - rctf viewborder; float upvec[3]; /* tmp */ @@ -377,7 +376,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->depsgraph, 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 68a40f33368..d4bb213e5c7 100644 --- a/source/blender/editors/space_view3d/view3d_walk.c +++ b/source/blender/editors/space_view3d/view3d_walk.c @@ -280,7 +280,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, walk->depsgraph, 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; |