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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user