Page MenuHome

viewname2.patch

File Metadata

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

viewname2.patch

Index: blender/source/blender/makesdna/DNA_view3d_types.h
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/makesdna/DNA_view3d_types.h,v
retrieving revision 1.28
diff -u -r1.28 blender/source/blender/DNA_view3d_types.h
--- makesdna/DNA_view3d_types.h 19 Nov 2005 10:55:06 -0000 1.28
+++ makesdna/DNA_view3d_types.h 25 Jan 2006 17:32:25 -0000
@@ -131,7 +131,10 @@
/* afterdraw, for xray & transparent */
struct ListBase afterdraw;
/* drawflags, denoting state */
- short zbuf, transp, xray, pad2;
+ short zbuf, transp, xray;
+ /*Added a Switch for know if viewpoit selected is used eith CTRL*/
+ short viewDirection;
+
} View3D;
/* View3D->flag (short) */
Index: blender/source/blender/src/drawview.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/drawview.c,v
retrieving revision 1.184
diff -u -r1.184 drawview.c
--- blender/source/blender/src/drawview.c 15 Jan 2006 13:30:56 -0000 1.184
+++ blender/source/blender/src/drawview.c 25 Jan 2006 17:32:52 -0000
@@ -1131,6 +1131,31 @@
glDisable(GL_BLEND);
}
+static void draw_viewport_name(ScrArea *sa)
+{
+ char ViewPortName[8];
+
+ switch(G.vd->view) {
+ case 1:
+ sprintf(ViewPortName,G.vd->viewDirection>=0 ? "Front" : "Back");
+ break;
+ case 3:
+ sprintf(ViewPortName,G.vd->viewDirection>=0 ? "Right" : "Left");
+ break;
+ case 7:
+ sprintf(ViewPortName,G.vd->viewDirection>=0 ? "Top" : "Bottom");
+ break;
+ default:
+ if(G.vd->persp==V3D_PERSP_USE_THE_CAMERA) 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 +2325,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))
Index: blender/source/blender/src/toets.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/toets.c,v
retrieving revision 1.67
diff -u -r1.67 toets.c
--- blender/source/blender/src/toets.c 17 Dec 2005 14:27:33 -0000 1.67
+++ blender/source/blender/src/toets.c 25 Jan 2006 17:32:55 -0000
@@ -287,6 +287,10 @@
}
}
else if((G.qual & (LR_SHIFTKEY | LR_CTRLKEY)) && (event != PAD0)) {
+
+ /*Indicate that this view is obtained by CTRL*/
+ G.vd->viewDirection=-1;
+
if(event==PAD0) {
/* G.vd->persp= 3; */
}
@@ -346,6 +350,8 @@
}
}
else {
+ /*Indicate that this view is obtained widthout CTRL*/
+ G.vd->viewDirection=1;
if(event==PAD7) {
G.vd->viewquat[0]= 1.0;

Event Timeline