Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2009-01-01 16:15:35 +0300
committerTon Roosendaal <ton@blender.org>2009-01-01 16:15:35 +0300
commite9a3b4f85df2261cafea0bfc9f0a885708cdf9d6 (patch)
treed4ebc689eb2f61a1af93ccd13b882e55e635c455 /source/blender/windowmanager
parenta1c4d1c735c59b5911dbd0d8557b8f2b32263fe5 (diff)
2.5
- Edit mode Mesh undo/redo back (undo for editmodes needed recode, todo for curve/lattice/etc) - Added border select for edit mesh - Added Akey (de)select all for edit mesh - Added notifiers for mode changes. This is also the first trial to dynamically add/remove keymap handlers, based on modes. For that reason the Object keymap was split in 2, modal and non-modal. On TABkey, the view3d listener removes and adds maps. The view3d keymap still handles generic mouse/border selection. Internally it will verify modes. The modes are not re-implemented still... have to move this to scene context.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/WM_types.h16
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c4
-rw-r--r--source/blender/windowmanager/intern/wm_files.c1
-rw-r--r--source/blender/windowmanager/intern/wm_init_exit.c3
4 files changed, 19 insertions, 5 deletions
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h
index 5b49e0dd590..770c3481b8f 100644
--- a/source/blender/windowmanager/WM_types.h
+++ b/source/blender/windowmanager/WM_types.h
@@ -30,6 +30,7 @@
struct bContext;
struct wmEvent;
+struct wmWindowManager;
/* exported types for WM */
@@ -114,6 +115,7 @@ typedef void (*wmUIHandlerRemoveFunc)(struct bContext *C, void *userdata);
typedef struct wmNotifier {
struct wmNotifier *prev, *next;
+ struct wmWindowManager *wm;
struct wmWindow *window;
int swinid;
@@ -152,7 +154,7 @@ typedef struct wmNotifier {
#define ND_SEQUENCER (6<<16)
#define ND_OB_ACTIVE (7<<16)
#define ND_OB_SELECT (8<<16)
-#define ND_OB_EDIT (9<<16)
+#define ND_MODE (9<<16)
/* Object */
#define ND_TRANSFORM (16<<16)
@@ -165,6 +167,18 @@ typedef struct wmNotifier {
/* subtype, 256 entries too */
#define NOTE_SUBTYPE 0x0000FF00
+/* subtype scene mode */
+#define NS_MODE_OBJECT (1<<8)
+
+#define NS_EDITMODE_MESH (2<<8)
+#define NS_EDITMODE_CURVE (3<<8)
+#define NS_EDITMODE_SURFACE (4<<8)
+#define NS_EDITMODE_TEXT (5<<8)
+#define NS_EDITMODE_MBALL (6<<8)
+#define NS_EDITMODE_LATTICE (7<<8)
+#define NS_EDITMODE_ARMATURE (8<<8)
+
+
/* action classification */
#define NOTE_ACTION (0x000000FF)
#define NA_EDITED 1
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 8a4f93d8a3f..6e53b130817 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -104,9 +104,11 @@ void WM_event_add_notifier(bContext *C, unsigned int type, void *reference)
{
wmNotifier *note= MEM_callocN(sizeof(wmNotifier), "notifier");
- BLI_addtail(&CTX_wm_manager(C)->queue, note);
+ note->wm= CTX_wm_manager(C);
+ BLI_addtail(&note->wm->queue, note);
note->window= CTX_wm_window(C);
+
if(CTX_wm_region(C))
note->swinid= CTX_wm_region(C)->swinid;
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index 466500a7aa1..c0fcc990ff7 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -79,6 +79,7 @@
#include "ED_datafiles.h"
#include "ED_screen.h"
+#include "ED_util.h"
#include "UI_interface.h"
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c
index 15001ea5333..8eca5850628 100644
--- a/source/blender/windowmanager/intern/wm_init_exit.c
+++ b/source/blender/windowmanager/intern/wm_init_exit.c
@@ -257,9 +257,6 @@ void WM_exit(bContext *C)
// if (copybuf) MEM_freeN(copybuf);
// if (copybufinfo) MEM_freeN(copybufinfo);
- /* undo free stuff */
-// undo_editmode_clear();
-
BKE_undo_save_quit(); // saves quit.blend if global undo is on
BKE_reset_undo();