Tweaks to the camera visualisation:
We decided that the dashed lines were too much, making the view very busy with dashed parent lines, lamps, etc. So now the camera lines are drawn solid, but the arrow (now triangle by andy's demand!) is drawn outlined for inactive cameras, filled for the active camera.
This commit is contained in:
@@ -2291,16 +2291,19 @@ if(cam->type==CAM_ORTHO) {
|
||||
160, 135, 150, 20, &cam->flag, 0, 0, 0, 0, "Draw the field of view");
|
||||
uiDefButS(block, TOG|BIT|1,REDRAWVIEW3D, "Mist",
|
||||
160, 115, 150, 20, &cam->flag, 0, 0, 0, 0, "Draw a line that indicates the mist area");
|
||||
uiBlockEndAlign(block);
|
||||
|
||||
uiBlockBeginAlign(block);
|
||||
uiDefButS(block, TOG|BIT|2,REDRAWVIEW3D, "Passepartout",
|
||||
160, 95, 150, 20, &cam->flag, 0, 0, 0, 0, "Draw a darkened passepartout over the off-screen area in camera view");
|
||||
160, 90, 150, 20, &cam->flag, 0, 0, 0, 0, "Draw a darkened passepartout over the off-screen area in camera view");
|
||||
uiDefButS(block, TOG|BIT|3,REDRAWVIEW3D, "Title Safe",
|
||||
160, 75, 150, 20, &cam->flag, 0, 0, 0, 0, "Draw a the title safe zone in camera view");
|
||||
160, 70, 150, 20, &cam->flag, 0, 0, 0, 0, "Draw a the title safe zone in camera view");
|
||||
uiDefButS(block, TOG|BIT|4,REDRAWVIEW3D, "Name",
|
||||
160, 55, 150, 20, &cam->flag, 0, 0, 0, 0, "Draw the active camera's name in camera view");
|
||||
160, 50, 150, 20, &cam->flag, 0, 0, 0, 0, "Draw the active camera's name in camera view");
|
||||
uiBlockEndAlign(block);
|
||||
|
||||
uiDefButF(block, NUM,REDRAWVIEW3D, "Size:",
|
||||
160, 30, 150, 20, &cam->drawsize, 0.1*grid, 10.0, 10, 0, "Specify the drawsize of the camera");
|
||||
160, 25, 150, 20, &cam->drawsize, 0.1*grid, 10.0, 10, 0, "Specify the drawsize of the camera");
|
||||
}
|
||||
|
||||
/* yafray: extra camera panel to set Depth-of-Field parameters */
|
||||
|
||||
@@ -715,9 +715,6 @@ void drawcamera(Object *ob)
|
||||
vec[3][0]= -facx; vec[3][1]= -facy; vec[3][2]= depth;
|
||||
vec[4][0]= -facx; vec[4][1]= facy; vec[4][2]= depth;
|
||||
|
||||
/* draw inactive cameras with dashed lines */
|
||||
if (ob != G.vd->camera) setlinestyle(3);
|
||||
|
||||
glBegin(GL_LINE_LOOP);
|
||||
glVertex3fv(vec[1]);
|
||||
glVertex3fv(vec[2]);
|
||||
@@ -736,42 +733,25 @@ void drawcamera(Object *ob)
|
||||
glVertex3fv(vec[0]);
|
||||
glVertex3fv(vec[3]);
|
||||
glEnd();
|
||||
|
||||
/* make sure it's solid line again */
|
||||
setlinestyle(0);
|
||||
|
||||
|
||||
|
||||
/* arrow on top */
|
||||
vec[0][2]= depth;
|
||||
|
||||
glBegin(GL_QUADS);
|
||||
|
||||
vec[0][0]= -0.2*cam->drawsize;
|
||||
vec[0][1]= cam->drawsize;
|
||||
glVertex3fv(vec[0]);
|
||||
|
||||
vec[0][0]= 0.2*cam->drawsize;
|
||||
glVertex3fv(vec[0]);
|
||||
|
||||
vec[0][1]= 1.6*cam->drawsize;
|
||||
glVertex3fv(vec[0]);
|
||||
|
||||
vec[0][0]= -0.2*cam->drawsize;
|
||||
glVertex3fv(vec[0]);
|
||||
glEnd();
|
||||
|
||||
glBegin(GL_TRIANGLES);
|
||||
/* draw inactive cameras with outline arrow */
|
||||
if (ob != G.vd->camera) glBegin(GL_LINE_LOOP);
|
||||
else glBegin(GL_TRIANGLES);
|
||||
|
||||
vec[0][0]= -0.4*cam->drawsize;
|
||||
vec[0][1]= 1.6*cam->drawsize;
|
||||
vec[0][0]= -0.7*cam->drawsize;
|
||||
vec[0][1]= 1.1*cam->drawsize;
|
||||
glVertex3fv(vec[0]);
|
||||
|
||||
vec[0][0]= 0.0;
|
||||
vec[0][1]= 2.0*cam->drawsize;
|
||||
vec[0][1]= 1.8*cam->drawsize;
|
||||
glVertex3fv(vec[0]);
|
||||
|
||||
vec[0][0]= 0.4*cam->drawsize;
|
||||
vec[0][1]= 1.6*cam->drawsize;
|
||||
vec[0][0]= 0.7*cam->drawsize;
|
||||
vec[0][1]= 1.1*cam->drawsize;
|
||||
glVertex3fv(vec[0]);
|
||||
|
||||
glEnd();
|
||||
|
||||
Reference in New Issue
Block a user