diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-07-20 14:24:53 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-07-20 14:24:53 +0400 |
commit | 4d0a6fee4af4be5877d2a69321913ad39039b76b (patch) | |
tree | b8d233dee4020746ba3703a589a3262da2d2c9de /source/blender/python | |
parent | b76009232eea8d299fa2bec52c44dc76872705fb (diff) |
cmake option to disable SDL,
bpy_interface.c - change order of checking scripts to avoid calling stat on .py files.
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/intern/bpy_interface.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c index 6a5d01d9466..04d70f5a758 100644 --- a/source/blender/python/intern/bpy_interface.c +++ b/source/blender/python/intern/bpy_interface.c @@ -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) { |