Changed frame numbering to only alter hashes if they are in the filename (not the directory name) to fix bug [#10566] File Open Dialog replaces '#' with '0' in directory names.
removed frame numbering from BLI_convertstringcode into its own function (BLI_convertstringframe), many uses of BLI_convertstringcode were passing dummy frames values anyway. in cases where adding the current frame number to a filename is needed run BLI_convertstringframe(...) after BLI_convertstringcode(...) There are some cases Im not sure BLI_convertstringframe is needed, these have been commented as todo, but at least have the same functionality they used to.
This commit is contained in:
@@ -429,7 +429,9 @@ void reload_sequence_new_file(Sequence * seq)
|
||||
strncpy(str, seq->strip->dir, FILE_MAXDIR-1);
|
||||
strncat(str, seq->strip->stripdata->name, FILE_MAXFILE-1);
|
||||
|
||||
BLI_convertstringcode(str, G.sce, G.scene->r.cfra);
|
||||
BLI_convertstringcode(str, G.sce);
|
||||
BLI_convertstringframe(str, G.scene->r.cfra); /* TODO - is this needed? */
|
||||
|
||||
}
|
||||
|
||||
if (seq->type == SEQ_IMAGE) {
|
||||
@@ -1068,7 +1070,9 @@ static int seq_proxy_get_fname(Sequence * seq, int cfra, char * name)
|
||||
G.scene->r.size);
|
||||
}
|
||||
|
||||
BLI_convertstringcode(name, G.sce, frameno);
|
||||
BLI_convertstringcode(name, G.sce);
|
||||
BLI_convertstringframe(name, frameno);
|
||||
|
||||
|
||||
strcat(name, ".jpg");
|
||||
|
||||
@@ -1706,7 +1710,8 @@ static void do_build_seq_ibuf(Sequence * seq, TStripElem *se, int cfra,
|
||||
|
||||
strncpy(name, seq->strip->dir, FILE_MAXDIR-1);
|
||||
strncat(name, s_elem->name, FILE_MAXFILE);
|
||||
BLI_convertstringcode(name, G.sce, G.scene->r.cfra);
|
||||
BLI_convertstringcode(name, G.sce);
|
||||
BLI_convertstringframe(name, G.scene->r.cfra);
|
||||
if (!build_proxy_run) {
|
||||
se->ibuf = seq_proxy_fetch(seq, cfra);
|
||||
}
|
||||
@@ -1735,7 +1740,8 @@ static void do_build_seq_ibuf(Sequence * seq, TStripElem *se, int cfra,
|
||||
if(seq->anim==0) {
|
||||
strncpy(name, seq->strip->dir, FILE_MAXDIR-1);
|
||||
strncat(name, seq->strip->stripdata->name, FILE_MAXFILE-1);
|
||||
BLI_convertstringcode(name, G.sce, G.scene->r.cfra);
|
||||
BLI_convertstringcode(name, G.sce);
|
||||
BLI_convertstringframe(name, G.scene->r.cfra);
|
||||
|
||||
seq->anim = openanim(name, IB_rect);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user