diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-10-31 07:11:39 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-10-31 07:11:39 +0300 |
commit | 0876fce0094ad3e37be4b197ef8850757eacd37b (patch) | |
tree | bdcd409899a59f1d0239b14d0ec79a7e5f531a06 /source/gameengine/BlenderRoutines | |
parent | 50dab4fc37d33352c2f1c6181da9d54799e36a12 (diff) |
rename and negate DISABLE_PYTHON --> WITH_PYTHON
Diffstat (limited to 'source/gameengine/BlenderRoutines')
-rw-r--r-- | source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp | 20 | ||||
-rw-r--r-- | source/gameengine/BlenderRoutines/CMakeLists.txt | 3 | ||||
-rw-r--r-- | source/gameengine/BlenderRoutines/SConscript | 3 |
3 files changed, 12 insertions, 14 deletions
diff --git a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp index 858a5964a52..9de4020ecff 100644 --- a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp +++ b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp @@ -142,7 +142,7 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c BLI_strncpy(pathname, blenderdata->name, sizeof(pathname)); BLI_strncpy(oldsce, G.main->name, sizeof(oldsce)); -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON resetGamePythonPath(); // need this so running a second time wont use an old blendfiles path setGamePythonPath(G.main->name); @@ -172,7 +172,7 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c bool frameRate = (SYS_GetCommandLineInt(syshandle, "show_framerate", 0) != 0); bool animation_record = (SYS_GetCommandLineInt(syshandle, "animation_record", 0) != 0); bool displaylists = (SYS_GetCommandLineInt(syshandle, "displaylists", 0) != 0); -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON bool nodepwarnings = (SYS_GetCommandLineInt(syshandle, "ignore_deprecation_warnings", 0) != 0); #endif bool novertexarrays = (SYS_GetCommandLineInt(syshandle, "novertexarrays", 0) != 0); @@ -221,7 +221,7 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c ketsjiengine->SetUseFixedTime(usefixed); ketsjiengine->SetTimingDisplay(frameRate, profile, properties); -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON CValue::SetDeprecationWarnings(nodepwarnings); #endif @@ -311,7 +311,7 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c if(blenderdata) { BLI_strncpy(G.main->name, blenderdata->name, sizeof(G.main->name)); BLI_strncpy(pathname, blenderdata->name, sizeof(pathname)); -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON setGamePythonPath(G.main->name); #endif } @@ -382,11 +382,11 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c scene, canvas); -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON // some python things PyObject *gameLogic, *gameLogic_keys; setupGamePython(ketsjiengine, startscene, blenderdata, pyGlobalDict, &gameLogic, &gameLogic_keys, 0, NULL); -#endif // DISABLE_PYTHON +#endif // WITH_PYTHON //initialize Dome Settings if(scene->gm.stereoflag == STEREO_DOME) @@ -477,7 +477,7 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c // when exiting the mainloop -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON // Clears the dictionary by hand: // This prevents, extra references to global variables // inside the GameLogic dictionary when the python interpreter is finalized. @@ -499,7 +499,7 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c gameLogic_keys_new = NULL; #endif ketsjiengine->StopEngine(); -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON exitGamePythonScripting(); #endif networkdevice->Disconnect(); @@ -510,7 +510,7 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c sceneconverter = NULL; } -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON Py_DECREF(gameLogic_keys); gameLogic_keys = NULL; #endif @@ -575,7 +575,7 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c BLI_strncpy(G.main->name, oldsce, sizeof(G.main->name)); -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON Py_DECREF(pyGlobalDict); // Release Python's GIL diff --git a/source/gameengine/BlenderRoutines/CMakeLists.txt b/source/gameengine/BlenderRoutines/CMakeLists.txt index 7abdeba0740..1f895ad0abc 100644 --- a/source/gameengine/BlenderRoutines/CMakeLists.txt +++ b/source/gameengine/BlenderRoutines/CMakeLists.txt @@ -51,8 +51,7 @@ ENDIF(WITH_FFMPEG) IF(WITH_PYTHON) LIST(APPEND INC ${PYTHON_INC}) -ELSE(WITH_PYTHON) - ADD_DEFINITIONS(-DDISABLE_PYTHON) + ADD_DEFINITIONS(-DWITH_PYTHON) ENDIF(WITH_PYTHON) BLENDERLIB(bf_blroutines "${SRC}" "${INC}") diff --git a/source/gameengine/BlenderRoutines/SConscript b/source/gameengine/BlenderRoutines/SConscript index 1a774fc8aba..91dc2692384 100644 --- a/source/gameengine/BlenderRoutines/SConscript +++ b/source/gameengine/BlenderRoutines/SConscript @@ -27,8 +27,7 @@ if env['WITH_BF_FFMPEG']: if env['WITH_BF_PYTHON']: incs += ' ' + env['BF_PYTHON_INC'] -else: - defs.append('DISABLE_PYTHON') + defs.append('WITH_PYTHON') if env['WITH_BF_CXX_GUARDEDALLOC']: defs.append('WITH_CXX_GUARDEDALLOC') |