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
path: root/source
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2006-08-11 13:09:50 +0400
committerTon Roosendaal <ton@blender.org>2006-08-11 13:09:50 +0400
commit342671308ccc7acc024dbe2bcee5c129955bfd4a (patch)
tree62e5593ef32110b3f5a774c6eb675420bbd7155e /source
parente96c813cc3ddaf95b7b290d18c5d8ddafe3606a5 (diff)
Bugfix 4783
- draw-extra for Lamps did not follow selection color - Surface objects were drawing curves always in unselected color, also its draw-extra options didn't follow selection color then
Diffstat (limited to 'source')
-rw-r--r--source/blender/src/drawobject.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/src/drawobject.c b/source/blender/src/drawobject.c
index 53337651249..c1b599a71ba 100644
--- a/source/blender/src/drawobject.c
+++ b/source/blender/src/drawobject.c
@@ -801,6 +801,8 @@ static void drawlamp(Object *ob)
glDisable(GL_BLEND);
+ /* restore for drawing extra stuff */
+ glColor3fv(curcol);
}
@@ -2124,11 +2126,14 @@ static void drawDispListsolid(ListBase *lb, Object *ob)
{
DispList *dl;
int nr, parts, ofs, p1, p2, p3, p4, a, b, *index;
- float *data, *v1, *v2, *v3, *v4;
+ float *data, *v1, *v2, *v3, *v4, curcol[4];
float *ndata, *n1, *n2, *n3, *n4;
- if(lb==0) return;
+ if(lb==NULL) return;
+ /* for drawing wire */
+ glGetFloatv(GL_CURRENT_COLOR, curcol);
+
glEnable(GL_LIGHTING);
if(ob->transflag & OB_NEG_SCALE) glFrontFace(GL_CW);
@@ -2146,8 +2151,8 @@ static void drawDispListsolid(ListBase *lb, Object *ob)
switch(dl->type) {
case DL_SEGM:
if(ob->type==OB_SURF) {
- BIF_ThemeColor(TH_WIRE);
glDisable(GL_LIGHTING);
+ glColor3fv(curcol);
parts= dl->parts;
while(parts--) {
nr= dl->nr;