Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2010-12-17 22:05:34 +0300
committerTon Roosendaal <ton@blender.org>2010-12-17 22:05:34 +0300
commita0ce28d7312adc31194e2ba34974dc5de754fced (patch)
treefc801b5d536e8d37207d04c068b7e1e456f470df /source/blender/windowmanager/intern/wm_dragdrop.c
parentfd90685a48f6fae30e6731bc4a805930e776f117 (diff)
Drag & drop feature:
You now can drop a .blend inside blender window to open it. Implementation notes: - Added call to extract icon type for files. Code re-used from space_file - External files that get dropped set icon types too. Drop box polls can check for this. - Also enabled setting op-context for drop operators, this was needed to prevent filewindow to open.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_dragdrop.c')
-rw-r--r--source/blender/windowmanager/intern/wm_dragdrop.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_dragdrop.c b/source/blender/windowmanager/intern/wm_dragdrop.c
index 6cf2c7a9a81..a19499b3464 100644
--- a/source/blender/windowmanager/intern/wm_dragdrop.c
+++ b/source/blender/windowmanager/intern/wm_dragdrop.c
@@ -75,6 +75,7 @@ typedef struct wmDropBoxMap {
} wmDropBoxMap;
+/* spaceid/regionid is zero for window drop maps */
ListBase *WM_dropboxmap_find(const char *idname, int spaceid, int regionid)
{
wmDropBoxMap *dm;
@@ -103,6 +104,7 @@ wmDropBox *WM_dropbox_add(ListBase *lb, const char *idname, int (*poll)(bContext
drop->poll= poll;
drop->copy= copy;
drop->ot= WM_operatortype_find(idname, 0);
+ drop->opcontext= WM_OP_INVOKE_DEFAULT;
if(drop->ot==NULL) {
MEM_freeN(drop);