Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-07-20 14:24:53 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-07-20 14:24:53 +0400
commit4d0a6fee4af4be5877d2a69321913ad39039b76b (patch)
treeb8d233dee4020746ba3703a589a3262da2d2c9de /source/blender
parentb76009232eea8d299fa2bec52c44dc76872705fb (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')
-rw-r--r--source/blender/blenkernel/CMakeLists.txt7
-rw-r--r--source/blender/blenlib/SConscript3
-rw-r--r--source/blender/python/intern/bpy_interface.c15
3 files changed, 13 insertions, 12 deletions
diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt
index ebe0ea74c28..92cc206667c 100644
--- a/source/blender/blenkernel/CMakeLists.txt
+++ b/source/blender/blenkernel/CMakeLists.txt
@@ -34,7 +34,6 @@ SET(INC
../../../extern/bullet2/src
../nodes ../../../extern/glew/include ../gpu ../makesrna
../../../intern/bsp/extern
- ${SDL_INC}
${ZLIB_INC}
)
@@ -55,6 +54,12 @@ IF(WITH_QUICKTIME)
ADD_DEFINITIONS(-DWITH_QUICKTIME)
ENDIF(WITH_QUICKTIME)
+IF(WITH_SDL)
+ SET(INC ${INC} ${SDL_INC})
+ELSE(WITH_SDL)
+ ADD_DEFINITIONS(-DDISABLE_SDL)
+ENDIF(WITH_SDL)
+
IF(WITH_FFMPEG)
SET(INC ${INC} ${FFMPEG_INC})
ADD_DEFINITIONS(-DWITH_FFMPEG)
diff --git a/source/blender/blenlib/SConscript b/source/blender/blenlib/SConscript
index e0411a6fc80..3d7d6b63e64 100644
--- a/source/blender/blenlib/SConscript
+++ b/source/blender/blenlib/SConscript
@@ -9,9 +9,6 @@ incs += ' ' + env['BF_FREETYPE_INC']
incs += ' ' + env['BF_ZLIB_INC']
defs = ''
-if env['WITH_BF_SDL']:
- incs += ' ' + env['BF_SDL_INC']
-
if env['OURPLATFORM'] == 'linux2':
cflags='-pthread'
incs += ' ../../../extern/binreloc/include'
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) {