Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/screen/screen_ops.c
| Show First 20 Lines • Show All 5,689 Lines • ▼ Show 20 Lines | static void keymap_modal_set(wmKeyConfig *keyconf) | ||||
| }; | }; | ||||
| /* Standard Modal keymap ------------------------------------------------ */ | /* Standard Modal keymap ------------------------------------------------ */ | ||||
| wmKeyMap *keymap = WM_modalkeymap_ensure(keyconf, "Standard Modal Map", modal_items); | wmKeyMap *keymap = WM_modalkeymap_ensure(keyconf, "Standard Modal Map", modal_items); | ||||
| WM_modalkeymap_assign(keymap, "SCREEN_OT_area_move"); | WM_modalkeymap_assign(keymap, "SCREEN_OT_area_move"); | ||||
| } | } | ||||
| static bool blend_file_drop_poll(bContext *UNUSED(C), | static bool blend_file_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event)) | ||||
| wmDrag *drag, | |||||
| const wmEvent *UNUSED(event), | |||||
| const char **UNUSED(r_tooltip)) | |||||
| { | { | ||||
| if (drag->type == WM_DRAG_PATH) { | if (drag->type == WM_DRAG_PATH) { | ||||
| if (drag->icon == ICON_FILE_BLEND) { | if (drag->icon == ICON_FILE_BLEND) { | ||||
| return true; | return true; | ||||
| } | } | ||||
| } | } | ||||
| return false; | return false; | ||||
| } | } | ||||
| Show All 13 Lines | void ED_keymap_screen(wmKeyConfig *keyconf) | ||||
| /* Screen General ------------------------------------------------ */ | /* Screen General ------------------------------------------------ */ | ||||
| WM_keymap_ensure(keyconf, "Screen", 0, 0); | WM_keymap_ensure(keyconf, "Screen", 0, 0); | ||||
| /* Anim Playback ------------------------------------------------ */ | /* Anim Playback ------------------------------------------------ */ | ||||
| WM_keymap_ensure(keyconf, "Frames", 0, 0); | WM_keymap_ensure(keyconf, "Frames", 0, 0); | ||||
| /* dropbox for entire window */ | /* dropbox for entire window */ | ||||
| ListBase *lb = WM_dropboxmap_find("Window", 0, 0); | ListBase *lb = WM_dropboxmap_find("Window", 0, 0); | ||||
| WM_dropbox_add(lb, "WM_OT_drop_blend_file", blend_file_drop_poll, blend_file_drop_copy, NULL); | WM_dropbox_add( | ||||
| WM_dropbox_add(lb, "UI_OT_drop_color", UI_drop_color_poll, UI_drop_color_copy, NULL); | lb, "WM_OT_drop_blend_file", blend_file_drop_poll, blend_file_drop_copy, NULL, NULL); | ||||
| WM_dropbox_add(lb, "UI_OT_drop_color", UI_drop_color_poll, UI_drop_color_copy, NULL, NULL); | |||||
| keymap_modal_set(keyconf); | keymap_modal_set(keyconf); | ||||
| } | } | ||||
| /** \} */ | /** \} */ | ||||