(no commit message)
[blender-staging.git] / source / blender / src / header_view3d.c
index 5c215dcdd46153b938f3c10044c5045a94005f60..d57fa18a7055ea98feb8ae70aa2d76ce89b96eb7 100644 (file)
@@ -212,6 +212,14 @@ static void do_view3d_view_camerasmenu(void *arg, int event)
                persptoetsen(PAD0);
                G.qual &= ~LR_CTRLKEY;
        } else {
+               /* store settings of current view before allowing overwriting with camera view */
+               /* this is a copy of the code in toets.c */
+               if(G.vd->persp != V3D_CAMOB) {
+                       QUATCOPY(G.vd->lviewquat, G.vd->viewquat);
+                       G.vd->lview= G.vd->view;
+                       G.vd->lpersp= G.vd->persp;
+               }
+
                for( base = FIRSTBASE; base; base = base->next ) {
                        if (base->object->type == OB_CAMERA) {
                                i++;