diff options
author | Ton Roosendaal <ton@blender.org> | 2005-11-19 13:55:07 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2005-11-19 13:55:07 +0300 |
commit | ec2e8d53801fad23e30294e28f1b83681d4d0f1f (patch) | |
tree | 7a73b33c1b5e8e6775b2b4791332653763e469ed /source/blender/src/usiblender.c | |
parent | 97c13508ff67ed95eb9a87f3173992115bcd3f82 (diff) |
Finally switched to porting UI stuff from tuhopuu!
This commit is based on the patch & cool design work of Matt. It includes
the new Lamp drawing style, and replaces the Object center dots with a
similar styled OpenGL drawn dot.
Important side-note is that removing the old glDrawPixels() for centers or
lamps will not only make Blender faster, but also prevents crashing on a
couple of cheaper 3d cards (as reported for S3 and Intel on-board cards)
Notes:
- The new default only draws Object centers when selected or active. If
you like to see them always, use the View Properties Panel. You can also
save that in the .B.blend
- The size for centers (and lamps) is in the User settings "View & Controls"
- Unselected Lamps, and their offset lines from zero Z, are drawn in a new
Theme color
Changes and additions in Matt's patch:
- Lamps and centers are drawn fixed size, in pixels. Also the 'sun' lamp
draws screen aligned now.
- Center dots now also draw in blue to denote Library linkage or to show
that an Object has been linked to other scenes.
- When objects are empty (no vertices) they will always draw a center dot.
Otherwise these objects would never be selectable anymore!
- Added theme setting for center size, and initialization
- Removed the old redundant code for drawing centers
- Cleanup of drawing routines, made center dots faster
- Started removing calls to glBlendFunc(). Regular alpha drawing should
become standard, and the (very) occasional exception should return this
to default after usage.
Diffstat (limited to 'source/blender/src/usiblender.c')
-rw-r--r-- | source/blender/src/usiblender.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/source/blender/src/usiblender.c b/source/blender/src/usiblender.c index f60737aa200..1f9dc88321e 100644 --- a/source/blender/src/usiblender.c +++ b/source/blender/src/usiblender.c @@ -249,6 +249,18 @@ static void init_userdef_file(void) } } } + if (G.main->versionfile <= 239) { + bTheme *btheme; + + for(btheme= U.themes.first; btheme; btheme= btheme->next) { + /* Lamp theme, check for alpha==0 is safe, then color was never set */ + if(btheme->tv3d.lamp[3]==0) { + SETCOL(btheme->tv3d.lamp, 0, 0, 0, 40); + } + } + if(U.obcenter_dia==0) U.obcenter_dia= 6; + } + if (U.undosteps==0) U.undosteps=32; @@ -641,7 +653,6 @@ void BIF_init(void) InitCursorData(); sound_init_listener(); - init_draw_rects(); /* drawobject.c */ BIF_read_homefile(); init_gl_stuff(); /* drawview.c, after homefile */ readBlog(); |