forked from bartvdbraak/blender
Bugfix #4471
Using Weight/Vertex Paint, the current color was not reset, causing Object name or axes to draw in random colors.
This commit is contained in:
parent
7f3ce43f04
commit
098c73f441
@ -1911,27 +1911,29 @@ static void draw_mesh_fancy(Base *base, DerivedMesh *baseDM, DerivedMesh *dm, in
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* set default draw color back for wire or for draw-extra later on */
|
||||||
|
if (dt!=OB_WIRE) {
|
||||||
|
if(base->flag & SELECT) {
|
||||||
|
|
||||||
|
if(ob==OBACT && ob->flag & OB_FROMGROUP)
|
||||||
|
BIF_ThemeColor(TH_GROUP_ACTIVE);
|
||||||
|
else if(ob->flag & OB_FROMGROUP)
|
||||||
|
BIF_ThemeColorShade(TH_GROUP_ACTIVE, -16);
|
||||||
|
else
|
||||||
|
BIF_ThemeColor((ob==OBACT)?TH_ACTIVE:TH_SELECT);
|
||||||
|
} else {
|
||||||
|
if (ob->flag & OB_FROMGROUP)
|
||||||
|
BIF_ThemeColor(TH_GROUP);
|
||||||
|
else
|
||||||
|
BIF_ThemeColor(TH_WIRE);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (draw_wire) {
|
if (draw_wire) {
|
||||||
/* If drawing wire and drawtype is not OB_WIRE then we are
|
/* If drawing wire and drawtype is not OB_WIRE then we are
|
||||||
* overlaying the wires.
|
* overlaying the wires.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (dt!=OB_WIRE) {
|
if (dt!=OB_WIRE) {
|
||||||
if(base->flag & SELECT) {
|
|
||||||
|
|
||||||
if(ob==OBACT && ob->flag & OB_FROMGROUP)
|
|
||||||
BIF_ThemeColor(TH_GROUP_ACTIVE);
|
|
||||||
else if(ob->flag & OB_FROMGROUP)
|
|
||||||
BIF_ThemeColorShade(TH_GROUP_ACTIVE, -16);
|
|
||||||
else
|
|
||||||
BIF_ThemeColor((ob==OBACT)?TH_ACTIVE:TH_SELECT);
|
|
||||||
} else {
|
|
||||||
if (ob->flag & OB_FROMGROUP)
|
|
||||||
BIF_ThemeColor(TH_GROUP);
|
|
||||||
else
|
|
||||||
BIF_ThemeColor(TH_WIRE);
|
|
||||||
}
|
|
||||||
|
|
||||||
bglPolygonOffset(1.0);
|
bglPolygonOffset(1.0);
|
||||||
glDepthMask(0); // disable write in zbuffer, selected edge wires show better
|
glDepthMask(0); // disable write in zbuffer, selected edge wires show better
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user