Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/screen/screen_ops.c
| Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | |||||
| #include "BKE_mask.h" | #include "BKE_mask.h" | ||||
| #include "BKE_object.h" | #include "BKE_object.h" | ||||
| #include "BKE_report.h" | #include "BKE_report.h" | ||||
| #include "BKE_scene.h" | #include "BKE_scene.h" | ||||
| #include "BKE_screen.h" | #include "BKE_screen.h" | ||||
| #include "BKE_sound.h" | #include "BKE_sound.h" | ||||
| #include "BKE_workspace.h" | #include "BKE_workspace.h" | ||||
| #include "BLO_readfile.h" | |||||
| #include "WM_api.h" | #include "WM_api.h" | ||||
| #include "WM_types.h" | #include "WM_types.h" | ||||
| #include "DEG_depsgraph.h" | #include "DEG_depsgraph.h" | ||||
| #include "DEG_depsgraph_query.h" | #include "DEG_depsgraph_query.h" | ||||
| #include "ED_anim_api.h" | #include "ED_anim_api.h" | ||||
| #include "ED_armature.h" | #include "ED_armature.h" | ||||
| ▲ Show 20 Lines • Show All 184 Lines • ▼ Show 20 Lines | |||||
| /* 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), wmDrag *drag, const wmEvent *UNUSED(event)) | static bool blend_file_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event)) | ||||
| { | { | ||||
| if (drag->type == WM_DRAG_PATH) { | if (drag->type == WM_DRAG_PATH && BLO_has_bfile_backup_extension(drag->path)) { | ||||
| if (drag->icon == ICON_FILE_BLEND) { | return true; | ||||
| return true; | |||||
| } | |||||
| } | } | ||||
| return false; | return false; | ||||
| } | } | ||||
| static void blend_file_drop_copy(wmDrag *drag, wmDropBox *drop) | static void blend_file_drop_copy(wmDrag *drag, wmDropBox *drop) | ||||
| { | { | ||||
| /* copy drag path to properties */ | /* copy drag path to properties */ | ||||
| RNA_string_set(drop->ptr, "filepath", drag->path); | RNA_string_set(drop->ptr, "filepath", drag->path); | ||||
| Show All 24 Lines | |||||