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:
authorCampbell Barton <ideasman42@gmail.com>2015-05-19 10:58:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-05-19 11:00:20 +0300
commit293df68ebdd8ecb3d301a20f909787236d5e3db6 (patch)
treeeed33c25ff303d46d547f4f45f9d5172d8060ecd /source/blender/editors
parenteb05e87e16147554284d7b8d6b1a7184f9310719 (diff)
Object Drawing: avoid redundant material update
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/space_view3d/drawobject.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 25557af5ddb..f8676d55147 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -4285,7 +4285,9 @@ static bool draw_mesh_object(Scene *scene, ARegion *ar, View3D *v3d, RegionView3
scene->customdata_mask);
DM_update_materials(finalDM, ob);
- DM_update_materials(cageDM, ob);
+ if (cageDM != finalDM) {
+ DM_update_materials(cageDM, ob);
+ }
if (dt > OB_WIRE) {
const bool glsl = draw_glsl_material(scene, ob, v3d, dt);