Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_console/space_console.c
| Show All 20 Lines | |||||
| #include <string.h> | #include <string.h> | ||||
| #include <stdio.h> | #include <stdio.h> | ||||
| #include "MEM_guardedalloc.h" | #include "MEM_guardedalloc.h" | ||||
| #include "BLI_blenlib.h" | #include "BLI_blenlib.h" | ||||
| #include "BLI_utildefines.h" | #include "BLI_utildefines.h" | ||||
| #include "BKE_global.h" | |||||
| #include "BKE_context.h" | #include "BKE_context.h" | ||||
| #include "BKE_screen.h" | #include "BKE_screen.h" | ||||
| #include "ED_space_api.h" | #include "ED_space_api.h" | ||||
| #include "ED_screen.h" | #include "ED_screen.h" | ||||
| #include "RNA_access.h" | #include "RNA_access.h" | ||||
| ▲ Show 20 Lines • Show All 131 Lines • ▼ Show 20 Lines | static bool id_drop_poll(bContext *UNUSED(C), | ||||
| return WM_drag_ID(drag, 0) != NULL; | return WM_drag_ID(drag, 0) != NULL; | ||||
| } | } | ||||
| static void id_drop_copy(wmDrag *drag, wmDropBox *drop) | static void id_drop_copy(wmDrag *drag, wmDropBox *drop) | ||||
| { | { | ||||
| ID *id = WM_drag_ID(drag, 0); | ID *id = WM_drag_ID(drag, 0); | ||||
| /* copy drag path to properties */ | /* copy drag path to properties */ | ||||
| char *text = RNA_path_full_ID_py(id); | char *text = RNA_path_full_ID_py(G_MAIN, id); | ||||
| RNA_string_set(drop->ptr, "text", text); | RNA_string_set(drop->ptr, "text", text); | ||||
| MEM_freeN(text); | MEM_freeN(text); | ||||
| } | } | ||||
| static bool path_drop_poll(bContext *UNUSED(C), | static bool path_drop_poll(bContext *UNUSED(C), | ||||
| wmDrag *drag, | wmDrag *drag, | ||||
| const wmEvent *UNUSED(event), | const wmEvent *UNUSED(event), | ||||
| const char **UNUSED(tooltip)) | const char **UNUSED(tooltip)) | ||||
| ▲ Show 20 Lines • Show All 163 Lines • Show Last 20 Lines | |||||