From 6c6f3baaa8c5d3a0cc3eb033e93cc6fb0f5721cc Mon Sep 17 00:00:00 2001 From: Richard Antalik Date: Tue, 30 Mar 2021 02:41:12 +0200 Subject: VSE: Fix image adding inconsistency When adding images with operator, image file path is split into filename and directory passed to load function in name and path fields of SeqLoadData struct. This is because when loading images directory and filenames are split. RNA API function passes whole path in path filed. Apart from loading API inconsistency, this causes initial image loading to fail, so strip resolution is not set. Also name field of SeqLoadData should be reserved for strip name. Let operator code concatenate and split filepath when needed so loading API can be consistent with RNA API and also between strip types. Reviewed By: sergey Differential Revision: https://developer.blender.org/D10818 --- source/blender/sequencer/intern/strip_add.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/sequencer/intern/strip_add.c') diff --git a/source/blender/sequencer/intern/strip_add.c b/source/blender/sequencer/intern/strip_add.c index 33dd74cb527..55d92c1eb10 100644 --- a/source/blender/sequencer/intern/strip_add.c +++ b/source/blender/sequencer/intern/strip_add.c @@ -324,7 +324,7 @@ Sequence *SEQ_add_image_strip(Main *bmain, Scene *scene, ListBase *seqbase, SeqL /* Set initial scale based on load_data->fit_method. */ char file_path[FILE_MAX]; - BLI_join_dirfile(file_path, sizeof(file_path), load_data->path, load_data->name); + BLI_strncpy(file_path, load_data->path, sizeof(file_path)); BLI_path_abs(file_path, BKE_main_blendfile_path(bmain)); ImBuf *ibuf = IMB_loadiffname(file_path, IB_rect, seq->strip->colorspace_settings.name); if (ibuf != NULL) { -- cgit v1.2.3