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:
@@ -166,7 +166,7 @@ static PyObject *M_Library_Open( PyObject * self, PyObject * value )
|
||||
|
||||
/* copy the name to make it absolute so BLO_blendhandle_from_file doesn't complain */
|
||||
BLI_strncpy(fname1, fname, sizeof(fname1));
|
||||
BLI_convertstringcode(fname1, G.sce, 0); /* make absolute */
|
||||
BLI_convertstringcode(fname1, G.sce); /* make absolute */
|
||||
|
||||
/* G.sce = last file loaded, save for UI and restore after opening file */
|
||||
BLI_strncpy(filename, G.sce, sizeof(filename));
|
||||
@@ -483,7 +483,7 @@ static BlendHandle *open_library( char *filename, char *longFilename )
|
||||
|
||||
/* get complete file name if necessary */
|
||||
BLI_strncpy( longFilename, filename, FILE_MAX );
|
||||
BLI_convertstringcode( longFilename, G.sce, 0 );
|
||||
BLI_convertstringcode( longFilename, G.sce );
|
||||
|
||||
/* throw exceptions for wrong file type, cyclic reference */
|
||||
if( !BLO_has_bfile_extension(longFilename) ) {
|
||||
|
||||
Reference in New Issue
Block a user