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 bbb1936411
.
This commit is contained in:
parent
3433d1b7f4
commit
f65a3172a8
|
@ -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. */
|
||||
|
|
|
@ -105,7 +105,7 @@ static void seq_add_generic_update(Scene *scene, ListBase *seqbase, Sequence *se
|
|||
|
||||
static void seq_add_set_name(Sequence *seq, SeqLoadData *load_data)
|
||||
{
|
||||
if (load_data->name != NULL) {
|
||||
if (load_data->name != NULL && load_data->name[0] != '\0') {
|
||||
BLI_strncpy(seq->name + 2, load_data->name, sizeof(seq->name) - 2);
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in New Issue