Page MenuHome

viewname.patch

File Metadata

Author
Daniele Fornaciari (neo1975)
Created
Nov 13 2013, 1:06 PM

viewname.patch

Index: drawview.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/drawview.c,v
retrieving revision 1.184
diff -u -r1.184 drawview.c
--- drawview.c 15 Jan 2006 13:30:56 -0000 1.184
+++ drawview.c 24 Jan 2006 16:32:19 -0000
@@ -1131,6 +1131,21 @@
glDisable(GL_BLEND);
}
+static void draw_viewport_name(ScrArea *sa)
+{
+ char ViewPortName[8];
+
+ if(G.vd->view==7) sprintf(ViewPortName,"Top");
+ else if(G.vd->view==1) sprintf(ViewPortName,"Front");
+ else if(G.vd->view==3) sprintf(ViewPortName,"Side");
+ else if(G.vd->persp==2) sprintf(ViewPortName,"Camera");
+ else sprintf(ViewPortName,"User");
+
+ BIF_ThemeColor(TH_TEXT_HI);
+ glRasterPos2i(30, sa->winy-20);
+ BMF_DrawString(G.fonts, ViewPortName);
+}
+
/* ******************* view3d space & buttons ************** */
static void view3d_change_bgpic_ima(View3D *v3d, Image *newima) {
@@ -2300,6 +2315,7 @@
if(v3d->persp>1) drawviewborder();
if(!(G.f & G_PLAYANIM)) drawcursor(v3d);
draw_view_icon();
+ draw_viewport_name(sa);
ob= OBACT;
if(ob && (U.uiflag & USER_DRAWVIEWINFO))

Event Timeline