Removed the highly disputable implementation that guessed a new view-center

when you go from Camera view to normal view. Now it returns, as usual, just
back to where you where working.
This commit is contained in:
2006-11-25 14:37:59 +00:00
parent 604b423032
commit cadb47b415
2 changed files with 3 additions and 11 deletions

View File

@@ -1805,6 +1805,9 @@ static void object_panel_object(Object *ob)
yco+= 40; yco+= 40;
} }
} }
if(120-yco < -10)
uiNewPanelHeight(block, 204 - (120-yco));
} }
static void object_panel_anim(Object *ob) static void object_panel_anim(Object *ob)

View File

@@ -602,17 +602,6 @@ void viewmove(int mode)
G.vd->view= 0; G.vd->view= 0;
} }
if(G.vd->persp==2 && mode!=1 && G.vd->camera) { if(G.vd->persp==2 && mode!=1 && G.vd->camera) {
float upvec[3]={0,0,0}; /* the view vector */
float mat[3][3]; /* view matrix 3x3 to rotate the upvec */
where_is_object(G.vd->camera);
VecCopyf(G.vd->ofs, G.vd->camera->obmat[3]);
VecMulf(G.vd->ofs, -1.0f); /*flip the vector*/
upvec[2]= G.vd->dist;
Mat3CpyMat4(mat, G.vd->viewinv);
Mat3MulVecfl(mat, upvec);
VecAddf(G.vd->ofs, G.vd->ofs, upvec);
G.vd->persp= 1; G.vd->persp= 1;
scrarea_do_windraw(curarea); scrarea_do_windraw(curarea);
scrarea_queue_headredraw(curarea); scrarea_queue_headredraw(curarea);