Page Menu
Home
Search
Configure Global Search
Log In
Files
F4783
view-name-ortho-3.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Authored By
gsr b3d (gsrb3d)
Nov 13 2013, 1:18 PM
Size
2 KB
Subscribers
None
view-name-ortho-3.patch
View Options
Index: source/blender/src/drawview.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/drawview.c,v
retrieving revision 1.286
diff -u -p -r1.286 drawview.c
--- source/blender/src/drawview.c 12 Apr 2007 07:59:14 -0000 1.286
+++ source/blender/src/drawview.c 23 Apr 2007 03:26:09 -0000
@@ -1478,26 +1478,61 @@ static void draw_view_icon(void)
static void draw_viewport_name(ScrArea *sa)
{
char *name = NULL;
+ char *printable = NULL;
switch(G.vd->view) {
case 1:
- name = (G.vd->flag2 & V3D_OPP_DIRECTION_NAME) ? "Back" : "Front";
+ if (G.vd->persp & V3D_PERSP_DO_3D_PERSP)
+ name = (G.vd->flag2 & V3D_OPP_DIRECTION_NAME) ? "Back Persp" : "Front Persp";
+ else
+ name = (G.vd->flag2 & V3D_OPP_DIRECTION_NAME) ? "Back Ortho" : "Front Ortho";
break;
case 3:
- name = (G.vd->flag2 & V3D_OPP_DIRECTION_NAME) ? "Left" : "Right";
+ if (G.vd->persp & V3D_PERSP_DO_3D_PERSP)
+ name = (G.vd->flag2 & V3D_OPP_DIRECTION_NAME) ? "Left Persp" : "Right Persp";
+ else
+ name = (G.vd->flag2 & V3D_OPP_DIRECTION_NAME) ? "Left Ortho" : "Right Ortho";
break;
case 7:
- name = (G.vd->flag2 & V3D_OPP_DIRECTION_NAME) ? "Bottom" : "Top";
+ if (G.vd->persp & V3D_PERSP_DO_3D_PERSP)
+ name = (G.vd->flag2 & V3D_OPP_DIRECTION_NAME) ? "Bottom Persp" : "Top Persp";
+ else
+ name = (G.vd->flag2 & V3D_OPP_DIRECTION_NAME) ? "Bottom Ortho" : "Top Ortho";
break;
default:
- name = G.vd->persp==V3D_PERSP_USE_THE_CAMERA ? "Camera" : "User";
+ if(G.vd->persp==V3D_PERSP_USE_THE_CAMERA) {
+ if (G.vd->camera->type == OB_CAMERA) {
+ Camera *cam;
+ cam = G.vd->camera->data;
+ name = (cam->type != CAM_ORTHO) ? "Camera Persp" : "Camera Ortho";
+ } else {
+ name = "Object as Camera";
+ }
+ } else {
+ name = (G.vd->persp & V3D_PERSP_DO_3D_PERSP) ? "User Persp" : "User Ortho";
+ }
}
- if (name) {
+// Easy sync of tests to clean up the string allocation
+#define IS_LOCAL G.vd->localview
+ if (IS_LOCAL) {
+ printable = malloc(strlen(name) + strlen(" (Local)_")); // '_' gives space for '\0'
+ strcpy(printable, name);
+ strcat(printable, " (Local)");
+ } else {
+ printable = name;
+ }
+
+ if (printable) {
BIF_ThemeColor(TH_TEXT_HI);
glRasterPos2i(10, sa->winy-20);
- BMF_DrawString(G.fonts, name);
+ BMF_DrawString(G.fonts, printable);
+ }
+
+ if (IS_LOCAL) {
+ free(printable);
}
+#undef IS_LOCAL
}
/* ******************* view3d space & buttons ************** */
File Metadata
Details
Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
66/c6/4ab2207132e5b89fa53e5a562d81
Event Timeline
Log In to Comment