drawview.c - Passepartout, only do GL alpha when not 1.0 alpha

buttons_editing.c - negative camera lense was possible with (Deg) button enabled
export_cal3d.c - minor changes
object_batch_name_edit.py - check for data and object libdata before renaming.
This commit is contained in:
Campbell Barton
2007-04-26 19:05:22 +00:00
parent 71ac221ea3
commit 2e134e84ab
4 changed files with 36 additions and 34 deletions

View File

@@ -3027,7 +3027,7 @@ static void editing_panel_camera_type(Object *ob, Camera *cam)
} else {
if(cam->flag & CAM_ANGLETOGGLE) {
but= uiDefButF(block, NUM,REDRAWVIEW3D, "Lens:",
10, 160, 130, 20, &cam->angle, 1.0, 250.0, 100, 0, "Specify the lens of the camera in degrees");
10, 160, 130, 20, &cam->angle, 7.323871, 172.847331, 100, 0, "Specify the lens of the camera in degrees");
uiButSetFunc(but,do_angletolensconversion_cb, &cam->lens, &cam->angle);
}
else {

View File

@@ -986,11 +986,14 @@ static void drawviewborder(void)
y2= viewborder.ymax;
/* passepartout, specified in camera edit buttons */
if (ca && (ca->flag & CAM_SHOWPASSEPARTOUT)) {
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
glEnable(GL_BLEND);
glColor4f(0, 0, 0, ca->passepartalpha);
if (ca && (ca->flag & CAM_SHOWPASSEPARTOUT) && ca->passepartalpha > 0.000001) {
if (ca->passepartalpha == 1.0) {
glColor3f(0, 0, 0);
} else {
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
glEnable(GL_BLEND);
glColor4f(0, 0, 0, ca->passepartalpha);
}
if (x1 > 0.0)
glRectf(0.0, (float)curarea->winy, x1, 0.0);
if (x2 < (float)curarea->winx)