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.
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user