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:
authorTon Roosendaal <ton@blender.org>2006-11-22 13:32:41 +0300
committerTon Roosendaal <ton@blender.org>2006-11-22 13:32:41 +0300
commit7267159afb673ade6bf3f35059ce5d614016df1f (patch)
tree72e337f99902474be5150b1a9e1a90c39ab85601 /source/blender/src/drawmesh.c
parentcca16111bfda389265fef6f30004ef6322f620c8 (diff)
Bugfixes:
- SHIFT+K in weightpaint+faceselect combo crashed (caused by my commit for real undo in painting) - weightpaint+faceselect combo didn't draw correct anymore (caused by commit for custom mesh layers)
Diffstat (limited to 'source/blender/src/drawmesh.c')
-rw-r--r--source/blender/src/drawmesh.c32
1 files changed, 20 insertions, 12 deletions
diff --git a/source/blender/src/drawmesh.c b/source/blender/src/drawmesh.c
index 2eae7b2ea5e..d5ac0f779a6 100644
--- a/source/blender/src/drawmesh.c
+++ b/source/blender/src/drawmesh.c
@@ -909,6 +909,12 @@ static int draw_tface_mapped__set_draw(void *userData, int index)
return draw_tface__set_draw(tface, mcol, matnr);
}
+static int wpaint__setSolidDrawOptions(void *userData, int index, int *drawSmooth_r)
+{
+ *drawSmooth_r = 1;
+ return 1;
+}
+
void draw_tface_mesh(Object *ob, Mesh *me, int dt)
/* maximum dt (drawtype): exactly according values that have been set */
{
@@ -951,31 +957,33 @@ void draw_tface_mesh(Object *ob, Mesh *me, int dt)
set_draw_settings_cached(1, 0, 0, 0, 0, 0, 0);
if(dt > OB_SOLID || g_draw_tface_mesh_islight==-1) {
- MTFace *tface= me->mtface;
- MCol *mcol= me->mcol;
- MFace *mface= me->mface;
bProperty *prop = get_property(ob, "Text");
int editing= (G.f & (G_VERTEXPAINT+G_FACESELECT+G_TEXTUREPAINT+G_WEIGHTPAINT)) && (ob==((G.scene->basact) ? (G.scene->basact->object) : 0));
- int start, totface;
#ifdef WITH_VERSE
if(me->vnode) {
/* verse-blender doesn't support uv mapping of textures yet */
dm->drawFacesTex(dm, NULL);
}
- else if(ob==OBACT && (G.f & G_FACESELECT) && me && me->mtface)
+ else if(ob==OBACT && (G.f & G_FACESELECT) && me && me->mtface) {
#else
- if(ob==OBACT && (G.f & G_FACESELECT) && me && me->mtface)
-#endif
- dm->drawMappedFacesTex(dm, draw_tface_mapped__set_draw, (void*)me);
+ if(ob==OBACT && (G.f & G_FACESELECT) && me && me->mtface) {
+#endif
+ if(G.f & G_WEIGHTPAINT)
+ dm->drawMappedFaces(dm, wpaint__setSolidDrawOptions, me->mface, 1);
+ else
+ dm->drawMappedFacesTex(dm, draw_tface_mapped__set_draw, (void*)me);
+ }
else
dm->drawFacesTex(dm, draw_tface__set_draw);
- start = 0;
- totface = me->totface;
-
- if (!editing && prop && tface) {
+ /* drawing game engine text hack */
+ if (!editing && prop && me->tface) {
DerivedMesh *ddm = mesh_get_derived_deform(ob);
+ MFace *mface= me->mface;
+ MTFace *tface= me->mtface;
+ MCol *mcol= me->mcol; /* why does mcol exist? */
+ int start= 0, totface= me->totface;
tface+= start;
mcol+= start*4;