fix for error when changing DISBALE_PYTHON -> WITH_PYTHON,
authorCampbell Barton <ideasman42@gmail.com>
Mon, 29 Nov 2010 07:56:45 +0000 (07:56 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 29 Nov 2010 07:56:45 +0000 (07:56 +0000)
This define wasn't set in some parts of the BGE causing problems with the view matrix.
in CMake define for the entire BGE fixes this.

15 files changed:
source/blender/editors/mesh/editface.c
source/blender/editors/util/undo.c
source/blender/python/intern/bpy.c
source/gameengine/BlenderRoutines/CMakeLists.txt
source/gameengine/CMakeLists.txt
source/gameengine/Converter/CMakeLists.txt
source/gameengine/Expressions/CMakeLists.txt
source/gameengine/GameLogic/CMakeLists.txt
source/gameengine/GamePlayer/common/CMakeLists.txt
source/gameengine/GamePlayer/ghost/CMakeLists.txt
source/gameengine/Ketsji/CMakeLists.txt
source/gameengine/Ketsji/KXNetwork/CMakeLists.txt
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript
source/gameengine/SceneGraph/SConscript
source/gameengine/VideoTexture/CMakeLists.txt

index b34f024e9fb1dd7751cb45153533f13ad3b1f939..95f14c03fd09cdfae2852200f164ca24e5c6bea6 100644 (file)
 
 #include "BIF_gl.h"
 
-
-#ifdef WITH_PYTHON
-//#include "BPY_extern.h"
-//#include "BPY_menus.h"
-#endif
-
 #include "ED_mesh.h"
 #include "ED_screen.h"
 #include "ED_view3d.h"
index e8c4edf3d57a2527e1cf23ae68c896e2c2ca4b99..f0e8184b99190e37055695aedf6ebaf0e69ac453 100644 (file)
@@ -156,9 +156,10 @@ static int ed_undo_step(bContext *C, int step, const char *undoname)
                
                if(do_glob_undo) {
                        if(U.uiflag & USER_GLOBALUNDO) {
-#ifdef WITH_PYTHON
+                               // note python defines not valid here anymore.
+                               //#ifdef WITH_PYTHON
                                // XXX          BPY_scripts_clear_pyobjects();
-#endif
+                               //#endif
                                if(undoname)
                                        BKE_undo_name(C, undoname);
                                else
index cb9c791f6f16223e265a2b9610d698923bb54441..584ba235e307812521f5fa5c424249e5964bed19 100644 (file)
@@ -25,6 +25,7 @@
 /* This file defines the '_bpy' module which is used by python's 'bpy' package.
  * a script writer should never directly access this module */
  
+#define WITH_PYTHON /* for AUD_PyInit.h, possibly others */
 
 #include "bpy_util.h" 
 #include "bpy_rna.h"
index 68d86a94ce33febb0e90d9837215e4176a40dbfe..ae46d8bf5b0aa30dffbb4777ac8cee368542d4b2 100644 (file)
@@ -57,9 +57,4 @@ IF(WITH_FFMPEG)
        ADD_DEFINITIONS(-DWITH_FFMPEG)
 ENDIF(WITH_FFMPEG)
 
-IF(WITH_PYTHON)
-       LIST(APPEND INC ${PYTHON_INC})
-       ADD_DEFINITIONS(-DWITH_PYTHON)
-ENDIF(WITH_PYTHON)
-
 BLENDERLIB(ge_blen_routines "${SRC}" "${INC}")
index eea600cb0cbd8366155f44de8e6a7359ba8be9b0..7f8abfec8c598d04a2f948be432908df7cffbbb6 100644 (file)
 #
 # ***** END GPL LICENSE BLOCK *****
 
+# there are too many inter-includes so best define here
+IF(WITH_PYTHON)
+       INCLUDE_DIRECTORIES(${PYTHON_INC})
+       ADD_DEFINITIONS(-DWITH_PYTHON)
+ENDIF(WITH_PYTHON)
+
 ADD_SUBDIRECTORY(BlenderRoutines)
 ADD_SUBDIRECTORY(Converter)
 ADD_SUBDIRECTORY(Expressions)
index 7b05d1b8fd67732a0ff93fee2b491134928143f1..a930fcb0c016c99720dd79c63dc7db1c7b23ab4f 100644 (file)
@@ -105,11 +105,6 @@ SET(SRC
        KX_SoftBodyDeformer.h
 )
 
-IF(WITH_PYTHON)
-       LIST(APPEND INC ${PYTHON_INC})
-       ADD_DEFINITIONS(-DWITH_PYTHON)
-ENDIF(WITH_PYTHON)
-
 IF(WITH_BULLET)
        ADD_DEFINITIONS(-DUSE_BULLET)
 ENDIF(WITH_BULLET)
index bafab06f78f9aa51fe16ff37347fadc0da384abb..1197927bb874716d374ae1c1992f78653c2aa4ee 100644 (file)
@@ -78,9 +78,4 @@ SET(SRC
        VoidValue.h
 )
 
-IF(WITH_PYTHON)
-       LIST(APPEND INC ${PYTHON_INC})
-       ADD_DEFINITIONS(-DWITH_PYTHON)
-ENDIF(WITH_PYTHON)
-
 BLENDERLIB(ge_logic_expressions "${SRC}" "${INC}")
index ccf6741626c69a71e1ef9a8b0e7b4d93689ccd04..e8de2ebd53c824302f012a92cdfe36baddf0c53a 100644 (file)
@@ -129,9 +129,4 @@ ELSE(WITH_SDL)
        ADD_DEFINITIONS(-DDISABLE_SDL)
 ENDIF(WITH_SDL)
 
-IF(WITH_PYTHON)
-       LIST(APPEND INC ${PYTHON_INC})
-       ADD_DEFINITIONS(-DWITH_PYTHON)
-ENDIF(WITH_PYTHON)
-
 BLENDERLIB(ge_logic "${SRC}" "${INC}")
index 45d760d4efb5d656da9d40ff7f3ab28f68e2312d..46fd467e8d5fb1275ba3a5bab19ab0c9cfaa2627 100644 (file)
@@ -88,11 +88,6 @@ SET(SRC
        windows/GPW_System.h
 )
 
-IF(WITH_PYTHON)
-       LIST(APPEND INC ${PYTHON_INC})
-       ADD_DEFINITIONS(-DWITH_PYTHON)
-ENDIF(WITH_PYTHON)
-
 ADD_DEFINITIONS(-DGLEW_STATIC)
 
 BLENDERLIB_NOLIST(ge_player_common "${SRC}" "${INC}")
index fe8c787c9379b0c47392425dfd50394877463fc8..01e0cb45cd472ca631665f3a8b41ac9a210d437f 100644 (file)
@@ -76,9 +76,4 @@ IF(WITH_FFMPEG)
        ADD_DEFINITIONS(-DWITH_FFMPEG)
 ENDIF(WITH_FFMPEG)
 
-IF(WITH_PYTHON)
-       LIST(APPEND INC ${PYTHON_INC})
-       ADD_DEFINITIONS(-DWITH_PYTHON)
-ENDIF(WITH_PYTHON)
-
 BLENDERLIB_NOLIST(ge_player_ghost "${SRC}" "${INC}")
index 8ca6b98217f7080d964ec02ec01752655a06e6a1..25388171cacbd60f0e9a697110b88e6ba1f52904 100644 (file)
@@ -208,11 +208,6 @@ ELSE(WITH_SDL)
        ADD_DEFINITIONS(-DDISABLE_SDL)
 ENDIF(WITH_SDL)
 
-IF(WITH_PYTHON)
-       LIST(APPEND INC ${PYTHON_INC})
-       ADD_DEFINITIONS(-DWITH_PYTHON)
-ENDIF(WITH_PYTHON)
-
 IF(WITH_FFMPEG)
        ADD_DEFINITIONS(-DWITH_FFMPEG)
 ENDIF(WITH_FFMPEG)
index 538f2b8e60b0fd5266cea52533896e740beb4717..687f19b90222276573706691128499691d5387db 100644 (file)
@@ -50,9 +50,4 @@ SET(SRC
        KX_NetworkObjectSensor.h
 )
 
-IF(WITH_PYTHON)
-       LIST(APPEND INC ${PYTHON_INC})
-       ADD_DEFINITIONS(-DWITH_PYTHON)
-ENDIF(WITH_PYTHON)
-
 BLENDERLIB(ge_logic_network "${SRC}" "${INC}")
index 791478cae38dfdcf6111b2aa4faca52c83d7aa65..890d1efb85090e6e960d77de46a06b7f9f66b368 100644 (file)
@@ -13,4 +13,8 @@ incs += ' #intern/guardedalloc #source/blender/blenlib'
 if env['WITH_BF_CXX_GUARDEDALLOC']:
     defs.append('WITH_CXX_GUARDEDALLOC')
 
+if env['WITH_BF_PYTHON']:
+    incs += ' ' + env['BF_PYTHON_INC']
+    defs.append('WITH_PYTHON')
+
 env.BlenderLib ( 'ge_oglrasterizer', Split(sources), Split(incs), defines = defs, libtype=['core','player'], priority=[350,75], cxx_compileflags=env['BGE_CXXFLAGS'])
index b4738bd20b46a20b5a952430ad1f9a3e0a3ce768..9270169199ecf23f990a0744d7a24f8a1573c68d 100644 (file)
@@ -12,4 +12,8 @@ if env['WITH_BF_CXX_GUARDEDALLOC']:
     defs.append('WITH_CXX_GUARDEDALLOC')
     incs += ' #intern/guardedalloc'
 
+if env['WITH_BF_PYTHON']:
+    incs += ' ' + env['BF_PYTHON_INC']
+    defs.append('WITH_PYTHON')
+
 env.BlenderLib ( 'ge_scenegraph', sources, Split(incs), defs, libtype=['core','player'], priority=[325,85], cxx_compileflags=env['BGE_CXXFLAGS'])
index e483d6c812b2c9d4ed95b059a7b113bbc6d57efb..8e5c892f007ad5fff981e6ac927b5250f3cceef2 100644 (file)
@@ -91,9 +91,4 @@ IF(WITH_FFMPEG)
        ADD_DEFINITIONS(-D__STDC_CONSTANT_MACROS)
 ENDIF(WITH_FFMPEG)
 
-IF(WITH_PYTHON)
-       LIST(APPEND INC ${PYTHON_INC})
-       ADD_DEFINITIONS(-DWITH_PYTHON)
-ENDIF(WITH_PYTHON)
-
 BLENDERLIB(ge_videotex "${SRC}" "${INC}")