diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index 8d0b9e64cde..af995624c03 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -544,7 +544,7 @@ static DerivedMesh *getMeshDerivedMesh(Mesh *me, Object *ob, float (*vertCos)[3] mdm->dm.release = meshDM_release; /* Works in conjunction with hack during modifier calc */ - if (G.f & G_WEIGHTPAINT) { + if ((G.f & G_WEIGHTPAINT) && ob==OBACT) { mdm->wpaintMCol = MEM_dupallocN(me->mcol); } @@ -1814,7 +1814,7 @@ static void mesh_build_data(Object *ob) clear_mesh_caches(ob); - if( (G.f & G_WEIGHTPAINT)) { + if( (G.f & G_WEIGHTPAINT) && ob==OBACT) { MCol *mcol = me->mcol; TFace *tface = me->tface; diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 4b687d312c0..1c282969646 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -468,6 +468,7 @@ typedef struct SpaceImaSel { #define OOPS_LAY 1024 #define OOPS_LI 2048 #define OOPS_IM 4096 +#define OOPS_AR 8192 /* SpaceOops->outlinevis */ #define SO_ALL_SCENES 0 diff --git a/source/blender/src/drawobject.c b/source/blender/src/drawobject.c index 81b8eb34071..e2e3d704073 100644 --- a/source/blender/src/drawobject.c +++ b/source/blender/src/drawobject.c @@ -1636,6 +1636,12 @@ static void draw_mesh_object_outline(Object *ob, DerivedMesh *dm) } } +static int wpaint__setSolidDrawOptions(void *userData, int index, int *drawSmooth_r) +{ + *drawSmooth_r = 1; + return 1; +} + static void draw_mesh_fancy(Object *ob, DerivedMesh *baseDM, DerivedMesh *dm, int dt) { Mesh *me = ob->data; @@ -1693,7 +1699,13 @@ static void draw_mesh_fancy(Object *ob, DerivedMesh *baseDM, DerivedMesh *dm, in } else if(dt==OB_SHADED) { if( (G.f & G_WEIGHTPAINT)) { - dm->drawMappedFaces(dm, NULL, NULL, 1); + glEnable(GL_LIGHTING); + glEnable(GL_COLOR_MATERIAL); + set_gl_material(0); // defmaterial settings + + dm->drawMappedFaces(dm, wpaint__setSolidDrawOptions, me->mface, 1); + glDisable(GL_LIGHTING); + glDisable(GL_COLOR_MATERIAL); } else if((G.f & (G_VERTEXPAINT+G_TEXTUREPAINT)) && me->mcol) { dm->drawMappedFaces(dm, NULL, NULL, 1); diff --git a/source/blender/src/drawoops.c b/source/blender/src/drawoops.c index 8785024046f..7b92bfde413 100644 --- a/source/blender/src/drawoops.c +++ b/source/blender/src/drawoops.c @@ -68,12 +68,6 @@ #include "BSE_drawipo.h" #include "BSE_drawoops.h" -#include "BKE_depsgraph.h" - -extern void build_deps(short mask); -//extern void draw_deps(DagNode *node); - - float oopscalex; void boundbox_oops() @@ -404,17 +398,9 @@ void drawoopsspace(ScrArea *sa, void *spacedata) if(soops==0) return; if(soops->type==SO_OUTLINER) draw_outliner(sa, soops); - else if (soops->type==SO_DEPSGRAPH) { - build_deps(soops->deps_flags); - boundbox_deps(); - calc_scrollrcts(sa,G.v2d, curarea->winx, curarea->winy); - - myortho2(G.v2d->cur.xmin, G.v2d->cur.xmax, G.v2d->cur.ymin, G.v2d->cur.ymax); - - oopscalex= .14*((float)curarea->winx)/(G.v2d->cur.xmax-G.v2d->cur.xmin); - calc_ipogrid(); /* for scrollvariables */ - draw_all_deps(); - } else { + else { + build_oops(); /* changed to become first call... */ + boundbox_oops(); calc_scrollrcts(sa, G.v2d, curarea->winx, curarea->winy); @@ -422,7 +408,6 @@ void drawoopsspace(ScrArea *sa, void *spacedata) oopscalex= .14*((float)curarea->winx)/(G.v2d->cur.xmax-G.v2d->cur.xmin); calc_ipogrid(); /* for scrollvariables */ - build_oops(); oops= soops->oops.first; while(oops) { diff --git a/source/blender/src/oops.c b/source/blender/src/oops.c index ec219e32163..6c0efd27a22 100644 --- a/source/blender/src/oops.c +++ b/source/blender/src/oops.c @@ -863,7 +863,7 @@ void build_oops() /* make oops, includes testing for existance */ - /* awlays */ + /* always */ if(G.soops->visiflag & OOPS_LI) { Library *li= G.main->library.first; while(li) {