Commit Graph

33 Commits

Author SHA1 Message Date
93a3b2b78a Some more coverity fixes.
This one moves some pointer checks up in the code 
(they were after the pointer was used, kind of useless at that point) ;)

Kent
2007-06-07 02:00:11 +00:00
9e1b15ff19 [#6787] OOPS window draw changes patch from Matthew Plough (meestaplu)
And added groups to the oopsview
2007-06-04 00:09:41 +00:00
afdd54fa37 moved source and text to american spelling
* colour -> color
* centre -> center
* normalise -> normalize
* modelling -> modeling
2007-04-04 13:18:41 +00:00
f4b4a2bb50 bugfix for overwriting memory when copying library name into too short char[] 2006-06-15 19:29:25 +00:00
f47899fc0f Orange; merger with bf-blender.
(Merging is *not* fun work, especially not with bugfixes in main branch
for code that got cleaned up in the other! Poor Hos... :)
2006-01-03 21:43:31 +00:00
fc6ec33c89 Adds a boarder around the oops, usefull to know where the oops bounds end with larger scenes.
I needed to do a make clean, then make to see this change.
2006-01-03 04:20:43 +00:00
17210112a1 Orange: Warning cleanup for Icons commit, missing declarations of some
calls caused icon hashing not to work too. Runs smooth here :)
2005-12-21 23:39:20 +00:00
80eb4d3b9e Big commit in orange: Interface icons for materials, textures
world and lamp. Also for images in pupmenus.
Also preparation for work on using preview images in imagebrowser.

-- Andrea
2005-12-21 22:21:43 +00:00
bbb00043cd When adding a Mesh in python a file saved caused blender to segfault when reloading.
turns out that oops->id->lib isnt initialized? anyhow
if (oops->id && oops->id->lib) // works
where
if (oops->id->lib) // crashes

so made the needed change in a few places.
2005-12-19 23:04:58 +00:00
3a50444ad4 Oops, left the script menu in there. problems. 2005-12-16 13:50:45 +00:00
874c7d7831 Added pointercheck to oops code that evaluates color. Thanks campbell! 2005-11-20 15:54:45 +00:00
8927ed4e25 Patch provided by Campbell Barton
Oops drawing speedup:

* Doesent draw splines that are totaly out of the view (big speedup)
* Changes the spline resolution based on its size on the screen (smaller
  speedup)
* Draws highlighted lines ontop of unhighlighted lines, makes it easy to see
  where selected data links to.
* Text changes size with zoom.
* Text draws better at small sizes.
2005-11-20 12:47:13 +00:00
e1c56fc201 Made WeightPaint use shaded mode. This thanks to the preparations as done
by daniel before. :)
Note; the shaded display uses smooth normals by default, because thats how
the derived mesh works!

Daniel; I've changed the G_WEIGHTPAINT hack in derivedmesh code... no idea
how this could work even. Still ugly though.
2005-09-24 13:49:55 +00:00
3367a030b3 - added UI_EMBOSSR option (rounded emboss)
- added support for vector icons, from user API side is just like using
   a regular icon... on icon side is defined by a function in resources.c
   instead of using the blenderbuttons png file. vector icons are much
   easier to add and scale properly. intent is that vector icons would
   be drawn in window coordinates which lets icon developers make the
   most beautiful icons, but this requires some tweaking of the interface
   drawing that I am not going to do atm.
 - changed BIF_draw_icon* to take coordinates of where to draw icon instead
   of using passed in raster position
 - switch modifier UI to using vector icons, and tweaked some position and
   style stuff.
 - replaced most uses of UI_EMBOSSX with UI_EMBOSS (do same thing, just there
   to confuse people I guess)

After the window coordinate stuff is sorted out with vector icons
it probably makes sense to move all non-photorealistic icons in blenderbuttons
to vector form just so scaling goes better.
2005-08-04 22:36:21 +00:00
79e333343b Dependency graph patch, provided by Jean-Luc Peuriere.
Works like a charm... well it now replaces the old base-sorting hack. :)
Next stage will be to define how to further integrate it. Plus some
minor code cleanups... static/internal functions versus external, etc.
2005-04-30 21:27:05 +00:00
8e92ee8684 - remove all obsolete inclusions of BLI_winstuff.h (due to recent changes)
NOTE: BLI_winstuff.h was meant to be a wrapper around windows.h to handle
undefining various crap that windows.h defines. Platform specific headers
should only have to be included in a few places. This reduces the number
of inclusions of BLI_winstuff.h to 16 which is a much more reasonable
number (than the 144 or whatever it used to be)
2005-03-19 21:08:13 +00:00
78f133b8a7 Bug found by Bassam; in certain occasions reading a file calls setscreen()
without the (ugly) global curarea being set.
Fixed the crash in his sample by nicely passing on 'current area' as
argument.
2005-01-31 18:37:54 +00:00
230784b824 Bug fix #1893
Option to switch left/right mouse didn't work for floating panels. It then
still selected stuff behind the button.
Was due to using wrong variable for events.
2004-11-26 20:20:42 +00:00
91f48d0734 Two fixes;
- Bug #1890. While render subsurf in editmode, orco coordinates were
  incorrect (subsurf vertices in editmode have different ordering)
  Bug was oldie.
- IRC reported by Stefano; oops (not outliner) didnt show lamp textures
  nor material ipos correctly.
  Found error in oops curved lines too (the ones starting at right side)
2004-11-26 12:20:35 +00:00
d5e0c065bc Version 1.0 of the new Outliner
The outliner is a hierarchical diagram displaying a list of data in Blender
and its dependencies. The 'databrowse' doesn't really show it, and Oops is
too chaotic still. And most of all, the former two don't offer much tools.

After discussions on irc, Matt came with this design proposal;
http://mke3.net/blender/interface/layout/outliner/
Which is closely followed for the implementation.

The current version only shows all 'library data' in Blender (objects,
meshes, ipos, etc) and not the 'direct data' such as vertex groups or NLA.

I decided to make it inside the Oopw window, as an option. You can find the
option in the "View" pulldown, or directly invoke it with ALT+SHIFT+F9
Here's a quick overview of the Outliner GUI:

- Header pulldown has options what it can show (Visible = in current layers)
- click on triangle arrow to open/close
- press AKEY to open/close all
- Leftmouse click on an item activates; and does based on type a couple of
  extra things:
  - activates a scene
  - selects/activates the Object
  - enters editmode (if clicked on Mesh, Curve, etc)
  - shows the appropriate Shading buttons (Lamp, Material, Texture)
  - sets the IpoWindow to the current IPO
  - activates the Ipo-channel in an Action
- Selected and Active objects are drawn in its Theme selection color
- SHIFT+click on Object does extend-select
- Press DOTkey to get the current active data in center of view


TODO;
- rightmouse selection; for indicating operations like delete or duplicate
- showing more data types
- icon (re)design...
- lotsof options as described in Matts paper still...
2004-10-06 18:55:00 +00:00
3a840670a5 Lots of small changes, all for UI in Blender;
----- Killed UI frontbuffer draw
The interface toolkit was drawing all live updates (while using menus/buttons)
in the frontbuffer. This isn't well supported cross-platform, so time to be
killed once. Now it uses *only* glReadPixels and glCopyPixels for frontbuffer
access.

Live updates or menus now are drawn in backbuffer always, and copied to
front when needed.

NOTE: it was tested, but needs thorough review! On PC systems I suspects
backbuffer selection to screw up (check!). On SGI/SUN workstations it
should work smooth; but I need evidence

----- Smaller fixes;

- AA fonts were garbled on ATI systems. Now the AA fonts are drawn exact
  on pixel positions. Needs the new FTGL libb too, patch is on maillist
- Rounded theme uses antialiased outlines
- Pulldown and popup menus have nice softshadow now
- New button type 'PULLDOWN', thats the one that callsup a pulldown menu.
  Should be added to themes, as is the full menu/pulldown drawing
- Screendump for 1 window does the full window now, including header
- Empty pulldowns (for example running blender without scripts) give no
  drawing error anymore

For review & fun;
- added curved lines as connectors, for Oops window
2004-10-03 13:49:54 +00:00
16e90d56d2 - replaced AUTOSPACE define with {ME_,CU_,MB_}AUTOSPACE,
different objects shouldn't share flags this way (still sharing of
  other mesh flags in renderer... ickity pickity, but I'm not fixing now)
 - removed some unnecessary uses of DNA_mesh_types.h
2004-03-14 16:59:48 +00:00
4a5ae4a55f Fix for undo... it didn't do the UV coords (tface) nor the vertexpaint
colors. This because of the pretty weird (ab)use of load & make editmesh...

For each added undo step, the load_editmesh was fed with an empty mesh
to assign data to, without knowledge of what was in the original mesh.
That way UV and color data got lost.

Solved it in 2 steps:

1. removing the ->tface pointer from EditVlak, and make TFace a builtin
  struct inside EditVlak. This didnt cost much extra mem, since it already
  stored UV and color. This enabled some pretty cleanup in editmesh.c as
  well, storing tface pointers was cumbersome.
2. for each undo step, it then generates always a tface and mcol block to
  link to the undo Mesh.
  Even when it wasn't in the actual Mesh, at exit editmode the original
  Mesh is used as reference anyway, and undo-meshes are freed correctly.

The enormous commit is because I had to change the BLI_editVert.h file, and
found it was included in about every file unnecessary. I removed it there.
ALso found out that subsurf has code ready (unfinished) to make UV coords for
the displaylist in EditMode as well, nice to know for later...
2003-11-19 22:00:14 +00:00
bc22e2242a - removed temporal patch from myortho2() in mywindow.c, and changed
all calls to ortho2 with correctness offset of 0.375 instead of 0.5.
  this efficiently solves bug in drawing UV lines as reported.

cvS: ----------------------------------------------------------------------
2003-11-18 11:22:17 +00:00
164fa06c11 - themed all window types... phew!
BTW: text colors don't work everywhere yet... but this state should
  be save to store themes in your .B.blend (CTRL+X)

and some fixes:

- leftmouse click now works in NLA and Action window to select a
  strip in the left part
- faceselect+vpaint mode didnt show both panels
2003-10-22 23:20:44 +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
77b37c9927 - fix for drawing buttons in fileselectors, it used an old exception
and special 'EMBOSSF' drawing function. Now complies to standard.
2003-10-16 12:03:03 +00:00
10333bd1d3 - removed all #include "interface.h" from files. this is a local/internal
include only (use BIF_interface.h instead)
- split up interface.c in two files: NEW: interface_panel.c
- removed the temporal text files

WARN: FIX AUTOMAKE AND MSVC!
2003-10-15 19:23:54 +00:00
842bb449c5 huge commit, sorry!
this is part 1 of the UI makeover. It has:
- menu system from Matt integrated
- buttons drawing from Matt
- generic button panel system implemented
- converted displaybuttons (not the rest yet)
- cleaned up a lot in drawing spaces itself, to make it aligned and pixel exact.
- cleaned loads of little compiler warnings, protos...

still a lot of work needed, will all be in next week i hope!

(warn: 2 new c files! butspace.c and buttons_scene.c)
2003-10-04 20:35:50 +00:00
597875cb69 first of the c code comment translation in the mother of all directories! 2003-04-28 14:43:20 +00:00
1f3f52f5e4 Update space dispatch:
- drawXXXspace, changeXXXspace, and winqreadXXXspace now receive the area
     and spacedata as explicit arguments, allowing them to access private
     data w/o going through globals.
 - pass the new BWinEvent through to the winqreadXXXspace, allowing future
     access to extended event data.

Removed direct calls to winqreadXXXspace to simulate user actions, replaced
by calls to action functions in edit.c or the appropriate handler.
2003-03-24 01:46:05 +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