diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2006-12-21 16:47:27 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2006-12-21 16:47:27 +0300 |
commit | 47bc3d1208c48903f53728d17d3acbb1ccbd06cb (patch) | |
tree | eca808294b88940590b8dc7e9693acc20ef2048f /source/blender/src/drawmesh.c | |
parent | edccdf934018264002c034906e8a287d12b7ead7 (diff) |
Added names to UV and vertex color layers, and display them as a list.
Added support for multiple UVs in the render engine. This also involved
changing the way faces are stored, to allow data to be added optionally
per 256 faces, same as the existing system for vertices.
A UV layer can be specified in the Map Input panel and the Geometry node
by name. Leaving this field blank will default to the active UV layer.
Also added sharing of face selection and hiding between UV layers, and at
the same time improved syncing with editmode selection and hiding.
Still to do:
- Multi UV support for fastshade.
- Multires and NMesh preservation of multiple UV sets.
Diffstat (limited to 'source/blender/src/drawmesh.c')
-rw-r--r-- | source/blender/src/drawmesh.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/src/drawmesh.c b/source/blender/src/drawmesh.c index 94255384108..c8c07748d6a 100644 --- a/source/blender/src/drawmesh.c +++ b/source/blender/src/drawmesh.c @@ -926,16 +926,19 @@ static int draw_tface__set_draw(MTFace *tface, MCol *mcol, int matnr) { if (tface && ((tface->flag&TF_HIDE) || (tface->mode&TF_INVISIBLE))) return 0; - if (set_draw_settings_cached(0, g_draw_tface_mesh_istex, tface, g_draw_tface_mesh_islight, g_draw_tface_mesh_ob, matnr, TF_TWOSIDE)) { + if (tface && set_draw_settings_cached(0, g_draw_tface_mesh_istex, tface, g_draw_tface_mesh_islight, g_draw_tface_mesh_ob, matnr, TF_TWOSIDE)) { glColor3ub(0xFF, 0x00, 0xFF); return 2; /* Don't set color */ } else if (tface && tface->mode&TF_OBCOL) { glColor3ubv(g_draw_tface_mesh_obcol); return 2; /* Don't set color */ } else if (!mcol) { - Material *ma= give_current_material(g_draw_tface_mesh_ob, matnr+1); - if(ma) glColor3f(ma->r, ma->g, ma->b); - else glColor3f(1.0, 1.0, 1.0); + if (tface) glColor3f(1.0, 1.0, 1.0); + else { + Material *ma= give_current_material(g_draw_tface_mesh_ob, matnr+1); + if(ma) glColor3f(ma->r, ma->g, ma->b); + else glColor3f(1.0, 1.0, 1.0); + } return 2; /* Don't set color */ } else { return 1; /* Set color from mcol */ |