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:
@@ -444,7 +444,7 @@ void BPY_rebuild_syspath( void )
|
||||
}
|
||||
|
||||
BLI_strncpy(dirpath, U.pythondir, FILE_MAX);
|
||||
BLI_convertstringcode(dirpath, G.sce, 0);
|
||||
BLI_convertstringcode(dirpath, G.sce);
|
||||
syspath_append(dirpath); /* append to module search path */
|
||||
|
||||
BLI_make_file_string("/", modpath, dirpath, "bpymodules");
|
||||
@@ -1019,7 +1019,7 @@ int BPY_menu_do_python( short menutype, int event )
|
||||
|
||||
/* dirs in Blender can be "//", which has a special meaning */
|
||||
BLI_strncpy(upythondir, U.pythondir, FILE_MAX);
|
||||
BLI_convertstringcode(upythondir, G.sce, 0); /* if so, this expands it */
|
||||
BLI_convertstringcode(upythondir, G.sce); /* if so, this expands it */
|
||||
BLI_make_file_string( "/", filestr, upythondir, pym->filename );
|
||||
}
|
||||
else { /* script is in default scripts dir */
|
||||
|
||||
Reference in New Issue
Block a user