Merge branch 'master' into blender2.8
authorCampbell Barton <ideasman42@gmail.com>
Wed, 5 Dec 2018 00:03:48 +0000 (11:03 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 5 Dec 2018 00:03:48 +0000 (11:03 +1100)
1  2 
source/blender/editors/space_view3d/view3d_fly.c
source/blender/editors/space_view3d/view3d_walk.c

@@@ -195,8 -240,8 +195,8 @@@ static void drawFlyPixel(const struct b
        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);
 +              ED_view3d_calc_camera_border(fly->scene, fly->depsgraph, fly->ar, fly->v3d, fly->rv3d, &viewborder, false);
                xoff = viewborder.xmin;
                yoff = viewborder.ymin;
        }
@@@ -377,8 -411,8 +376,8 @@@ static bool initFlyInfo(bContext *C, Fl
                (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);
 +              ED_view3d_calc_camera_border(fly->scene, fly->depsgraph, fly->ar, fly->v3d, fly->rv3d, &viewborder, false);
  
                fly->width = BLI_rctf_size_x(&viewborder);
                fly->height = BLI_rctf_size_y(&viewborder);
@@@ -280,8 -327,8 +280,8 @@@ static void drawWalkPixel(const struct 
        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);
 +              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;
        }