diff options
author | Elia Sarti <vekoon@gmail.com> | 2009-07-25 19:26:06 +0400 |
---|---|---|
committer | Elia Sarti <vekoon@gmail.com> | 2009-07-25 19:26:06 +0400 |
commit | 24d39c0de496cb8c3640564757cae2c383efa154 (patch) | |
tree | b7f7f0c5c168ac00da14404893e7bab62769a130 /source/blender/editors/space_outliner/outliner_ops.c | |
parent | 5b12cb937890f1f85f365b4b1658cef241384ea2 (diff) |
2.5 / Drag & Drop
Commit of basic architecture. Sorry, nothing fun to play with yet.
Added two events: MOUSEDRAG and MOUSEDROP. MOUSEDRAG is sent when left-mouse clicking and then moving the cursor and every time the cursor is moved until the user releases the mouse button, thus generating a MOUSEDROP.
Also added two dummy drag operators in view3d and outliner (place holders for now).
Brecht and Ton: feel free to check/edit especially the event system code. I'm not sure that's the right way to do it. Also, I'm getting some mem leaks which I suspect are caused by my code.
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_ops.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_ops.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/space_outliner/outliner_ops.c b/source/blender/editors/space_outliner/outliner_ops.c index 2e11eb379b4..417851982a3 100644 --- a/source/blender/editors/space_outliner/outliner_ops.c +++ b/source/blender/editors/space_outliner/outliner_ops.c @@ -56,6 +56,8 @@ void outliner_operatortypes(void) WM_operatortype_append(OUTLINER_OT_id_operation); WM_operatortype_append(OUTLINER_OT_data_operation); + WM_operatortype_append(OUTLINER_OT_drag); + WM_operatortype_append(OUTLINER_OT_show_one_level); WM_operatortype_append(OUTLINER_OT_show_active); WM_operatortype_append(OUTLINER_OT_show_hierarchy); @@ -87,6 +89,9 @@ void outliner_keymap(wmWindowManager *wm) WM_keymap_add_item(keymap, "OUTLINER_OT_item_rename", LEFTMOUSE, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "OUTLINER_OT_operation", RIGHTMOUSE, KM_PRESS, 0, 0); + /* drag & drop */ + WM_keymap_add_item(keymap, "OUTLINER_OT_drag", MOUSEDRAG, KM_ANY, 0, 0); + WM_keymap_add_item(keymap, "OUTLINER_OT_show_hierarchy", HOMEKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "OUTLINER_OT_show_active", PERIODKEY, KM_PRESS, 0, 0); |