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>2004-04-01 16:55:12 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2004-04-01 16:55:12 +0400
commitd7f3f6672815f2aaebfdefae41082ee861193cfe (patch)
treed96d739652531ecdf0088e083bf6ad179aef7131 /source/blender/src/drawmesh.c
parentd204f77251fb7559ea8ee1186a4796c26706c56b (diff)
New UV editor / Image Window features:
- Draw Faces in the UV editor - Draw Faces, selected in the UV editor, in the 3D view - Draw Shadow Mesh in the UV editor (for faces unselected in the 3D view) - Select Linked UVs (LKEY) - Unlink Selection (Alt+LKEY) - Stick (Local) UVs to Mesh Vertex on selection - Active Face Select - Reload Image - Show / Hide Faces in the UV editor (H, Shift+H, Alt+H) - Proportional Editing (O, Shift+O) - Stitch, Limit Stitch UVs (snap by mesh vertex) - Weld / Align UVs (WKEY) - UVs Snap to Pixels on/off switch - RMB in Texture Paint or Vertex Paint mode picks color - Select Inverse in Faceselect mode I hope these are all the features that were commited. The new UV Mapping panel (and code) will follow later.
Diffstat (limited to 'source/blender/src/drawmesh.c')
-rw-r--r--source/blender/src/drawmesh.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/source/blender/src/drawmesh.c b/source/blender/src/drawmesh.c
index 7799fb73dc0..b524ce1f9a7 100644
--- a/source/blender/src/drawmesh.c
+++ b/source/blender/src/drawmesh.c
@@ -70,6 +70,7 @@
#include "BIF_gl.h"
#include "BIF_mywindow.h"
+#include "BIF_resources.h"
#include "BDR_editface.h"
#include "BDR_vpaint.h"
@@ -537,9 +538,42 @@ void draw_tfaces3D(Object *ob, Mesh *me)
DispList *dl;
float *v1, *v2, *v3, *v4, *extverts= NULL;
int a;
+ char col[4];
if(me==0 || me->tface==0) return;
+ glEnable(GL_DEPTH_TEST);
+
+ /* Draw Faces, selected in the UV editor */
+ if(G.f & G_DRAWFACES) {
+ mface= me->mface;
+ tface= me->tface;
+
+ BIF_GetThemeColor4ubv(TH_FACE_SELECT, col);
+
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ glEnable(GL_BLEND);
+ glDepthMask(0); // disable write in zbuffer, needed for nice transp
+
+ for(a=me->totface; a>0; a--, mface++, tface++) {
+ if(mface->v3 && (tface->flag & TF_SELECT)) {
+ if(!(~tface->flag & (TF_SEL1|TF_SEL2|TF_SEL3)) &&
+ (!mface->v4 || tface->flag & TF_SEL4)) {
+ glColor4ub(col[0], col[1], col[2], col[3]);
+ glBegin(mface->v4?GL_QUADS:GL_TRIANGLES);
+ glVertex3fv((me->mvert+mface->v1)->co);
+ glVertex3fv((me->mvert+mface->v2)->co);
+ glVertex3fv((me->mvert+mface->v3)->co);
+ if(mface->v4) glVertex3fv((me->mvert+mface->v4)->co);
+ glEnd();
+ }
+ }
+ }
+
+ glDisable(GL_BLEND);
+ glDepthMask(1); // restore write in zbuffer
+ }
+
glDisable(GL_DEPTH_TEST);
mface= me->mface;