Page Menu
Home
Search
Configure Global Search
Log In
Files
F13721
camera.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Authored By
Ralf Hölzemer (cheleb)
Nov 13 2013, 2:47 PM
Size
3 KB
Subscribers
None
camera.patch
View Options
Index: bf/source/blender/editors/space_view3d/view3d_draw.c
===================================================================
--- bf/source/blender/editors/space_view3d/view3d_draw.c (Revision 30452)
+++ bf/source/blender/editors/space_view3d/view3d_draw.c (Arbeitskopie)
@@ -1008,17 +1008,6 @@
glDisable(GL_BLEND);
}
- /* edge */
- glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
-
- setlinestyle(0);
- UI_ThemeColor(TH_BACK);
- glRectf(x1, y1, x2, y2);
-
- setlinestyle(3);
- UI_ThemeColor(TH_WIRE);
- glRectf(x1, y1, x2, y2);
-
/* border */
if(scene->r.mode & R_BORDER) {
@@ -1032,6 +1021,13 @@
glRectf(x3, y3, x4, y4);
}
+ /* camera name - draw in highlighted text color */
+ if (ca && (ca->flag & CAM_SHOWNAME)) {
+ UI_ThemeColor(TH_TEXT_HI);
+ BLF_draw_default(x1, y1-15, 0.0f, v3d->camera->id.name+2);
+ UI_ThemeColor(TH_WIRE);
+ }
+
/* safety border */
if (ca && (ca->flag & CAM_SHOWTITLESAFE)) {
fac= 0.1;
@@ -1052,13 +1048,6 @@
setlinestyle(0);
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
-
- /* camera name - draw in highlighted text color */
- if (ca && (ca->flag & CAM_SHOWNAME)) {
- UI_ThemeColor(TH_TEXT_HI);
- BLF_draw_default(x1, y1-15, 0.0f, v3d->camera->id.name+2);
- UI_ThemeColor(TH_WIRE);
- }
}
/* *********************** backdraw for selection *************** */
Index: bf/source/blender/editors/space_view3d/drawobject.c
===================================================================
--- bf/source/blender/editors/space_view3d/drawobject.c (Revision 30452)
+++ bf/source/blender/editors/space_view3d/drawobject.c (Arbeitskopie)
@@ -1247,17 +1247,28 @@
/* a standing up pyramid with (0,0,0) as top */
Camera *cam;
World *wrld;
- float nobmat[4][4], vec[8][4], fac, facx, facy, depth;
+ float nobmat[4][4], vec[8][4], fac, facx, facy, depth, aspx, aspy, caspx, caspy;
int i;
cam= ob->data;
+ aspx= (float) scene->r.xsch*scene->r.xasp;
+ aspy= (float) scene->r.ysch*scene->r.yasp;
+
+ if(aspx < aspy) {
+ caspx= aspx / aspy;
+ caspy= 1.0;
+ }
+ else {
+ caspx= 1.0;
+ caspy= aspy / aspx;
+ }
glDisable(GL_LIGHTING);
glDisable(GL_CULL_FACE);
if(rv3d->persp>=2 && cam->type==CAM_ORTHO && ob==v3d->camera) {
- facx= 0.5*cam->ortho_scale*1.28;
- facy= 0.5*cam->ortho_scale*1.024;
+ facx= 0.5*cam->ortho_scale*caspx;
+ facy= 0.5*cam->ortho_scale*caspy;
depth= -cam->clipsta-0.1;
}
else {
@@ -1265,8 +1276,8 @@
if(rv3d->persp>=2 && ob==v3d->camera) fac= cam->clipsta+0.1; /* that way it's always visible */
depth= - fac*cam->lens/16.0;
- facx= fac*1.28;
- facy= fac*1.024;
+ facx= fac*caspx;
+ facy= fac*caspy;
}
vec[0][0]= 0.0; vec[0][1]= 0.0; vec[0][2]= 0.001; /* GLBUG: for picking at iris Entry (well thats old!) */
@@ -1307,16 +1318,16 @@
else if (i==1 && (ob == v3d->camera)) glBegin(GL_TRIANGLES);
else break;
- vec[0][0]= -0.7*cam->drawsize;
- vec[0][1]= 1.1*cam->drawsize;
+ vec[0][0]= -0.7*cam->drawsize*caspx;
+ vec[0][1]= 1.1*cam->drawsize*caspy;
glVertex3fv(vec[0]);
vec[0][0]= 0.0;
- vec[0][1]= 1.8*cam->drawsize;
+ vec[0][1]= 1.8*cam->drawsize*caspy;
glVertex3fv(vec[0]);
- vec[0][0]= 0.7*cam->drawsize;
- vec[0][1]= 1.1*cam->drawsize;
+ vec[0][0]= 0.7*cam->drawsize*caspx;
+ vec[0][1]= 1.1*cam->drawsize*caspy;
glVertex3fv(vec[0]);
glEnd();
File Metadata
Details
Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
bf/23/6e3b280c7414c4677e3494dca21e
Event Timeline
Log In to Comment