Commit Graph

145 Commits

Author SHA1 Message Date
562d6958cb Another step in the undo evolution.
- Made unified API for undo calls, to be found in space.c
  BIF_undo_push(char *str)
  BIF_undo(void)
  BIF_redo(void)
  These calls will do all undo levels, including editmode and vpaint.

  The transition is work in progress, because mesh undo needs recode.

- New global hotkey CTR+Z for undo
  Note: 'shaded draw mode' still is SHIFT+Z, the old CTRL+Z was to recalc
  the lighting in shaded mode, which already became much more interactive,
  like during/after any transform().
  Recalc hotkey now is SHIFT+ALT+Z

  CTRL+<any modifier>+Z is redo.

- For OSX users; the Apple-key ("Command") now maps to CTRL as well. This
  disables the one-mouse-button hack for rightmouse btw, will be fixed in
  next commit. At least we can use Apple-Z :)

- Old Ukey for undo is still there, as a training period... my preference is
  to restore Ukey to "reload original data" as in past, and only use new
  CTRL+Z for undo.

- Added undo_push() for all of editobject.c and editview.c. Meaning we can
  start using/testing global undo in the 3d window. Please dont comment on
  missing parts for now, first I want someone to volunteer to tackle all of
  that.

- Since the global undo has a full 'file' in memory, it can save extremely
  fast on exit to <temp dir>/quit.blend. That's default now when global undo
  is enabled. It prints "Saved session recovery to ..." in console then.

- In file menu, a new option is added "Recover Last Session". Note that this
  reads the undo-save, which is without UI.

- With such nice new features we then can also kill the disputed
  Cancel/Confirm menu on Q-KEY.

- Added fix which initializes seam/normal theme color on saved themes.
  They showed black now.... (Note: that's in usiblender.c!)
2004-09-18 12:12:45 +00:00
bf83f6ddd8 Second itteration of global undo system. Now based on:
- file-to-memory save
- incremental difference steps (compression)

everthing has been tightly coded to use minimum of memcpy or allocs. In
fact this system works with a single full buffer (=file) in memory, and undosteps as differences from it.
Speed gain is factor 4-8 faster. I've added it in CTRL+ALT+T timer menu for
a test. Please note the gain is especially in the undo-storing, not in
retrieving undo.

Also new: file read option to skip UI read (file menu). This now also is
default for the undo system.
2004-09-05 13:43:51 +00:00
bd31cc5eb4 Enabled trial for 'global undo'. This now only has undo steps for
- transform (grab, rot, scale, etc)
- all button commands, including menus

I sacrificed for now the UKEY in the 3d window for it. Shift+U does a redo.
(Only in 3d window)

What this system does is saving files in the temp directory (user pref).
The filenames are cycled around (32 in total now).

This commit will follow shortly with a userpref for it, not to frustrate
people who want to work in normal fashion with blender.
2004-08-31 20:13:32 +00:00
0a305446a5 Three functionalities in one commit, but there's overlap so I can't
separate it...

1) Curve/Surface editmode undo
Uses same syntax as mesh undo, so simple to integrate. Edit-curve data is
also quite simpler, so no need for any hack at all.
It re-uses the undo system from next point, which is nice short & clean
local code

2) Framework for global undo
The undo calls themselves are commented out. In a next commit I want to
enable it for a couple of main features, for further feedback.
The speed goes surprisingly well, especially with this new version that
'pushes' undo after a command, ensuring interactivity isnt frustrated

3) framework for texture based icons in Blender
Not activated code, but tested here. Part of 2.3 UI project.

btw: Johnny Matthews will assist in (and complete) the undo project
2004-08-31 13:43:18 +00:00
89ba6db7bd Small tweak to the colour picker - make the palette
buttons rectangular, even in the rounded theme
2004-08-05 12:40:20 +00:00
aae6039583 Slightly improved clipping of rgb colors in HSV picker, to prevent the Hue
slider in bottom to block on colors 0,0,0 or 1,1,1

This is not scientific yet, but could be released :)
2004-08-04 23:19:57 +00:00
002af38739 Fix for some bad code that MSVC choked on. Thanks
jesterking for pointing it out, I think I'd better go sleep
or something...
2004-08-04 08:02:44 +00:00
d1322bfaa8 Tweak to the colour picker after conversation with Ton.
Moved the buttons to the side, so it's:
* consistent with the layout of the floating panel version
and consistent with the vertical R/G/B sliders layout
* using real number fields instead of abused menus :)
2004-08-04 06:52:41 +00:00
8224b1b164 - calculation of position within HSVCUBE button (picker) had wrong Y
coordinate, only noticable in Panel versions of picker

- the fix to give Transform properties new name "Paint" can't
  work with this code... this due to fact that panel positions are saved
  in files or looked up on re-open based on their names. Giving the Panel
  a new new name then causes it jump to another position, and back on end
  of painting.
  Needs to be solved in another way. Not feasible for 2.34...
2004-07-31 22:05:46 +00:00
c726751760 Attempt #3 (or so) to solve the "weird buggy" hardness slider updates. :) 2004-07-29 20:50:13 +00:00
fcd19e73df Change in handling of ui_do_buttip(). It doesnt use the global var, but
gets it as argument. Potential fix for windows crash
2004-07-28 21:31:26 +00:00
4d3cca252c Fixed small calculation error for non-float slider, which defined
whether redraw was needed. This shows on (some) windows cards that the
button continuously keeps updating/flashing.

Since I can't test it here, please confirm :)
2004-07-27 14:26:11 +00:00
36375b1c29 Added colorpicker support for theme editor 2004-07-22 13:40:17 +00:00
4a13a5720d Ack! Fixed something without testing... this broke updates for numbuts
in picker.
2004-07-12 21:40:41 +00:00
6b092cf8ad Tiny cleanup in call for glBitmap. Don't see any error in using it for
drawing vertices... on OSX this works 100%, also in zbuffer mode and with
transparent faces.
Code is simple enough for a linuxer to further test!
2004-07-11 08:46:26 +00:00
4e9ddbdc4c Added colorpicker in Panel for:
- Transform properties 3d win, while Vertex/Texture paint is on
- Paint panel in UV window

Note; both use the same GVP struct to store current color in. Also the
function used now to add picker isn't complete... might need further
thinking over. Consult me when you like them in more places.
2004-07-10 17:40:40 +00:00
7ba95846ca Typing values in color picker got a mixup in but->func() usage... caused
weird values to be set after entering a value. Nicely solved now.
2004-07-09 09:21:37 +00:00
5b09bb1eb1 - Removed new outline drawing from vpaint/faceselect and other paint modes
- fixed tooltip drawing in color picker
2004-07-06 16:32:44 +00:00
181b970bf4 Fixes in colorpicker;
- click on palette didn't update button values
- the bottom 'palette' button now restores to old color
- H values scroll allways, also with black or white

Todo still:
- save in file (btw, i changed default colors to my pref :)
2004-07-06 12:49:57 +00:00
4321a8889e Colorpicker variant 2; One large field for S and V, and slider for H, like
Gimp has for example.

The previous picker is still as code there... ongoing experiments.
2004-07-05 22:15:27 +00:00
20dbb446ed Picker made slightly larger, and removed confusing "copy to" and "paste
from" buttons.

Now a click in palette is default: update the active color.
If you want to store in palette: hold CTRL while click.

This isn't optimal either, but at least better.
2004-07-05 20:45:41 +00:00
ba2081b21d Fixed NUM button code that it doesn't return halfway, but nicely proceeds
to end of the function to handle the exit requirements.
(returns where added for patch that makes NUM buttons into textbut on a
click in center)
2004-07-05 17:48:47 +00:00
a910ff343e - clipped selection circle in colorpicker to prevent it drawing outside
the color plane
- removed warnings from glutil.c, made circleXOR call become float instead
  of short
- fixed error in drawing text of buttons in pop-up menus, when zoomed small
2004-07-05 10:22:00 +00:00
3cade4dad6 Changed redraw of picker not to include the background, prevents flashing. 2004-07-05 09:21:22 +00:00
cd47cfd3d1 New: color picker!
With a click on the 'COL' buttons (the ones showing RGB) a menu pops up
with three colorpicking fields and a palette.
The fields are the three planar intersections of a HSV cube, each allowing
choosing in the field without the field changing.

The palette is 'modal' unfortunately (couldn't find a simple working other
method) where the button "paste to color" denotes the state that click in
palette copies to edited color, and "copy to palette" means the active
color is copied into the palette...

Todo:
- saving of palette in file
- decide whether ESC leaves without changes...
2004-07-05 08:48:17 +00:00
c1ce82bd67 Directly edit number fields with a click instead of having
to use Shift-Click.

As before, clicking on the left side of a number field decreases, clicking on the right side increases, but clicking in the centre, on the text itself, starts editing the
value directly. Other behaviour like dragging left and right
is unchanged.
2004-07-05 07:52:32 +00:00
830028560e Tooltips:
- lowered tooltip-update delay loop to 0.02 sec (was 0.05), which showed
  up 'trails' while going over pulldowns with tooltips
- changed tooltip calculation for size, it was drawing the labels far too
  large (height). Made sure text prints in middle too.
- by default tooltips print 12 pixels below button now
2004-06-19 14:37:25 +00:00
4091851043 Replace all glFinish() with glFlush().
This is supposed to fix gradual slowdown of Blender interface on ATI cards.
2004-06-16 11:34:45 +00:00
506b78bfbb * Big, mundane clean up and edit of (error/ok/etc)
messages and pupmenu()s. Edited spelling and grammar,
 stylistic consistency, etc.

I added the guidelines and rationale that I used to the
 CMS here:
http://www.blender3d.org/cms/Language_and_terminology.338.0.html

Next step is to get icons in there, to make it easier to see
 at a glance what sort of message (and how much attention
 should be paid to it, or if it can be dismissed with a flick
 of the mouse, eg. boring remove doubles notifications)

mockup: http://mke3.net:9000/blender/ui/controls/error_ok_icons.png
2004-06-05 05:55:15 +00:00
a1f5e64239 Tweaked the display and positioning of tooltips so they aren't obscured by the mouse pointer.
This is addressing bug #952
2004-05-17 14:36:13 +00:00
83907fc5f7 Num-slider buts and CTRL didn't work when range was > 1.0 2004-05-07 19:56:26 +00:00
66578d2900 Fix for CTRL+drag on sliders and number buttons.
The code wasn't correct at all (for ages!). Rule now again is:

Button range 0.0-2.0 : ctrl goes with steps of 0.1, shift+ctrl steps of 0.01
Button range 2.0-20.0: ctrl goes with steps of 1.0, shift+ctrl steps of 0.1
Button range larger: ctrl goes with steps of 10.0
2004-04-22 17:46:07 +00:00
b37e9eafeb - NLA Window:
Added support for Panels, and converted old NKEY menu here.
Also enabled zooming in further, as for Action Window.
(note: this editor can use some work, this action stuff is underdeveloped
and mysterious!)

- UI code
Brought back fix that sets for each Panel a GL matrix for UI code thats
coming after it. This makes system more flexible, and prevents conflicts
with other uiBlocks in a window (like ipo, action).
This will give a tinsy bit more load for moving mouse around... please
report back if this causes troubles.
2004-04-22 12:36:27 +00:00
282d063569 commented out code to enable multiple uiBlocks in window with different
matrices (like action window should have). This one gave error in
IpoWindow with Panel.
2004-04-21 18:04:02 +00:00
d694335cc2 Another phase in panelizing all window types. Did lots of small code
fixes, including:

- Panel in action window (disabled it, since there's no need for it)
- fix: when action was added to mesh with vertex keys, the action couldn't
  be deleted, nor did action window draw key names
- mouse on RVK (key) in Action window: Nkey menu pops as well.
  This is not a good candidate to put in Panel, no selection possible here.
- when you change name of RVK in action window, it shows in IpoWindow too
2004-04-20 18:27:10 +00:00
c8cadcd557 Bug 729
When more than 30 scenes are in a scene, the sequencer "Add" option didnt
show a databrowse window.
This was a nasty one, because databrowse facilities are more-of tied to
having a header. The fix is that I added option to IDnames_to_pupstring()
to not limit the menu (by passing NULL for menu short pointer).

Also noticed a bug with pupmenu_col(), which did return on a val==0 event
(mouse release) which shouldn't be, this makes sequences of menus not
possible.
2004-04-10 15:13:28 +00:00
a9b1cd6a0e Bug 1016
When you use arrow keys to activate items in a menu (like IKEY for Ipos)
the selected items were not correctly choosen when mousepointer was over
an item, only when mousepointer over title.

Fixed by catching 'RETKEY' event in buttons event subloop.
2004-04-08 13:18:46 +00:00
d2f95ea72e bug fix 1009
Arrow keys to select items were flipped for button type MENU.
2004-04-06 20:31:11 +00:00
d82ab2bfc3 - small patch to make sure buttons are fully used for strings (when it
doesnt fit), plus the 'user count' button now increases in size when
  amount is larger than 10.
  was report #1049
2004-03-25 13:30:20 +00:00
9ed4436058 Updated the Sun ifdef's basically I standardized them so they
were all the same and make sure all platforms see them.

Kent
2004-03-06 19:32:33 +00:00
74680a07c0 Removed a fudge factor of .5
think it was an old opengl hack for something.

See for more info:
http://www.blender.org/modules.php?op=modload&name=phpBB2&file=viewtopic&t=3107

Also the person that should get credit for this is: chrish and meestaplu

Kent
2004-03-02 18:50:54 +00:00
Chris Want
8410cdd71c Todd Koeckeritz' patch to fix inconsistent placement in multicolumn
menu's.
2004-02-21 16:50:09 +00:00
682751cd4f * Widened the tooltips when using non-AA fonts, so there's a margin between the top of the tooltip and the ascender. 2004-01-28 12:20:19 +00:00
2037ef9d25 - code i committed for correct arrowkeys on selecting items in pulldowns
broke the ui_mouse_motion_towards_block() function. This made sure
  mouse motion (diagonal) towards a new opened sub-level keeps the sub-
  level open.
  Fixed!
2004-01-24 17:26:58 +00:00
e93e5d37da - when pulldown menus get flipped, the arrow keys were not behaving OK.
also added that left/right arrow is handled, to prevent weird redraw.
2004-01-23 20:54:26 +00:00
24c43b835d - pressing Enter key on numbutton increases/decreases again.
- added displist.h for proper prototype in previous commit
2004-01-16 21:16:09 +00:00
4a8f52f619 Converted the Userpreference buttons to zr's new ButBit calls.
Also added USER_*  to each define located in DNA_userdef.h.
2004-01-13 14:50:45 +00:00
eb6ef538e9 - committed new uiDef{Icon,IconText,}ButBit? functions
- change object draw flag buttons to use new functions (just an example)

 While I probably wouldn't recommend patching other buttons to use the new
functions a week before release, it is a good (simple but tedious) project
to complete. Note that some code actually defined the constants for the
bit index, when such code is fixed the _BIT constant should be removed from
the headers.

Example:
DNA_constraint_types.h:
#define CONSTRAINT_DISABLE		0x00000004
#define CONSTRAINT_DISABLE_BIT	2

buttons_object.c:
uiDefIconButS(block, ICONTOG|BIT|CONSTRAINT_EXPAND_BIT, ...);

The button definition should change to:
uiDefIconButBitS(block, ICONTOG, CONSTRAINT_EXPAND, ...);

(whats that, the more correct way uses less typing, GOOD GOD!)
and the CONSTRAINT_DISABLE_BIT define should be removed.
2004-01-08 19:53:19 +00:00
d959b8127b Applied Daniel Fairhead's patch for a correct working DELKEY in textinput buttons.
(thanks!)

Added a 'void' somewhere to silence a compiler warning.

(Windows only)
Moved the flip fullscreen button in the topheader a little to the right, since the
questionmark button mysteriously disappeared.
2004-01-07 23:33:40 +00:00
65aeef11e1 Alex Mole's patch for END and HOME
http://www.blender.org/pipermail/bf-committers/2003-December/004691.html

Makes HOME and END keys work in text space and text
edit boxes.

I've tested it for some time now and I haven't had any problem or spotted any irregularities of some sort.

One think though. It doesn't update the panning of the text window if the cursor gets out of the screen. I guess someone (more familiar with the code) could look into this.

Really nifty when coding scripts.
2003-12-28 21:28:35 +00:00