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:
Diffstat (limited to 'source/gameengine')
-rw-r--r--source/gameengine/BlenderRoutines/CMakeLists.txt1
-rw-r--r--source/gameengine/Converter/CMakeLists.txt1
-rw-r--r--source/gameengine/Converter/KX_ConvertControllers.cpp8
-rw-r--r--source/gameengine/Expressions/CMakeLists.txt1
-rw-r--r--source/gameengine/GameLogic/CMakeLists.txt1
-rw-r--r--source/gameengine/GameLogic/SCA_PythonController.cpp12
-rw-r--r--source/gameengine/GamePlayer/common/CMakeLists.txt1
-rw-r--r--source/gameengine/GamePlayer/ghost/CMakeLists.txt1
-rw-r--r--source/gameengine/Ketsji/CMakeLists.txt1
-rw-r--r--source/gameengine/Ketsji/KXNetwork/CMakeLists.txt1
-rw-r--r--source/gameengine/Ketsji/KX_KetsjiEngine.h1
-rw-r--r--source/gameengine/Ketsji/KX_PythonInit.cpp12
-rw-r--r--source/gameengine/Ketsji/KX_Scene.cpp1
-rw-r--r--source/gameengine/Ketsji/Makefile4
-rw-r--r--source/gameengine/Network/CMakeLists.txt1
-rw-r--r--source/gameengine/Network/LoopBackNetwork/CMakeLists.txt1
-rw-r--r--source/gameengine/Physics/Bullet/CMakeLists.txt1
-rw-r--r--source/gameengine/Physics/Dummy/CMakeLists.txt1
-rw-r--r--source/gameengine/Physics/common/CMakeLists.txt1
-rw-r--r--source/gameengine/PyDoc/SConscript34
-rw-r--r--source/gameengine/Rasterizer/CMakeLists.txt1
-rw-r--r--source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt1
-rw-r--r--source/gameengine/SceneGraph/CMakeLists.txt1
-rw-r--r--source/gameengine/VideoTexture/CMakeLists.txt1
24 files changed, 23 insertions, 66 deletions
diff --git a/source/gameengine/BlenderRoutines/CMakeLists.txt b/source/gameengine/BlenderRoutines/CMakeLists.txt
index 625ad006e0c..57d28561647 100644
--- a/source/gameengine/BlenderRoutines/CMakeLists.txt
+++ b/source/gameengine/BlenderRoutines/CMakeLists.txt
@@ -50,4 +50,3 @@ ELSE(WITH_PYTHON)
ENDIF(WITH_PYTHON)
BLENDERLIB(bf_blroutines "${SRC}" "${INC}")
-#env.BlenderLib ( 'bf_bloutines', sources, Split(incs), [], libtype=['game', 'game2', 'player'], priority=[0, 0, 55] , compileflags=cxxflags)
diff --git a/source/gameengine/Converter/CMakeLists.txt b/source/gameengine/Converter/CMakeLists.txt
index 26689be644f..97c367dd1f1 100644
--- a/source/gameengine/Converter/CMakeLists.txt
+++ b/source/gameengine/Converter/CMakeLists.txt
@@ -70,4 +70,3 @@ ELSE(WITH_PYTHON)
ENDIF(WITH_PYTHON)
BLENDERLIB(bf_converter "${SRC}" "${INC}")
-#env.BlenderLib ( 'bf_converter', sources, Split(incs), [], libtype=['game','player'], priority=[5,70] )
diff --git a/source/gameengine/Converter/KX_ConvertControllers.cpp b/source/gameengine/Converter/KX_ConvertControllers.cpp
index 858db6d76a1..a6b62ecb7b0 100644
--- a/source/gameengine/Converter/KX_ConvertControllers.cpp
+++ b/source/gameengine/Converter/KX_ConvertControllers.cpp
@@ -176,11 +176,11 @@ void BL_ConvertControllers(
/* let the controller print any warnings here when importing */
pyctrl->SetScriptText(STR_String(pycont->module));
pyctrl->SetScriptName(pycont->module); /* will be something like module.func so using it as the name is OK */
- }
- if(pycont->flag & CONT_PY_DEBUG) {
- printf("\nDebuging \"%s\", module for object %s\n\texpect worse performance.\n", pycont->module, blenderobject->id.name+2);
- pyctrl->SetDebug(true);
+ if(pycont->flag & CONT_PY_DEBUG) {
+ printf("\nDebuging \"%s\", module for object %s\n\texpect worse performance.\n", pycont->module, blenderobject->id.name+2);
+ pyctrl->SetDebug(true);
+ }
}
#endif // DISABLE_PYTHON
diff --git a/source/gameengine/Expressions/CMakeLists.txt b/source/gameengine/Expressions/CMakeLists.txt
index 41f771e12bd..85b5daa3b4a 100644
--- a/source/gameengine/Expressions/CMakeLists.txt
+++ b/source/gameengine/Expressions/CMakeLists.txt
@@ -43,4 +43,3 @@ ELSE(WITH_PYTHON)
ENDIF(WITH_PYTHON)
BLENDERLIB(bf_expressions "${SRC}" "${INC}")
-#env.BlenderLib ( 'bf_expressions', sources, Split(incs), [], libtype=['game','player'], priority = [45,125] )
diff --git a/source/gameengine/GameLogic/CMakeLists.txt b/source/gameengine/GameLogic/CMakeLists.txt
index 3ffba14ec95..93183dafeee 100644
--- a/source/gameengine/GameLogic/CMakeLists.txt
+++ b/source/gameengine/GameLogic/CMakeLists.txt
@@ -49,4 +49,3 @@ ELSE(WITH_PYTHON)
ENDIF(WITH_PYTHON)
BLENDERLIB(bf_logic "${SRC}" "${INC}")
-#env.BlenderLib ( 'bf_logic', sources, Split(incs), [], libtype=['game','player'], priority=[30, 110] )
diff --git a/source/gameengine/GameLogic/SCA_PythonController.cpp b/source/gameengine/GameLogic/SCA_PythonController.cpp
index bcc61b533c3..48fdcb3eb44 100644
--- a/source/gameengine/GameLogic/SCA_PythonController.cpp
+++ b/source/gameengine/GameLogic/SCA_PythonController.cpp
@@ -305,7 +305,7 @@ bool SCA_PythonController::Import()
char *function_string;
function_string= strrchr(mod_path, '.');
-
+
if(function_string == NULL) {
printf("Python module name formatting error \"%s\":\n\texpected \"SomeModule.Func\", got \"%s\"\n", GetName().Ptr(), m_scriptText.Ptr());
return false;
@@ -316,11 +316,17 @@ bool SCA_PythonController::Import()
// Import the module and print an error if it's not found
PyObject *mod = PyImport_ImportModule(mod_path);
- if(mod && m_debug)
+
+ if (mod == NULL) {
+ ErrorPrint("Python module can't be imported");
+ return false;
+ }
+
+ if(m_debug)
mod = PyImport_ReloadModule(mod);
if (mod == NULL) {
- ErrorPrint("Python module not found");
+ ErrorPrint("Python module can't be reloaded");
return false;
}
diff --git a/source/gameengine/GamePlayer/common/CMakeLists.txt b/source/gameengine/GamePlayer/common/CMakeLists.txt
index 418b77357a4..08a4aa50a00 100644
--- a/source/gameengine/GamePlayer/common/CMakeLists.txt
+++ b/source/gameengine/GamePlayer/common/CMakeLists.txt
@@ -74,4 +74,3 @@ SET(INC
ADD_DEFINITIONS(-DGLEW_STATIC)
BLENDERLIB_NOLIST(gp_common "${SRC}" "${INC}")
-#env.BlenderLib (libname='gp_common', sources=source_files, includes=incs, defines = [], libtype='player', priority=5, compileflags=cflags)
diff --git a/source/gameengine/GamePlayer/ghost/CMakeLists.txt b/source/gameengine/GamePlayer/ghost/CMakeLists.txt
index 848c2f73f06..8164878762c 100644
--- a/source/gameengine/GamePlayer/ghost/CMakeLists.txt
+++ b/source/gameengine/GamePlayer/ghost/CMakeLists.txt
@@ -73,4 +73,3 @@ IF(WITH_FFMPEG)
ENDIF(WITH_FFMPEG)
BLENDERLIB_NOLIST(gp_ghost "${SRC}" "${INC}")
-#env.BlenderLib (libname='gp_ghost', sources=source_files, includes = incs, defines = [], libtype='player',priority=0, compileflags=cflags)
diff --git a/source/gameengine/Ketsji/CMakeLists.txt b/source/gameengine/Ketsji/CMakeLists.txt
index c4af701f87b..d8f6e3164ec 100644
--- a/source/gameengine/Ketsji/CMakeLists.txt
+++ b/source/gameengine/Ketsji/CMakeLists.txt
@@ -80,4 +80,3 @@ IF(WITH_FFMPEG)
ENDIF(WITH_FFMPEG)
BLENDERLIB(bf_ketsji "${SRC}" "${INC}")
-#env.BlenderLib ( 'bf_ketsji', sources, Split(incs), [], libtype=['game','player'], priority=[25, 72], compileflags = cflags )
diff --git a/source/gameengine/Ketsji/KXNetwork/CMakeLists.txt b/source/gameengine/Ketsji/KXNetwork/CMakeLists.txt
index 40079f3f83e..ce3d8fa22fc 100644
--- a/source/gameengine/Ketsji/KXNetwork/CMakeLists.txt
+++ b/source/gameengine/Ketsji/KXNetwork/CMakeLists.txt
@@ -45,4 +45,3 @@ ELSE(WITH_PYTHON)
ENDIF(WITH_PYTHON)
BLENDERLIB(kx_network "${SRC}" "${INC}")
-#env.BlenderLib ( 'kx_network', Split(sources), Split(incs), defines=[],libtype=['game2', 'player'], priority=[5, 155] )
diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.h b/source/gameengine/Ketsji/KX_KetsjiEngine.h
index 0a461a8b63e..f52ec8192cc 100644
--- a/source/gameengine/Ketsji/KX_KetsjiEngine.h
+++ b/source/gameengine/Ketsji/KX_KetsjiEngine.h
@@ -71,6 +71,7 @@ private:
class KX_ISceneConverter* m_sceneconverter;
class NG_NetworkDeviceInterface* m_networkdevice;
#ifndef DISABLE_PYTHON
+ /* borrowed from sys.modules["__main__"], dont manage ref's */
PyObject* m_pythondictionary;
#endif
class SCA_IInputDevice* m_keyboarddevice;
diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp
index 7327b9c08ff..3e63aa61d82 100644
--- a/source/gameengine/Ketsji/KX_PythonInit.cpp
+++ b/source/gameengine/Ketsji/KX_PythonInit.cpp
@@ -1912,9 +1912,8 @@ PyObject* initGamePlayerPythonScripting(const STR_String& progname, TPythonSecur
first_time = false;
PyObjectPlus::ClearDeprecationWarning();
-
- PyObject* moduleobj = PyImport_AddModule("__main__");
- return PyModule_GetDict(moduleobj);
+
+ return bpy_namespace_dict_new(NULL);
}
void exitGamePlayerPythonScripting()
@@ -1949,9 +1948,8 @@ PyObject* initGamePythonScripting(const STR_String& progname, TPythonSecurityLev
initPySysObjects(maggie);
PyObjectPlus::NullDeprecationWarning();
-
- PyObject* moduleobj = PyImport_AddModule("__main__");
- return PyModule_GetDict(moduleobj);
+
+ return bpy_namespace_dict_new(NULL);
}
void exitGamePythonScripting()
@@ -1992,7 +1990,7 @@ void setupGamePython(KX_KetsjiEngine* ketsjiengine, KX_Scene* startscene, Main *
initVideoTexture();
/* could be done a lot more nicely, but for now a quick way to get bge.* working */
- PyRun_SimpleString("__import__('sys').modules['bge']=[mod for mod in (type(__builtins__)('bge'), ) if mod.__dict__.update({'logic':__import__('GameLogic'), 'render':__import__('Rasterizer'), 'events':__import__('GameKeys'), 'constraints':__import__('PhysicsConstraints'), 'types':__import__('GameTypes')}) is None][0]");
+ PyRun_SimpleString("sys = __import__('sys');mod = sys.modules['bge'] = type(sys)('bge');mod.__dict__.update({'logic':__import__('GameLogic'), 'render':__import__('Rasterizer'), 'events':__import__('GameKeys'), 'constraints':__import__('PhysicsConstraints'), 'types':__import__('GameTypes')})");
}
static struct PyModuleDef Rasterizer_module_def = {
diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp
index 99bec8159b4..d4936d7054c 100644
--- a/source/gameengine/Ketsji/KX_Scene.cpp
+++ b/source/gameengine/Ketsji/KX_Scene.cpp
@@ -68,7 +68,6 @@
#include "SG_Tree.h"
#include "DNA_group_types.h"
#include "DNA_scene_types.h"
-#include "BKE_anim.h"
#include "KX_SG_NodeRelationships.h"
diff --git a/source/gameengine/Ketsji/Makefile b/source/gameengine/Ketsji/Makefile
index 4ecd23fc1a2..1a7ec415382 100644
--- a/source/gameengine/Ketsji/Makefile
+++ b/source/gameengine/Ketsji/Makefile
@@ -65,6 +65,10 @@ CPPFLAGS += -I../../blender/imbuf
CPPFLAGS += -I../../blender/gpu
CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
+ifeq ($(WITH_FFMPEG), true)
+ CPPFLAGS += -DWITH_FFMPEG
+endif
+
###########################
SOURCEDIR = source/gameengine/Ketsji
diff --git a/source/gameengine/Network/CMakeLists.txt b/source/gameengine/Network/CMakeLists.txt
index 2478715e0ab..795e63b47c3 100644
--- a/source/gameengine/Network/CMakeLists.txt
+++ b/source/gameengine/Network/CMakeLists.txt
@@ -34,4 +34,3 @@ SET(INC
)
BLENDERLIB(bf_ngnetwork "${SRC}" "${INC}")
-#env.BlenderLib ( 'bf_ngnetwork', sources, Split(incs), [], libtype=['game2', 'player'], priority=[15, 160] )
diff --git a/source/gameengine/Network/LoopBackNetwork/CMakeLists.txt b/source/gameengine/Network/LoopBackNetwork/CMakeLists.txt
index 6b43a1561a1..e7c34f5a2a0 100644
--- a/source/gameengine/Network/LoopBackNetwork/CMakeLists.txt
+++ b/source/gameengine/Network/LoopBackNetwork/CMakeLists.txt
@@ -34,4 +34,3 @@ SET(INC
)
BLENDERLIB(bf_loopbacknetwork "${SRC}" "${INC}")
-#env.BlenderLib ( 'bf_loopbacknetwork', Split(sources), Split(incs), defines=[],libtype=['game2', 'player'], priority=[25, 165] )
diff --git a/source/gameengine/Physics/Bullet/CMakeLists.txt b/source/gameengine/Physics/Bullet/CMakeLists.txt
index 11a535b35c8..95888967b78 100644
--- a/source/gameengine/Physics/Bullet/CMakeLists.txt
+++ b/source/gameengine/Physics/Bullet/CMakeLists.txt
@@ -47,4 +47,3 @@ SET(INC
)
BLENDERLIB(bf_bullet "${SRC}" "${INC}")
-#env.BlenderLib ( 'bf_bullet', Split(sources), Split(incs), [], libtype=['game','player'], priority=[15,90] )
diff --git a/source/gameengine/Physics/Dummy/CMakeLists.txt b/source/gameengine/Physics/Dummy/CMakeLists.txt
index cb7a467dde9..18330392cd7 100644
--- a/source/gameengine/Physics/Dummy/CMakeLists.txt
+++ b/source/gameengine/Physics/Dummy/CMakeLists.txt
@@ -32,4 +32,3 @@ SET(INC
)
BLENDERLIB(bf_dummy "${SRC}" "${INC}")
-#env.BlenderLib ( 'bf_dummy', Split(sources), Split(incs), [], libtype=['game','player'], priority=[10,100] )
diff --git a/source/gameengine/Physics/common/CMakeLists.txt b/source/gameengine/Physics/common/CMakeLists.txt
index 3618725c2bf..0f8f59f3b78 100644
--- a/source/gameengine/Physics/common/CMakeLists.txt
+++ b/source/gameengine/Physics/common/CMakeLists.txt
@@ -33,4 +33,3 @@ SET(INC
)
BLENDERLIB(bf_common "${SRC}" "${INC}")
-#env.BlenderLib ( 'bf_common', Split(sources), Split(incs), [], libtype=['game', 'game2','player'], priority=[20, 35, 95] )
diff --git a/source/gameengine/PyDoc/SConscript b/source/gameengine/PyDoc/SConscript
deleted file mode 100644
index dabe004ae6a..00000000000
--- a/source/gameengine/PyDoc/SConscript
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/python
-Import ('env')
-import os
-
-if env['WITH_BF_FHS']:
- BLENDERPATH = os.path.join(env['BF_INSTALLDIR'], 'share', 'blender', env['BF_VERSION'])
-else:
- BLENDERPATH = env['BF_INSTALLDIR']
-
-from optparse import OptionParser
-import epydoc
-from epydoc.docbuilder import build_doc_index
-from epydoc import cli
-names = env.Glob("source/gameengine/PyDoc/*.py")
-docindex = build_doc_index(names)
-optvalues = cli.OPTION_DEFAULTS
-optvalues["verbose"] = 1
-optvalues["quiet"] = 0
-optvalues["include_source_code"] = 0
-optvalues["inheritance"] = "included"
-optvalues["show_private"] = 0
-optvalues["target"] = os.path.join(BLENDERPATH, 'doc')
-optvalues["url"] = "http://www.blender.org"
-optvalues["top"] = "Game Engine API"
-optvalues["name"] = "Blender"
-optvalues["noprivate"] = 1
-optvalues["noframes"] = 1
-optvalues["names"] = names
-optparser = OptionParser()
-optparser.set_defaults(**optvalues)
-(options, args) = optparser.parse_args([])
-print "Writing Game Engine epydocs to \"%s\"" % optvalues["target"]
-cli.write_html(docindex, options)
-
diff --git a/source/gameengine/Rasterizer/CMakeLists.txt b/source/gameengine/Rasterizer/CMakeLists.txt
index 096b1583e3e..d718bf3e507 100644
--- a/source/gameengine/Rasterizer/CMakeLists.txt
+++ b/source/gameengine/Rasterizer/CMakeLists.txt
@@ -43,4 +43,3 @@ SET(INC
ADD_DEFINITIONS(-DGLEW_STATIC)
BLENDERLIB(bf_rasterizer "${SRC}" "${INC}")
-#env.BlenderLib ( 'bf_rasterizer', sources, Split(incs), [], libtype=['game','player'], priority=[35,115], compileflags = cflags )
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt
index 5d6f61ebfa1..cc48952dc20 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt
@@ -44,4 +44,3 @@ SET(INC
ADD_DEFINITIONS(-DGLEW_STATIC)
BLENDERLIB(bf_oglrasterizer "${SRC}" "${INC}")
-#env.BlenderLib ( 'bf_oglrasterizer', Split(sources), Split(incs), [], libtype=['game','player'], priority=[40, 120] )
diff --git a/source/gameengine/SceneGraph/CMakeLists.txt b/source/gameengine/SceneGraph/CMakeLists.txt
index 3242ec57d94..a73130531c0 100644
--- a/source/gameengine/SceneGraph/CMakeLists.txt
+++ b/source/gameengine/SceneGraph/CMakeLists.txt
@@ -32,4 +32,3 @@ SET(INC
)
BLENDERLIB(bf_scenegraph "${SRC}" "${INC}")
-#env.BlenderLib ( 'bf_scenegraph', sources, Split(incs), [], libtype=['game','player'], priority=[50,130] )
diff --git a/source/gameengine/VideoTexture/CMakeLists.txt b/source/gameengine/VideoTexture/CMakeLists.txt
index eaee00753ff..3af514ca0de 100644
--- a/source/gameengine/VideoTexture/CMakeLists.txt
+++ b/source/gameengine/VideoTexture/CMakeLists.txt
@@ -64,4 +64,3 @@ ELSE(WITH_PYTHON)
ENDIF(WITH_PYTHON)
BLENDERLIB(bf_videotex "${SRC}" "${INC}")
-#env.BlenderLib ( 'bf_videotex', sources, Split(incs), [], libtype=['game','player'], priority=[25, 72], compileflags = cflags )