Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_dragdrop.c
| Show First 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | |||||
| #include "IMB_imbuf_types.h" | #include "IMB_imbuf_types.h" | ||||
| #include "UI_interface.h" | #include "UI_interface.h" | ||||
| #include "UI_interface_icons.h" | #include "UI_interface_icons.h" | ||||
| #include "RNA_access.h" | #include "RNA_access.h" | ||||
| #include "CLG_log.h" | |||||
| #include "WM_api.h" | #include "WM_api.h" | ||||
| #include "WM_types.h" | #include "WM_types.h" | ||||
| #include "wm_event_system.h" | #include "wm_event_system.h" | ||||
| static CLG_LogRef LOG = {"wm.dragdrop"}; | |||||
| /* ****************************************************** */ | /* ****************************************************** */ | ||||
| static ListBase dropboxes = {NULL, NULL}; | static ListBase dropboxes = {NULL, NULL}; | ||||
| /* drop box maps are stored global for now */ | /* drop box maps are stored global for now */ | ||||
| /* these are part of blender's UI/space specs, and not like keymaps */ | /* these are part of blender's UI/space specs, and not like keymaps */ | ||||
| /* when editors become configurable, they can add own dropbox definitions */ | /* when editors become configurable, they can add own dropbox definitions */ | ||||
| Show All 36 Lines | wmDropBox *WM_dropbox_add( | ||||
| drop->poll = poll; | drop->poll = poll; | ||||
| drop->copy = copy; | drop->copy = copy; | ||||
| drop->ot = WM_operatortype_find(idname, 0); | drop->ot = WM_operatortype_find(idname, 0); | ||||
| drop->opcontext = WM_OP_INVOKE_DEFAULT; | drop->opcontext = WM_OP_INVOKE_DEFAULT; | ||||
| if (drop->ot == NULL) { | if (drop->ot == NULL) { | ||||
| MEM_freeN(drop); | MEM_freeN(drop); | ||||
| printf("Error: dropbox with unknown operator: %s\n", idname); | CLOG_ERROR(&LOG, "dropbox with unknown operator: %s", idname); | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| WM_operator_properties_alloc(&(drop->ptr), &(drop->properties), idname); | WM_operator_properties_alloc(&(drop->ptr), &(drop->properties), idname); | ||||
| BLI_addtail(lb, drop); | BLI_addtail(lb, drop); | ||||
| return drop; | return drop; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 353 Lines • Show Last 20 Lines | |||||