diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-10-12 04:15:19 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-10-12 04:15:19 +0400 |
commit | 15bf56c696b976a4f74b4b0cae4371ea8008e231 (patch) | |
tree | f64818549f44e853db32aaf2fcab699ee86136b0 /source/blender/editors/space_sequencer | |
parent | 4bfee0a1cf33f7b74f937ab991967f2047b80b9c (diff) |
changes to relative path option
- initialize the relative_path option in ED_fileselect_get_params(), saves initializing within every operators own init functions, some even trying to initialize a non existing property.
- don't set the operator default from the user preferece, operator property defaults should be static else python scripts for eg can get different defaults depending on user settings, this also wont get updated when user-defaults are edited so generally confusing & not good practice.
Diffstat (limited to 'source/blender/editors/space_sequencer')
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_add.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c index b390b7dbdb5..1c4b0130897 100644 --- a/source/blender/editors/space_sequencer/sequencer_add.c +++ b/source/blender/editors/space_sequencer/sequencer_add.c @@ -380,9 +380,6 @@ static int sequencer_add_movie_strip_invoke(bContext *C, wmOperator *op, wmEvent sequencer_generic_invoke_xy__internal(C, op, event, 0); - if(!RNA_property_is_set(op->ptr, "relative_path")) - RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS); - WM_event_add_fileselect(C, op); return OPERATOR_RUNNING_MODAL; @@ -434,10 +431,7 @@ static int sequencer_add_sound_strip_invoke(bContext *C, wmOperator *op, wmEvent } sequencer_generic_invoke_xy__internal(C, op, event, 0); - - if(!RNA_property_is_set(op->ptr, "relative_path")) - RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS); - + WM_event_add_fileselect(C, op); return OPERATOR_RUNNING_MODAL; @@ -543,9 +537,6 @@ static int sequencer_add_image_strip_invoke(bContext *C, wmOperator *op, wmEvent } sequencer_generic_invoke_xy__internal(C, op, event, SEQPROP_ENDFRAME); - - if(!RNA_property_is_set(op->ptr, "relative_path")) - RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS); WM_event_add_fileselect(C, op); return OPERATOR_RUNNING_MODAL; @@ -721,10 +712,6 @@ static int sequencer_add_effect_strip_invoke(bContext *C, wmOperator *op, wmEven sequencer_generic_invoke_xy__internal(C, op, event, prop_flag); if (is_type_set && type==SEQ_PLUGIN) { - - if(!RNA_property_is_set(op->ptr, "relative_path")) - RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS); - /* only plugins need the file selector */ return WM_operator_filesel(C, op, event); } |