Blender Git Loki

Git Commits -> Revision 5490897

Revision 5490897 by Ton Roosendaal (master)
December 2, 2008, 14:22 (GMT)
Lots of stuff; couldn't commit in parts because of refactor work.

* Changes in interface/ module

This commit brings back the way how buttons/menus work under control
of WM event system. The previous implementation extended usage of
handlers and operators in an interesting but confusing way. Better to
try it first according the design specs. :)

Most obviously:
- modal-handler operators are not stored anymore in regions/areas/windows.
such modal handlers own their operator, and should remove it themselves.
- removed code to move handlers from one queue to another.
(needs review with brecht!)
- WM fix: the API call to remove a modal handler got removed. This was a
dangerous thing anyway, and you should leave that to the event system.
Now, if a handler modal() call gets a cancel/finish return, it frees
itself in event system. WM_event_remove_modal_handler was a confusing
call anyway!

Todo:

- allow button-activate to refresh after using button
- re-enable arrow keys for menus
(do both after commit)

- review return values of operator callbacks in interface_ops.c

* Fixes in WM system

- Freeing areas/regions/windows, also on quit, now correctly closes
running modal handlers
- On starting a modal handler, the handler now stores previous area
and region context, so they send proper notifiers etc.

* Other fixes

- Area-split operator had bug, wrong minimal size checking. This
solves error when trying to split a very narrow area.
- removed DNA_USHORT_FIX from screen_types.h, gave warning
- operators didn't get ID name copied when activated, needed for
later re-use or saving.


Commit Details:

Full Hash: 54908979c54ab332156f438e995d5dce8ee8420c
SVN Revision: 17678
Parent Commit: c4fe6d0
Lines Changed: +148, -181

18 Modified Paths:

/source/blender/blenkernel/intern/screen.c (+5, -0) (Diff)
/source/blender/blenloader/intern/readfile.c (+0, -3) (Diff)
/source/blender/editors/interface/interface_ops.c (+34, -16) (Diff)
/source/blender/editors/interface/view2d_ops.c (+1, -2) (Diff)
/source/blender/editors/screen/screen_edit.c (+6, -9) (Diff)
/source/blender/editors/screen/screen_ops.c (+18, -25) (Diff)
/source/blender/editors/space_time/ed_markers.c (+1, -3) (Diff)
/source/blender/editors/space_time/time_ops.c (+1, -2) (Diff)
/source/blender/makesdna/DNA_screen_types.h (+0, -14) (Diff)
/source/blender/makesdna/DNA_windowmanager_types.h (+0, -1) (Diff)
/source/blender/nodes/intern/CMP_util.h (+0, -9) (Diff)
/source/blender/nodes/intern/SHD_util.h (+0, -7) (Diff)
/source/blender/nodes/intern/TEX_util.h (+0, -4) (Diff)
/source/blender/windowmanager/intern/wm_event_system.c (+54, -76) (Diff)
/source/blender/windowmanager/intern/wm_init_exit.c (+16, -0) (Diff)
/source/blender/windowmanager/intern/wm_operators.c (+4, -4) (Diff)
/source/blender/windowmanager/WM_api.h (+3, -4) (Diff)
/source/blender/windowmanager/wm_event_system.h (+5, -2) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021