3D View: locked camera was using the original view offset

Now used the original dist instead, since using the distance between
the camera and the views offset may seem random from the users POV.

This addresses strange behavior noticed in T56934.
This commit is contained in:
Campbell Barton
2018-11-30 18:11:04 +11:00
parent 6e253fc627
commit 3f31c28a02
3 changed files with 3 additions and 3 deletions

View File

@@ -402,7 +402,7 @@ static void viewops_data_create(
/* set the view from the camera, if view locking is enabled.
* we may want to make this optional but for now its needed always */
ED_view3d_camera_lock_init(vod->v3d, vod->rv3d);
ED_view3d_camera_lock_init_ex(vod->v3d, vod->rv3d, false);
vod->init.dist = rv3d->dist;
vod->init.camzoom = rv3d->camzoom;

View File

@@ -460,7 +460,7 @@ void ED_view3d_camera_lock_init_ex(View3D *v3d, RegionView3D *rv3d, const bool c
void ED_view3d_camera_lock_init(View3D *v3d, RegionView3D *rv3d)
{
ED_view3d_camera_lock_init_ex(v3d, rv3d, true);
ED_view3d_camera_lock_init_ex(v3d, rv3d, false);
}
/**

View File

@@ -156,7 +156,7 @@ void ED_view3d_smooth_view_ex(
* we allow camera option locking to initialize the view settings from the camera.
*/
if (sview->camera == NULL && sview->camera_old == NULL) {
ED_view3d_camera_lock_init(v3d, rv3d);
ED_view3d_camera_lock_init_ex(v3d, rv3d, true);
}
/* store the options we want to end with */