Commit Graph

190 Commits

Author SHA1 Message Date
0e9dd3060e Fixed a majority of the mirror function bug. AFAIK, the last bug remaining is related to flipping normals.
Also added a couple of undo_push_mesh where they were lacking (mainly Merge, Smooth, Mirror)
2003-11-12 23:34:24 +00:00
1c8ae70249 - further cleanup of window matrix code. Now ALL 2d ortho calls are
using an identical offset; which is 0.375 and official recommended
  by OpenGL.
  This to further investigate the AA font errors on some systems
  with ATI cards.
2003-11-12 21:14:30 +00:00
27ddef2ad5 - zooming in for action window increased 5 fold.
(bug report #679). Also corrects old files for it.
2003-11-08 19:04:50 +00:00
b4c25d241b - another fix because of the stricter 'qualifier key' checking;
ctrl+mouseclick didnt work to select objects in editmode, needed for
  making vertex parents.
2003-11-08 18:37:28 +00:00
7390acc2b4 Middle mouse emulation fix.
I know Ton fixed this already, but I modified it to be more in accordance with what we decided to do in Space.c
2003-11-07 01:52:31 +00:00
fa6a1bc5fe -fixed bug; ALT+LeftMouse emulates MiddleMouse again. 2003-11-06 15:28:40 +00:00
2eaf0523cf - missing break statement caused middle mouse click to zoom one step,
only in text editmode
2003-10-29 22:53:09 +00:00
f3a809b09f - made option for auto open toolbox on left/mouse hold.
standard starts with 0.5 sec. Turn the threshold value up to effectively
  disable it when you dislike it. But give it a try!
- added 'Home' after splitting window for buttonswindow
2003-10-29 01:10:10 +00:00
5ea904faca - added another load of items to new toolbox... yeez, what an
ENORMOUS job Matt has done with the menus! :)
- followed as much as possible order and options in pulldowns, but since
  toolbox has more categories, it is split up sometimes.
- did some minor changes in pulldowns to make it more consistant
- not yet: armature & text options...
- not yet: toolbox in other window types

(warning; shift+a now is new... eek!)
2003-10-29 00:23:16 +00:00
10c452e13e - fixed hotkey error; apply object needs 2 combos
- changed call to selectconnected to accept qualifier as input
  (need to do that for all such tools... no more checking inside!
2003-10-28 21:28:13 +00:00
5f3a96be10 Fixes after report from Matt:
- errors in names/hotkeys pulldowns fixed
- full window option in pulldown win caused ortho on/off event
- weight paint now shows vertex color Panel in editbuttons
- adding armature while vpaint mode, didnt end vpaint mode
- cleaned up some buttons design
- leftmouse press-hold for toolbox also moved 3d cursor
2003-10-28 18:43:55 +00:00
f7b513ea7a Fixed Edge shift selection with Ctrl-Alt-Shift-Right click
Please, if you find anymore bugs like this, report them.
2003-10-28 17:47:04 +00:00
5bd910ae2c - added buttons for NKEY menu editmode curve, nurbs, armature
- same for PoseMode
2003-10-28 16:26:51 +00:00
4bec8ba7d5 Fixing loose ends:
- nkey menu for buttonswindow (hex values) couldnt be restored yet, is
  for next release
- replaced Nkey in IpoWindow with Panel, this now displays the buttons
  that were formerly in 'anim buttons' as well; to view the boundbox
  values of all visible curves, and adjust it.
- the new panel also has the 'set speed' option, fixed stuff in it and
  added better errorwarning... still not a very well coded tool!
2003-10-28 14:20:03 +00:00
Stephen Swaney
df53e57bf3 Missing feature: Snap menu was not available in editmode.
Fixed compiler warning about ambiguous else in TKEY block.
2003-10-28 07:15:02 +00:00
829c0340f2 mostly done for both toets.c and space.c
maybe a couple of odd cases here and there. I'll be cleaning tomorrow.
2003-10-28 03:08:50 +00:00
bfef1d0d92 Hotkey fixes for space.c
renaming mirrormesh to mirrormenu and added to the hotkey M in editmode (Layer move no longer works in edit mode)
2003-10-27 23:55:38 +00:00
cc35c992b3 Added K Menu for Loop Select, Loop Cut, and Knife tools. 2003-10-26 21:22:32 +00:00
9ea73362ae New feature!
You now can adjust the way the default 'solid opengl' drawing happens.
It provides three lights now, all still located around your viewpoint.
In the UserSettings menu you can set them on/off, give location and
color / specularity.

Very nice to enhance modeling in solid drawmode :)

By default blender starts with 2 lights on now, but this is something we
can define in the default .b.blend later on.
2003-10-25 16:53:50 +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
5e64eb72a2 - Preserved selections in undo.
- Fixed spurious "recalc norm" enties in Undo.
2003-10-22 00:52:26 +00:00
fd3be2e3ef added sequence editor pull-down menus.
TODO: fix "Enter/Exit Meta Strip" to work correctly for nested
meta strips.
2003-10-20 20:12:01 +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
d5322a6352 Editmesh Undo:
User Info:
	Pressing UKey in mesh edit mode now undoes only last step.  Undo can save
	upto 64 steps of undo info.  This is configurable under User Prefs->
	Edit Methods.  The default is 32.  High numbers of undo steps use a
	lot of memory, since each step stores a copy of the mesh.

	Shift-U redoes the last undone step (Undoes the undo.)

	Alt-U brings up a menu of possible steps that can be undone.  Selecting
	an item on the list undoes that item plus all items before it on the list.
	The top selection "Undo All" is identical to the old Ukey.  It undoes
	all editing since entering Editmode, even if all regular undo steps are
	used up.

	Undo info is only saved for one object at a time.  You can leave and re-
	enter editmode for the same object, and all undo steps for that object are
	preserved.  Undo info for an object is lost once a different object is
	edited.

Coder Info:
	In order for undo to work, a checkpoint save has to be made.  This is
	done with a call to undo_push_mesh("name of step").  This should be done
	after the last quick abort for a function (typ. the
	"if (G.obedit==0) return;", or similar).  the undo_push_mesh() does alter some
	flags, so don't try to be too tricky and call undo_push_mesh() too late.
	The step name is what shows up in the undo_menu.  The name "U" is reserved.
2003-10-19 20:52:34 +00:00
de64d218a0 Adding Knife tool as to be released in 2.3
User Info:
	To use this tool, select a group of verts, it can be larger than the
	desired cut as explained below.  Then hit Shift-K.
	The tool will  prompt for cut type (Exact line or Edge centers),
	Select, then use LMB to draw a "cut-line".  Holding down LMB causes
	a freehand draw, clicking LMB causes a polyline draw.  MMB locks the axis.
	When done press enter to divide mesh on cut line. Subdivide routines have
	been modified to produce fewer triangles as part of this tool.
	Edge Centers preserves UV info, Exact Line does not (it will be there, just
	slightly distorted).

	Since the cut line exists in 2D space, and does not make a persistant
	selection that can be modified in another 3D view, the knife selection
	is the AND of the vertex selection and the knife line, ie; the edge will
	be subdivided only if both verts are selected, and the knife line crosses
	the edge.  Select your verts first, but you don't have to be overly
	precise. If you want to cut a few faces on the front of a sphere, you
	can select the whole front of the sphere, then knife the faces you want.

Coder Info:
	KnifeSubdivide is called with 1 of 3 modes. KNIFE_PROMPT, KNIFE_EXACT,
	KNIFE_MIDPOINTS.  The hotkey calls KNIFE_PROMPT.  When adding to a menu
	or button, explicitly call out the mode.

	Part of the tool provides get_mouse_trail() that returns a CutCurve struct
	that defines a knife line.  There are modes defined, but currently they are not
	implimented.

	Another part of this tool defines new behaviour for subdivideflag().
	Setting beauty param to B_KNIFE	tells subdivideflag() that the edges
	are preselected ans to skip the vert check.  Also setting B_PERCENTSUB tells
	subdivideflag() to divide the edge at a percentage of the distance from
	eed->v1 to eed->v2.  This percentage is passed in the eed->f1 flag as a
	short (ie, setting eed->f1 to 16384 cuts the edge half-way).
2003-10-19 19:50:17 +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
f420f87610 - added Theme for File Window
- made grid drawing using the main theme color
- was annoyed with the primitive grid... so coded something that allows
  zooming in and out a 100fold without losing gridlines
- brought back 'NKEY' for mesh editmode
- added to this a 'median' option; when more vertices selected you see
  the average coordinate. works nice when inputting values as well
  (todo: make this for other editmodes)
- renamed the 'NKEY' panel to 'Transform Properties', also fixed in
  pulldown menu.

I am off for the rest of the day. More committing fun tomorrow!

-Ton-
2003-10-18 12:21:41 +00:00
a9af685011 - further work on theme colors:
- panels work
  - ipo window done
  - buttonswindow done

Please be warned that saving  Themes now wont work... it will also save
BLACK for all uninitalized colors... so dont panic when you see weird
things, just go back the default theme and copy a new one.
2003-10-17 23:18:18 +00:00
d622706883 Preliminary work on faceloop selection and faceloop cutting. Commiting in steps to prevent Ton from sneaking in between me! :D
some small things to fix:

- cutting on 1 face doesn't work
- options now under shift/ctrl R, they will be under a K menu that will contain DetectiveThorn's Knife tool too.

Roel
2003-10-17 19:59:32 +00:00
58a0811ad9 - fixed bug in windows with extreme small height... it didnt accept
input
- was needed for usage of this windowtype (headerless) as 'timeline'
  dragger, which was supposed to be...
- as extra I fixed 'home', it sets start/end frame for sound window
- at mouselocation the current frame or time is printed
- rightmouse menu switches seconds/frames (should be in header as option...)
- displaybutton 'frs/sec/' updates soundwindow too

So, its not perfect... but try opening a tiny high headerless audio
window on top of buttonswin or somewhere full width. not bad...
2003-10-17 19:03:53 +00:00
e78bb262c2 - fixed redraw for copy button in new themes editor
- typo in include DNA_ListBase.h... has to be DNA_listBase.h
2003-10-17 15:12:45 +00:00
8380bc9cab - one button was invisible... 2003-10-17 14:11:17 +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
c7618783fb - further work on view3d panels:
- you can close them (x icon) or press ESC
- option to open panel at mouse location (try Nkey)
- using 'collapse' (triangle icon) stows header in bottom
- opening again restores at old location
- dragging panels or zooming clips nicely with window

evaluate: an 'auto close' when mouse goes outside panel

Warning: vertex selecting still broken! :) It's 2 am now, bedtime...
2003-10-16 00:17:24 +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
44344b3501 - More code for handling Panels in other windows.
Added the 'Nkey' object menu as Panel now. Live updates, whoohoo!

closing them, minimizing, etc will follow. first bring back vertex
selection :)
2003-10-15 16:01:08 +00:00
6480956c58 - expanded internal windowmanager that it allows button panels in any
window (type)
- each SpaceData struct (not the window!) can get 'block handlers'
  assigned, basically event codes that invoke drawing button panels.
- this is saved in files, and Panels behave in any window like it does now
  in buttonswindow
- it also means that a 'space window' should leave with a matrix set for
  buttons level
- try it in view3d header menu, 'view'->'backdrop'. this opens the old
  viewbuttons
- it all works non blocking! instant updates of viewbuttons visible in
  3d window now.

Not done yet:
- checking and fixing frontbuffer drawing (select a wireframe draws over)
- temporally vertices cannot be selected, is my next project
- closing or hiding Panels...
- styling stuff... i committed for others to review as well.

Have fun. this is certainly a huge improvement over the old viewbuttons!
2003-10-15 12:26:26 +00:00
ceb26d2a4e - experiment: changed drawing style of Panels to minimal and fully
transparant.
- converted the Texture buttons, they're nice too!
2003-10-13 14:57:43 +00:00
Alexander Ewering
5c2005cf06 Robert (DetectiveThorn) Wenzlaff's Knife subdivide tool. See previous
message on Bf-committers for description.
2003-10-12 23:43:26 +00:00
5f6d8e59c4 - Converted lamp buttons and world buttons, they're pretty!
- menu auto open now is user preset, including 2 thresholds you can set
- hilites of pulldown menus were not cleared, fixed
- changed F4 key to logic. F5 will show lamp buttons, when lamp active
- in 'shader context' buttons, clicking camera will show world
- Converted lamp buttons and world buttons, they're pretty!
- menu auto open now is user preset, including 2 thresholds you can set
- hilites of pulldown menus were not cleared, fixed
- changed F4 key to logic. F5 will show lamp buttons, when lamp active
- in 'shader context' buttons, clicking camera will show world
2003-10-12 13:58:56 +00:00
0ce9abf41d - converted full materialbuttons...
EEEK! It doesn't look well yet! Hopefully it inspires others to come
  with great solutions.
- the material buttons have 6 panels, three of them merged
- some drawing errors in preview render
- made settings for new Material that makes sense for Flares
2003-10-11 22:00:30 +00:00
95ce9b93be - fixes in material buttons (still tentative design!)
- cutoff of text in menus and buttons now even better!
- size of pull-up menu buttons is corrected
- pressing at 'menu button' had a delay, fixed

General: the 'outo open' wont become default, it will be removed or
become a user option. I am experimenting with it to get it all OK.
The 'auto open' for secondary levels in pulldowns will remain there

Check the latest state of pull-up menu buttons. for example the mode
selector: you can use such buttons in three ways,

- click on it, it opens and you can select
- click-and-hold-mouse, move, release at item you want to select
- move mouse over button, wait, it opens

The 'auto open' and its time threshold both can be user settings.
2003-10-11 18:15:07 +00:00
0d03929b9b Another huge commit!!!
First, check on the new files, which are listed below.
The new butspace.h is a local include, only to be used for the buttons
drawn in the buttonswindow.

- editbuts, animbuts, gamebuts, displaybuts, paintbuts,  work now
- i quite completely reorganized it, it's now nicely telling you what
  context it is in
- sorting error in panel align fixed (tabs were flipping)
- align works correctly automatic when you click around in Blender
- editsca.c renamed to buttons_logic.h
- button names are truncated from the right for allmost all buttons
  (except text buttons and number buttons)
- while dragging panels, you cannot move them outside window anymore

And of course fixed loads of little bugs I encountered while testing
it all. This is a version I really need good test & feedback for.

Next step: restoring material/lamp/texture/world
2003-10-10 17:29:01 +00:00
f234b44d47 - another huge commit! read this!
- removed src/buttons.c and include/BIF_buttons.h
- added src/buttons.txt, which is the old buttons.c for review and adding
  code to new panels structure

- changed internal events to match new buttonspace structure
- added tabs for new shading group of buttons
- removed loads of little warnings, -Wall now compiles src/ almost without
  error (hint: setenv NAN_QUIET to see it all better)

Now I'm ready to do actual buttons -> panels conversion. I will do the raw
versions first, others then can cleanup
2003-10-07 18:24:02 +00:00
39b1ceb669 - changed header from buttonwindow into new type
- changed meaning of F4-F10 keys (as compatible as possible, but we need
  something!) check UI design doc for proposal
- made new call for switching direction of buttons in Y, for when pulldown
  moves direction
- cleaned up all redundant manual switching code from headerbuttons.c
2003-10-07 12:49:39 +00:00
13b7e74ddb - panels now scroll with page-up and page-down too. 2003-10-04 21:03:57 +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
b5450f0815 added 2 new features:
- "Seperate loose parts" is an option in the new pkey popup (in mesh editmode) that seperates a mesh based on objects in it that are not connected.

- "Select same uv" is an option in the wkey popup (in facemode) that selects all faces in the mesh that have the same uv texture assigned as the current active face.

ps. first commit! I hope I can live up to expectations...but don't expect too much! :D
2003-09-20 20:58:14 +00:00
3a6581ca22 - fix bug #480
SHIFT+C in 3dWindow didnt update the other 3d windows, when open.
2003-08-17 13:02:17 +00:00
abede3ca04 A little more cleanup, removed a bunch of unused vars in the code.
Trying to get rid of some of the extra warnings we can ignore ;)

Kent
2003-08-14 15:18:45 +00:00