diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2014-04-10 02:16:17 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2014-04-10 02:16:40 +0400 |
commit | c3fefebe47b33bfa1debb9425c8f0411a87bc5fd (patch) | |
tree | 32965976475df85078000bc9ef68fe407c7b8a7e /source/blender | |
parent | 82628a6b0e490a180ba822336c7177cda71ba57d (diff) |
More instances of needed material initialization.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 22fff90da42..fbd79798ab2 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -4004,6 +4004,8 @@ static bool drawCurveDerivedMesh(Scene *scene, View3D *v3d, RegionView3D *rv3d, return true; } + DM_update_materials(dm, ob); + glFrontFace((ob->transflag & OB_NEG_SCALE) ? GL_CW : GL_CCW); if (dt > OB_WIRE && dm->getNumTessFaces(dm)) { @@ -7755,6 +7757,8 @@ void draw_object_backbufsel(Scene *scene, View3D *v3d, RegionView3D *rv3d, Objec BM_mesh_elem_table_ensure(em->bm, BM_VERT | BM_EDGE | BM_FACE); + DM_update_materials(dm, ob); + bbs_mesh_solid_EM(em, scene, v3d, ob, dm, ts->selectmode & SCE_SELECT_FACE); if (ts->selectmode & SCE_SELECT_FACE) bm_solidoffs = 1 + em->bm->totface; @@ -7813,10 +7817,14 @@ static void draw_object_mesh_instance(Scene *scene, View3D *v3d, RegionView3D *r DerivedMesh *dm = NULL, *edm = NULL; int glsl; - if (ob->mode & OB_MODE_EDIT) + if (ob->mode & OB_MODE_EDIT) { edm = editbmesh_get_derived_base(ob, me->edit_btmesh); - else + DM_update_materials(dm, ob); + } + else { dm = mesh_get_derived_final(scene, ob, CD_MASK_BAREMESH); + DM_update_materials(dm, ob); + } if (dt <= OB_WIRE) { if (dm) |