Fix [#30136] Adding Sequence Plugin fails.
authorBastien Montagne <montagne29@wanadoo.fr>
Sat, 11 Feb 2012 16:08:45 +0000 (16:08 +0000)
committerBastien Montagne <montagne29@wanadoo.fr>
Sat, 11 Feb 2012 16:08:45 +0000 (16:08 +0000)
Problem was in how file selector is called by the effect_strip_add operator invoke. WM_operator_filesel() is not suited, as it directly calls exec if filepath is already set, and sequencer_generic_invoke_xy__internal() will set that path unless otherwise told. So using rather the same way to do as the one used by the other "strip_add" operators...

source/blender/editors/space_sequencer/sequencer_add.c

index 9aed4b3d78a35c4b366e2a4b68b3ba08864e5014..03fd22d104574e28baf5623fc033192d9b5934a2 100644 (file)
@@ -713,7 +713,8 @@ static int sequencer_add_effect_strip_invoke(bContext *C, wmOperator *op, wmEven
 
        if (is_type_set && type==SEQ_PLUGIN) {
                /* only plugins need the file selector */
-               return WM_operator_filesel(C, op, event);
+               WM_event_add_fileselect(C, op);
+               return OPERATOR_RUNNING_MODAL;
        }
        else {
                return sequencer_add_effect_strip_exec(C, op);