cmake option to disable SDL,

bpy_interface.c - change order of checking scripts to avoid calling stat on .py files.
This commit is contained in:
2009-07-20 10:24:53 +00:00
parent b76009232e
commit 4d0a6fee4a
7 changed files with 35 additions and 31 deletions

View File

@@ -511,6 +511,13 @@ void BPY_run_ui_scripts(bContext *C, int reload)
if (de->d_name[0] == '.') {
/* do nothing, probably .svn */
}
else if ((file_extension = strstr(de->d_name, ".py"))) {
/* normal py files? */
if(file_extension && file_extension[3] == '\0') {
de->d_name[(file_extension - de->d_name) + 1] = '\0';
bpy_import_module(de->d_name, reload);
}
}
#ifndef __linux__
else if( BLI_join_dirfile(path, dirname, de->d_name), S_ISDIR(BLI_exists(path))) {
#else
@@ -523,14 +530,6 @@ void BPY_run_ui_scripts(bContext *C, int reload)
if(BLI_exists(path)) {
bpy_import_module(de->d_name, reload);
}
} else {
/* normal py files */
file_extension = strstr(de->d_name, ".py");
if(file_extension && file_extension[3] == '\0') {
de->d_name[(file_extension - de->d_name) + 1] = '\0';
bpy_import_module(de->d_name, reload);
}
}
if(err==-1) {