Commit Graph

423 Commits

Author SHA1 Message Date
ff89daceb0 - fixed drawmode 'wire extra'.
it was using some unsupported linewidth trick... I've been trying to
  get the official glPolygonOffset to working, but my silly Mac doesnt
  support it, it seems.
  So! I thought of another trick, and that's just moving the window
  matrix a little to the front. :)

- for those interested; the code for glPolygonOffset is still there,
  commented out. (drawobject.c)

- btw: the drawobject.c routines are a TOTAL mess!
2003-10-20 23:20:37 +00:00
7893cc25d1 - added new drawing type for subsurf editing. Is called 'Optimal' and
can be found under the 'SubSurf' button.
  Optimal drawing only shows the subdivided original edges. Quite nice!
  And; it's a load faster!

- to evaluate: do we want this in editmode too?
2003-10-20 21:58:15 +00:00
7f5d06d638 Another mega commit... loadsof restructure, and a pretty good one! :)
- changed the BIF_DrawString() function. it used to work different for
  AA fonts  as for default fonts. Now it's identical. Setting color for fonts
  can just be done with OpenGL, for both font types.
  Removed: BIF_DrawStringRGB()
- added theme color options for Buttons
- recoded DefButton, so it automatically chooses the right color.
- had to remove a 1000 uiBlockSetCol() calls for that reason...
- uiBlockSetCol() still works, to override automatic color

- removed entirely the silly old color system (BIFColorID). All color
  calls can now be done with a BIF_ThemeColor() call, including fonts and
  buttons and opengl stuff

- all buttons in button header have headercolor by default

- recoded drawing icons, it was a really bad & old loop doing manually
  colorshading and blending... which was per pixel a load of code!
  Now it uses a single OpenGL call to blend or colorize. Quite faster!
- (as test, for review) icons don't colorize anymore with button color,
  but have a different alpha to blend in (when not active)


- recoded the entire interface_draw.c file...:
- drawing buttons is separated in three parts:
  1. main drawing function for text and icons
  2. free definable callback for button itself
  3. free definable callback for slider
- removed a load of redundant code for this!
- coded a minimal theme, and adjusted Matt's buttons to match new
  callback system

- adding new drawing themes is piece of cake now
- for coders, default 'themes' to be aware of:
  UI_EMBOSS : the themable drawing style
  UI_EMBOSSP: the pulldown menu system (apart from color not themable)
  UI_EMBOSSN: draw nothing, only text and/or icon
  UI_EMBOSSM: minimal theme, still in use for Logic and Constraintsa
  this can be set with uiBlockSetEmboss(block) or in the uiNewBlock() call.

TODO: make UI API call for button alignment

(plus removed another series of warnings from code...)

Plus: fixed bug in Matts commit: he used a 'short' button for an 'int'
2003-10-20 15:40:20 +00:00
c6a2f42dba - simplified Theme API. No need to include 'current active area' anymore.
like: BIF_ThemeColor(TH_GRID); will be sufficient. Blender does the rest.
- fixed bug in CTRL-X (reload home file) with themes
- fixed bug in horizontal alignment of different height panels. Seems also
  to solve the drawing error with constraints...
2003-10-19 09:19:58 +00:00
0321602b65 - The basic layer for Themes in place!
- currently only implemented for 3d window
- create as many themes you like, and name them
- default theme is not editable, and always will be defined at startup
  (initTheme)
- saves in .B.blend
- themes for spaces can become local too, so you can set individual
  3d windows at theme 'Maya' or so. (to be implemented)
- it uses alpha as well...!

API:
This doesnt use the old method with BFCOLORID blahblah. The API is copied
from OpenGL conventions (naming) as much as possible:

- void BIF_ThemeColor(ScrArea *sa, int colorid)
  sets a color... id's are in BIF_resources.h (TH_GRID, TH_WIRE, etc)

- void BIF_ThemeColorShade(ScrArea *sa, int colorid, int offset)
  sets a color with offset, no more weird COLORSHADE_LGREY stuff

- void BIF_GetThemeColor3fv(ScrArea *sa, int colorid, float *col)
  like opengl, this gives you in *col the three rgb values

- void BIF_GetThemeColor4ubv(ScrArea *sa, int colorid, char *col)
  or the one to get 4 bytes

ThemeColor calls for globals (UI etc) can also call NULL for *sa... this
is to be implemented still.

Next step: cleaning up interface.c for all weird colorcalls.
2003-10-17 14:02:08 +00:00
7a7956509d - fixed edge selecting... :) 2003-10-16 20:36:29 +00:00
5d1438ad96 - fixed editing vertices again!
I had to clean up very old calls to switch matrices for 3d windows.
To make it more clear, I've introduced defines for the infamous persp()
function:

persp(PERSP_WIN);  sets matrices at pixel level window
persp(PERSP_VIEW); restores matrices back to 3d drawing
persp(PERSP_STORE); only called once, to store correct matrices

I will now check on frontbuffer drawing of vertices... it's very doubtful
if it's used still correctly, was only meant for visual speed in the
early nineties you know. :)
2003-10-16 09:39:19 +00:00
c01d06df3c - fixed display of dashed helpline, when rotating multiple objects or
around the 3d cursor.
  fix only works for OSX and certain nvidia cards. they need a glFinish()
  call after drawing in frontbuffer.
2003-09-17 10:23:53 +00:00
5572323a3a - added czech translation (cs.po)
- changed function drawcircball() in source/blender/src/drawobject.c. Circle is computed faster (no 32 calls of sin() and cos() each time witch same results).
2003-09-08 12:13:54 +00:00
03ada07a57 - fixed a small error, the change i made before with frontbuffer drawing
of right-mouse selection of objects, now calls a correct glFlush

  only to be noticed at osx and nvidia systems...
2003-07-21 17:46:55 +00:00
9a9cb5448b - changed order for 'draw faces'... it now draws first, then wire and
vertices
2003-07-20 20:38:22 +00:00
6b070b3d0d - added ALT_RIGHTMOUSE select edges in Mesh editmode
- added 'draw edges' mode in F9 menu
- changed ugly 'draw faces' in a nice transparant :)
- hotkey for screenshots: ALT+CTRL+F3 now works too
2003-07-20 20:25:30 +00:00
60dddf84ab * selecting objects has a different frontbuffer drawing handling now.
instead of drawing everything again, in all windows, it restricts to
  the active and previous active object. when there are more objects to
  be redrawn, it does a normal swapbuffers.
  Result is it all redraws & selects a lot faster in complex scenes

* Little fix in "BallTable" routine when moving mouse vertical out of
  the 3d window.
2003-07-11 20:02:52 +00:00
d4c849391e - fixed a problem with face select and vertex paint modes by removing
the check for nors != NULL (sorry miencho!).
2003-07-10 20:53:59 +00:00
a4cc2526b3 - miencho (thanks) pointed me to a weak line in draw mesh solid call.
it used a pointer, without checking its value. the calling code
  took care it never happened, nevertheless... added a comment there.
2003-07-06 20:18:42 +00:00
cee677699f - added a call calc_meshverts_ext_f2(void) which:
- projects vertices without clipping code (xs at 3200)
 - sets flag in editvert ( eve->f & 2) when it is not visible

general note: that flag is only valid after the calc_meshverts_ext_f2
call. it is a free flag. be aware that selection
is stored in bit 1 (eve->f & 1)
2003-06-30 19:51:18 +00:00
6a626aa60d Draw extra wire tuhopuu-style. Fixes Bug 244 2003-06-15 10:25:12 +00:00
75014f9f64 fixed a slowdown in the 3D window with multiple objects. 2003-05-02 10:44:14 +00:00
597875cb69 first of the c code comment translation in the mother of all directories! 2003-04-28 14:43:20 +00:00
Chris Want
3fc3a9473f It turns out that the "Pressing AKEY to deselect all objects still
leaves one object center pink" bug was actually designed by somebody
to mark the active object (which need not necessarily be selected).
I've added a couple of source comments to explain this so the next
person trying to fix this doesn't bother.
2003-02-16 00:12:06 +00:00
4709eced07 added simple shaded+wire and solid+wire drawmodes. It basically draws
the wireframe after drawing the model in solid/shaded/textured mode.
The user can set this per object using the "Wire" button in the
edit buttons window.
2003-02-01 08:25:09 +00:00
d0e346d544 updated .c files to include:
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

Just need to finish cpp files now :)

Kent
--
mein@cs.umn.edu
2002-11-25 12:02:15 +00:00
Hans Lambermont
12315f4d0e Initial revision 2002-10-12 11:37:38 +00:00