Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_text/space_text.c
| Show All 23 Lines | |||||
| #include <string.h> | #include <string.h> | ||||
| #include "DNA_text_types.h" | #include "DNA_text_types.h" | ||||
| #include "MEM_guardedalloc.h" | #include "MEM_guardedalloc.h" | ||||
| #include "BLI_blenlib.h" | #include "BLI_blenlib.h" | ||||
| #include "BKE_global.h" | |||||
| #include "BKE_context.h" | #include "BKE_context.h" | ||||
| #include "BKE_library.h" | #include "BKE_library.h" | ||||
| #include "BKE_screen.h" | #include "BKE_screen.h" | ||||
| #include "BKE_text.h" | #include "BKE_text.h" | ||||
| #include "ED_space_api.h" | #include "ED_space_api.h" | ||||
| #include "ED_screen.h" | #include "ED_screen.h" | ||||
| ▲ Show 20 Lines • Show All 311 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| static void text_drop_paste(wmDrag *drag, wmDropBox *drop) | static void text_drop_paste(wmDrag *drag, wmDropBox *drop) | ||||
| { | { | ||||
| char *text; | char *text; | ||||
| ID *id = WM_drag_ID(drag, 0); | ID *id = WM_drag_ID(drag, 0); | ||||
| /* copy drag path to properties */ | /* copy drag path to properties */ | ||||
| text = RNA_path_full_ID_py(id); | 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); | ||||
| } | } | ||||
| /* this region dropbox definition */ | /* this region dropbox definition */ | ||||
| static void text_dropboxes(void) | static void text_dropboxes(void) | ||||
| { | { | ||||
| ListBase *lb = WM_dropboxmap_find("Text", SPACE_TEXT, RGN_TYPE_WINDOW); | ListBase *lb = WM_dropboxmap_find("Text", SPACE_TEXT, RGN_TYPE_WINDOW); | ||||
| ▲ Show 20 Lines • Show All 136 Lines • Show Last 20 Lines | |||||