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

index 345d9fe39dea86f1522eca1066bb1c003483731e,175dab28cbe36a6113e0d3efb06ed29b784b949e..de5d5d29e52ba110457d1a1055039f770871416e
@@@ -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);
index 68a40f3336872476564b933a37596ede6d522367,b81d84a1436747a96fa8071258ccf9a4118477d0..d4bb213e5c72a8b1b0abcc7f22994ee4ad1fba1f
@@@ -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;
        }