Fix first part of T39956

show diffuse option not correctly calculated on opening a file.

Make sure we call pbvh_show_diffuse_color_set after building the pbvh so
vertex data are available to it.
This commit is contained in:
Antony Riakiotakis 2014-05-01 02:11:39 +03:00
parent 55b2a5aa45
commit 73ad0dfbae

@ -286,13 +286,13 @@ static PBVH *cdDM_getPBVH(Object *ob, DerivedMesh *dm)
cddm->pbvh = BKE_pbvh_new();
cddm->pbvh_draw = can_pbvh_draw(ob, dm);
pbvh_show_diffuse_color_set(cddm->pbvh, ob->sculpt->show_diffuse_color);
BKE_mesh_tessface_ensure(me);
BKE_pbvh_build_mesh(cddm->pbvh, me->mface, me->mvert,
me->totface, me->totvert, &me->vdata);
pbvh_show_diffuse_color_set(cddm->pbvh, ob->sculpt->show_diffuse_color);
deformed = ss->modifiers_active || me->key;
if (deformed && ob->derivedDeform) {