Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2008-10-03 23:34:49 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2008-10-03 23:34:49 +0400
commit5574655dad77e697c494dfff80ecfeeb7796ba9b (patch)
tree8c10ca0ec54d21e47f2531b173da360a68bc4ad8
parent128ee40d60db26ae17bf48a2c5555397b7ca49b7 (diff)
Fix for part of bug #17464, though not the original issue yet. A GLSL
shadow drawing fix also affected 3d view opengl render, hiding armatures, now there's separate flags for it.
-rw-r--r--source/blender/blenkernel/BKE_global.h4
-rw-r--r--source/blender/src/buttons_editing.c4
-rw-r--r--source/blender/src/drawarmature.c2
-rw-r--r--source/blender/src/drawobject.c14
-rw-r--r--source/blender/src/drawview.c17
-rw-r--r--source/blender/src/view.c1
6 files changed, 17 insertions, 25 deletions
diff --git a/source/blender/blenkernel/BKE_global.h b/source/blender/blenkernel/BKE_global.h
index 1cc336db69e..3a2dca525b8 100644
--- a/source/blender/blenkernel/BKE_global.h
+++ b/source/blender/blenkernel/BKE_global.h
@@ -157,10 +157,10 @@ typedef struct Global {
/* **************** GLOBAL ********************* */
/* G.f */
-#define G_DISABLE_OK (1 << 0)
+#define G_RENDER_OGL (1 << 0)
#define G_PLAYANIM (1 << 1)
/* also uses G_FILE_AUTOPLAY */
-#define G_SIMULATION (1 << 3)
+#define G_RENDER_SHADOW (1 << 3)
#define G_BACKBUFSEL (1 << 4)
#define G_PICKSEL (1 << 5)
#define G_DRAWNORMALS (1 << 6)
diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c
index ef6f5a97cee..007604f77b5 100644
--- a/source/blender/src/buttons_editing.c
+++ b/source/blender/src/buttons_editing.c
@@ -4952,9 +4952,7 @@ void do_meshbuts(unsigned short event)
if( select_area(SPACE_VIEW3D)) spin_mesh(G.scene->toolsettings->step, G.scene->toolsettings->degr, 0, 1);
break;
case B_EXTR:
- G.f |= G_DISABLE_OK;
if( select_area(SPACE_VIEW3D)) extrude_mesh();
- G.f -= G_DISABLE_OK;
break;
case B_SCREW:
if( select_area(SPACE_VIEW3D)) screw_mesh(G.scene->toolsettings->step, G.scene->toolsettings->turn);
@@ -4963,9 +4961,7 @@ void do_meshbuts(unsigned short event)
if( select_area(SPACE_VIEW3D)) extrude_repeat_mesh(G.scene->toolsettings->step, G.scene->toolsettings->extr_offs);
break;
case B_SPLIT:
- G.f |= G_DISABLE_OK;
split_mesh();
- G.f -= G_DISABLE_OK;
break;
case B_REMDOUB:
count= removedoublesflag(1, 0, G.scene->toolsettings->doublimit);
diff --git a/source/blender/src/drawarmature.c b/source/blender/src/drawarmature.c
index f050a730380..2d41e01f7e4 100644
--- a/source/blender/src/drawarmature.c
+++ b/source/blender/src/drawarmature.c
@@ -2506,7 +2506,7 @@ int draw_armature(Base *base, int dt, int flag)
bArmature *arm= ob->data;
int retval= 0;
- if(G.f & G_SIMULATION)
+ if(G.f & G_RENDER_SHADOW)
return 1;
if(dt>OB_WIRE && arm->drawtype!=ARM_LINE) {
diff --git a/source/blender/src/drawobject.c b/source/blender/src/drawobject.c
index b7aa29e2482..38ede4a6047 100644
--- a/source/blender/src/drawobject.c
+++ b/source/blender/src/drawobject.c
@@ -281,7 +281,7 @@ void drawaxes(float size, int flag, char drawtype)
float v2[3]= {0.0, 0.0, 0.0};
float v3[3]= {0.0, 0.0, 0.0};
- if(G.f & G_SIMULATION)
+ if(G.f & G_RENDER_SHADOW)
return;
switch(drawtype) {
@@ -666,7 +666,7 @@ static void drawlamp(Object *ob)
float imat[4][4], curcol[4];
char col[4];
- if(G.f & G_SIMULATION)
+ if(G.f & G_RENDER_SHADOW)
return;
la= ob->data;
@@ -958,7 +958,7 @@ static void drawcamera(Object *ob, int flag)
float vec[8][4], tmat[4][4], fac, facx, facy, depth;
int i;
- if(G.f & G_SIMULATION)
+ if(G.f & G_RENDER_SHADOW)
return;
cam= ob->data;
@@ -1768,7 +1768,7 @@ static void draw_verse_debug(Object *ob, EditMesh *em)
float v1[3], v2[3], v3[3], v4[3], fvec[3], col[3];
char val[32];
- if(G.f & G_SIMULATION)
+ if(G.f & G_RENDER_SHADOW)
return;
if(G.vd->zbuf && (G.vd->flag & V3D_ZBUF_SELECT)==0)
@@ -1834,7 +1834,7 @@ static void draw_em_measure_stats(Object *ob, EditMesh *em)
char conv_float[5]; /* Use a float conversion matching the grid size */
float area, col[3]; /* area of the face, color of the text to draw */
- if(G.f & G_SIMULATION)
+ if(G.f & (G_RENDER_OGL|G_RENDER_SHADOW))
return;
/* make the precission of the pronted value proportionate to the gridsize */
@@ -5164,7 +5164,7 @@ void draw_object(Base *base, int flag)
}
/* draw extra: after normal draw because of makeDispList */
- if(dtx && !(G.f & G_SIMULATION)) {
+ if(dtx && !(G.f & (G_RENDER_OGL|G_RENDER_SHADOW))) {
if(dtx & OB_AXIS) {
drawaxes(1.0f, flag, OB_ARROWS);
}
@@ -5204,7 +5204,7 @@ void draw_object(Base *base, int flag)
if(warning_recursive) return;
if(base->flag & (OB_FROMDUPLI|OB_RADIO)) return;
- if(G.f & G_SIMULATION) return;
+ if(G.f & G_RENDER_SHADOW) return;
/* object centers, need to be drawn in viewmat space for speed, but OK for picking select */
if(ob!=OBACT || (G.f & (G_VERTEXPAINT|G_TEXTUREPAINT|G_WEIGHTPAINT))==0) {
diff --git a/source/blender/src/drawview.c b/source/blender/src/drawview.c
index 34fff2c21a8..12ba828f0e8 100644
--- a/source/blender/src/drawview.c
+++ b/source/blender/src/drawview.c
@@ -3129,13 +3129,9 @@ void drawview3dspace(ScrArea *sa, void *spacedata)
}
if(v3d->drawtype > OB_WIRE) {
- if(G.f & G_SIMULATION)
- glClearColor(0.0, 0.0, 0.0, 0.0);
- else {
- float col[3];
- BIF_GetThemeColor3fv(TH_BACK, col);
- glClearColor(col[0], col[1], col[2], 0.0);
- }
+ float col[3];
+ BIF_GetThemeColor3fv(TH_BACK, col);
+ glClearColor(col[0], col[1], col[2], 0.0);
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
@@ -3423,8 +3419,9 @@ void drawview3d_render(struct View3D *v3d, float viewmat[][4], int winx, int win
}
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
- /* abuse! to make sure it doesnt draw the helpstuff */
- G.f |= G_SIMULATION;
+ G.f |= G_RENDER_OGL;
+ if(shadow)
+ G.f |= G_RENDER_SHADOW;
/* first draw set */
if(G.scene->set) {
@@ -3500,7 +3497,7 @@ void drawview3d_render(struct View3D *v3d, float viewmat[][4], int winx, int win
draw_gpencil_oglrender(v3d, winx, winy);
}
- G.f &= ~G_SIMULATION;
+ G.f &= ~(G_RENDER_OGL|G_RENDER_SHADOW);
if(!shadow) {
glFlush();
diff --git a/source/blender/src/view.c b/source/blender/src/view.c
index d5468342932..6f558152ac7 100644
--- a/source/blender/src/view.c
+++ b/source/blender/src/view.c
@@ -1266,7 +1266,6 @@ void viewmove(int mode)
mvalo[1]= mval[1];
if(G.f & G_PLAYANIM) inner_play_anim_loop(0, 0);
- if(G.f & G_SIMULATION) break;
/* If in retopo paint mode, update lines */
if(retopo_mesh_paint_check() && G.vd->retopo_view_data) {