diff options
author | Richard Antalik <richardantalik@gmail.com> | 2021-03-20 03:53:03 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2021-03-20 03:53:03 +0300 |
commit | f65a3172a8b7513842dcf934197ed4174e37a4b5 (patch) | |
tree | 2cdd7d2d97faaee30f6e5c35e6772d0bbbe6f6d8 /source/blender/editors/space_sequencer/sequencer_add.c | |
parent | 3433d1b7f43a587312e05aa4b5b3d7a44b57bc1b (diff) |
Fix issues introduced strip loading refactoring
- Adding effect strip resulted in strip with no name
- Adding sound strip attempted to read `fit_method` RNA property,
that did not exist, causing error messages in console
These issues were introduced in bbb1936411a5.
Diffstat (limited to 'source/blender/editors/space_sequencer/sequencer_add.c')
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_add.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c index 4ccbd665b8c..a6e7903d1b1 100644 --- a/source/blender/editors/space_sequencer/sequencer_add.c +++ b/source/blender/editors/space_sequencer/sequencer_add.c @@ -235,8 +235,11 @@ static void load_data_init_from_operator(SeqLoadData *load_data, bContext *C, wm load_data->channel = RNA_int_get(op->ptr, "channel"); load_data->image.end_frame = load_data->start_frame; load_data->image.len = 1; - load_data->fit_method = RNA_enum_get(op->ptr, "fit_method"); - SEQ_tool_settings_fit_method_set(CTX_data_scene(C), load_data->fit_method); + + if ((prop = RNA_struct_find_property(op->ptr, "fit_method"))) { + load_data->fit_method = RNA_enum_get(op->ptr, "fit_method"); + SEQ_tool_settings_fit_method_set(CTX_data_scene(C), load_data->fit_method); + } if ((prop = RNA_struct_find_property(op->ptr, "filepath"))) { /* Full path, file is set by the caller. */ |