Revision: 28619
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28619
Author: ton
Date: 2010-05-06 18:06:57 +0200 (Thu, 06 May 2010)
Log Message:
-----------
Part 1 of making external drop events work. Have to move work to another system,
that's why this first step. :)
Modified Paths:
--------------
trunk/blender/source/blender/windowmanager/intern/wm_window.c
Modified: trunk/blender/source/blender/windowmanager/intern/wm_window.c
===================================================================
--- trunk/blender/source/blender/windowmanager/intern/wm_window.c
2010-05-06 14:53:27 UTC (rev 28618)
+++ trunk/blender/source/blender/windowmanager/intern/wm_window.c
2010-05-06 16:06:57 UTC (rev 28619)
@@ -740,6 +740,7 @@
case GHOST_kEventDraggingDropDone:
{
wmEvent event= *(win->eventstate); /* copy
last state, like mouse coords */
+ GHOST_TEventDragnDropData *ddd=
GHOST_GetEventData(evt);
/* make blender drop event with custom data
pointing to wm drags */
event.type= EVT_DROP;
@@ -750,9 +751,18 @@
/* add drag data to wm for paths: */
/* need icon type, some dropboxes check for
that... see filesel code for this */
- // WM_event_start_drag(C, icon, WM_DRAG_PATH,
void *poin, 0.0);
- /* void poin should point to string, it makes a
copy */
+ if(ddd->dataType ==
GHOST_kDragnDropTypeFilenames) {
+ GHOST_TStringArray *stra= ddd->data;
+ int a;
+
+ for(a=0; a<stra->count; a++) {
+ printf("drop file %s\n",
stra->strings[a]);
+ WM_event_start_drag(C, 0,
WM_DRAG_PATH, stra->strings[a], 0.0);
+ /* void poin should point to
string, it makes a copy */
+ }
+ }
+
wm_event_add(win, &event);
break;
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs