diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-07-15 15:26:43 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-07-15 15:26:43 +0400 |
commit | 8a2a3239918cfbb54997705dd63b05d19a93a10a (patch) | |
tree | a0d2c3d4e7094a6886ce4ca2a8f63603ef3bee34 /source | |
parent | abe84a4f43939fd14a4830d958890e870ddeb180 (diff) |
fix for sequence strips being given non utf8 names, where the filepath wasn't utf8.
also correct bad assumption in BKE_image_load_exists() that all paths are relative to the current blend file.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/sequencer.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index f34053816c5..135d847cce7 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -633,7 +633,7 @@ Image *BKE_image_load_exists(const char *filepath) for (ima = G.main->image.first; ima; ima = ima->id.next) { if (ima->source != IMA_SRC_VIEWER && ima->source != IMA_SRC_GENERATED) { BLI_strncpy(strtest, ima->name, sizeof(ima->name)); - BLI_path_abs(strtest, G.main->name); + BLI_path_abs(strtest, ID_BLEND_PATH(G.main, &ima->id)); if (BLI_path_cmp(strtest, str) == 0) { if (ima->anim == NULL || ima->id.us == 0) { diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 027b1d7fa03..e81afc7efb6 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -50,6 +50,7 @@ #include "BLI_listbase.h" #include "BLI_path_util.h" #include "BLI_string.h" +#include "BLI_string_utf8.h" #include "BLI_threads.h" #include "BLI_utildefines.h" @@ -3948,7 +3949,8 @@ Mask *BKE_sequencer_mask_get(Scene *scene) static void seq_load_apply(Scene *scene, Sequence *seq, SeqLoadInfo *seq_load) { if (seq) { - BLI_strncpy(seq->name + 2, seq_load->name, sizeof(seq->name) - 2); + BLI_strncpy_utf8(seq->name + 2, seq_load->name, sizeof(seq->name) - 2); + BLI_utf8_invalid_strip(seq->name + 2, sizeof(seq->name) - 2); BKE_sequence_base_unique_name_recursive(&scene->ed->seqbase, seq); if (seq_load->flag & SEQ_LOAD_FRAME_ADVANCE) { |