[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30598] trunk/blender/source/blender/ editors/space_sequencer/sequencer_add.c: Fix #22894

Diego Borghetti bdiego at gmail.com
Wed Jul 21 21:49:48 CEST 2010


Revision: 30598
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30598
Author:   bdiego
Date:     2010-07-21 21:49:43 +0200 (Wed, 21 Jul 2010)

Log Message:
-----------
Fix #22894

[#22894] SEQUENCER; Drag & Drop into VSE as strip sends user to
file manager for import - MS Windows

The invoke function for both operator don't check the the filepath
property (this come from the drop event), so always open the
file browser.

Note that this problem is still there for Image, but there is something
else there, because the op SEQUENCER_OT_image_strip_add never got
this property (filepath). I check and the problem seems to be the
missing WM_FILESEL_FILEPATH when call WM_operator_properties_filesel.

The problem is that if I put this flag in the function, the image
strip stop working, so have to check a little more about this.
(Any idea why ?)

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_sequencer/sequencer_add.c

Modified: trunk/blender/source/blender/editors/space_sequencer/sequencer_add.c
===================================================================
--- trunk/blender/source/blender/editors/space_sequencer/sequencer_add.c	2010-07-21 19:44:59 UTC (rev 30597)
+++ trunk/blender/source/blender/editors/space_sequencer/sequencer_add.c	2010-07-21 19:49:43 UTC (rev 30598)
@@ -352,6 +352,10 @@
 	if(!RNA_property_is_set(op->ptr, "relative_path"))
 		RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS);
 
+	/* This is for drag and drop */
+	if(RNA_property_is_set(op->ptr, "filepath"))
+		return sequencer_add_movie_strip_exec(C, op);
+
 	sequencer_generic_invoke_xy__internal(C, op, event, 0);
 
 	WM_event_add_fileselect(C, op);
@@ -403,6 +407,10 @@
 	if(!RNA_property_is_set(op->ptr, "relative_path"))
 		RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS);
 
+	/* This is for drag and drop */
+	if(RNA_property_is_set(op->ptr, "filepath"))
+		return sequencer_add_sound_strip_exec(C, op);
+
 	sequencer_generic_invoke_xy__internal(C, op, event, 0);
 
 	WM_event_add_fileselect(C, op);





More information about the Bf-blender-cvs mailing list