cmake option to disable SDL,
[blender.git] / source / blender / python / intern / bpy_interface.c
index 6a5d01d9466d0076159a533fc876c753afc223b1..04d70f5a7584e861ec72507cd98f0b3d815da0db 100644 (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) {