Fix for messy commits in attempt to fix groups wire colors...

- if you add new theme colors, you need to initialize them correctly and
  add that in the usiblender.c version patching for saved themes
- the code for detecting group membership was highly confusing
- group colors were even used for non-groups

Further; I didnt add group theme colors yet, that's not a bug. It's a todo
item I preferred to tackle with having a decent wirecolor system once.
This commit is contained in:
2006-03-11 18:51:41 +00:00
parent f7cccc36d4
commit 6b6511b54c
3 changed files with 23 additions and 10 deletions

View File

@@ -1903,7 +1903,7 @@ static void draw_mesh_fancy(Base *base, DerivedMesh *baseDM, DerivedMesh *dm, in
if(ob==OBACT && ob->flag & OB_FROMGROUP)
BIF_ThemeColor(TH_GROUP_ACTIVE);
else if(ob->flag & OB_FROMGROUP)
BIF_ThemeColor(TH_GROUP);
BIF_ThemeColorShade(TH_GROUP_ACTIVE, -16);
else
BIF_ThemeColor((ob==OBACT)?TH_ACTIVE:TH_SELECT);
} else {
@@ -3481,13 +3481,22 @@ static void drawSolidSelect(Base *base)
static void drawWireExtra(Object *ob)
{
if(ob!=G.obedit && (ob->flag & SELECT)) {
if(ob==OBACT && ob->dtx & OB_DRAWWIRE) BIF_ThemeColor(TH_GROUP_ACTIVE);
else if(ob->dtx & OB_DRAWWIRE) BIF_ThemeColor(TH_GROUP);
else if(ob==OBACT) BIF_ThemeColor(TH_ACTIVE);
else BIF_ThemeColor(TH_SELECT);
if(ob==OBACT) {
if(ob->flag & OB_FROMGROUP) BIF_ThemeColor(TH_GROUP_ACTIVE);
else BIF_ThemeColor(TH_ACTIVE);
}
else if(ob->flag & OB_FROMGROUP)
BIF_ThemeColorShade(TH_GROUP_ACTIVE, -16);
else
BIF_ThemeColor(TH_SELECT);
}
else BIF_ThemeColor(TH_WIRE);
else {
if(ob->flag & OB_FROMGROUP)
BIF_ThemeColor(TH_GROUP);
else
BIF_ThemeColor(TH_WIRE);
}
bglPolygonOffset(1.0);
glDepthMask(0); // disable write in zbuffer, selected edge wires show better
@@ -3675,7 +3684,7 @@ void draw_object(Base *base, int flag)
else if(ob->flag & OB_FROMGROUP) {
if(base->flag & (SELECT+BA_WAS_SEL)) {
if(G.scene->basact==base) BIF_ThemeColor(TH_GROUP_ACTIVE);
else BIF_ThemeColor(TH_GROUP);
else BIF_ThemeColorShade(TH_GROUP_ACTIVE, -16);
}
else BIF_ThemeColor(TH_GROUP);
colindex= 0;