Fix T38905: view3d.object_as_camera didn't store the last-view

This commit is contained in:
Campbell Barton 2014-04-30 07:04:38 +10:00
parent 7e9a873a44
commit cdaff06026
Notes: blender-bot 2023-02-14 11:06:07 +01:00
Referenced by issue #38905, Worldcam shows from the bottom after bpy.ops.view3d.object_as_camera()
Referenced by issue #38905, Worldcam shows from the bottom after bpy.ops.view3d.object_as_camera()
1 changed files with 4 additions and 1 deletions

View File

@ -569,7 +569,10 @@ static int view3d_setobjectascamera_exec(bContext *C, wmOperator *op)
if (v3d->scenelock)
scene->camera = ob;
if (camera_old != ob) { /* unlikely but looks like a glitch when set to the same */
/* unlikely but looks like a glitch when set to the same */
if (camera_old != ob) {
ED_view3d_lastview_store(rv3d);
ED_view3d_smooth_view(C, v3d, ar, camera_old, v3d->camera,
rv3d->ofs, rv3d->viewquat, &rv3d->dist, &v3d->lens,
smooth_viewtx);