- 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!)
- 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.
- 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.
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
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 :)
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...
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 :)
- 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.
- 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 :)
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.
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
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...
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.
- 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
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
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
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.
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
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.
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.
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!
- 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.
(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.
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.