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>2014-06-17 15:52:04 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-06-17 16:00:13 +0400
commit10af70cef8962744b1509614496861ee9c4a37e0 (patch)
tree4cc450df7043559b49269c81ec2c98ed59955cc9
parentc40cc0bf6d93bde49f1ae16a663cb504d1a588d3 (diff)
Support for building without Python
-rw-r--r--source/blender/blenkernel/intern/idprop.c2
-rw-r--r--source/blender/editors/util/numinput.c3
-rw-r--r--source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp4
-rw-r--r--source/gameengine/Expressions/IntValue.cpp2
-rw-r--r--source/gameengine/Ketsji/KX_KetsjiEngine.cpp4
-rw-r--r--source/gameengine/Ketsji/KX_ObjectActuator.cpp1
-rw-r--r--source/gameengine/Ketsji/KX_TouchEventManager.cpp5
-rw-r--r--source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLLight.cpp2
8 files changed, 19 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/idprop.c b/source/blender/blenkernel/intern/idprop.c
index f12a0720692..3188676fb6c 100644
--- a/source/blender/blenkernel/intern/idprop.c
+++ b/source/blender/blenkernel/intern/idprop.c
@@ -821,7 +821,7 @@ bool IDP_EqualsProperties_ex(IDProperty *prop1, IDProperty *prop2, const bool is
case IDP_INT:
return (IDP_Int(prop1) == IDP_Int(prop2));
case IDP_FLOAT:
-#ifdef DEBUG
+#if defined(DEBUG) && defined(WITH_PYTHON)
{
float p1 = IDP_Float(prop1);
float p2 = IDP_Float(prop2);
diff --git a/source/blender/editors/util/numinput.c b/source/blender/editors/util/numinput.c
index ee391af185d..26b9d8b5d71 100644
--- a/source/blender/editors/util/numinput.c
+++ b/source/blender/editors/util/numinput.c
@@ -256,7 +256,6 @@ bool handleNumInput(bContext *C, NumInput *n, const wmEvent *event)
short idx = n->idx, idx_max = n->idx_max;
short dir = STRCUR_DIR_NEXT, mode = STRCUR_JUMP_NONE;
int cur;
- double val;
switch (event->type) {
case EVT_MODAL_MAP:
@@ -467,6 +466,7 @@ bool handleNumInput(bContext *C, NumInput *n, const wmEvent *event)
/* At this point, our value has changed, try to interpret it with python (if str is not empty!). */
if (n->str[0]) {
#ifdef WITH_PYTHON
+ double val;
char str_unit_convert[NUM_STR_REP_LEN * 6]; /* Should be more than enough! */
const char *default_unit = NULL;
@@ -489,6 +489,7 @@ bool handleNumInput(bContext *C, NumInput *n, const wmEvent *event)
}
#else /* Very unlikely, but does not harm... */
n->val[idx] = (float)atof(n->str);
+ (void)C;
#endif /* WITH_PYTHON */
if (n->val_flag[idx] & NUM_NEGATE) {
diff --git a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
index a5dede397bb..298b16af43b 100644
--- a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
+++ b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
@@ -186,6 +186,8 @@ static int BL_KetsjiNextFrame(KX_KetsjiEngine *ketsjiengine, bContext *C, wmWind
return exitrequested;
}
+
+#ifdef WITH_PYTHON
static struct BL_KetsjiNextFrameState {
class KX_KetsjiEngine* ketsjiengine;
struct bContext *C;
@@ -210,6 +212,8 @@ static int BL_KetsjiPyNextFrame(void *state0)
state->mousedevice,
state->draw_letterbox);
}
+#endif
+
extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *cam_frame, int always_use_expand_framing)
{
diff --git a/source/gameengine/Expressions/IntValue.cpp b/source/gameengine/Expressions/IntValue.cpp
index 5cb8a1ca296..a2d055974c3 100644
--- a/source/gameengine/Expressions/IntValue.cpp
+++ b/source/gameengine/Expressions/IntValue.cpp
@@ -15,6 +15,8 @@
*
*/
+#include <stdio.h>
+
#include "IntValue.h"
#include "ErrorValue.h"
#include "FloatValue.h"
diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
index dc81bae1f0c..7d7e15a5141 100644
--- a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
+++ b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
@@ -514,13 +514,13 @@ void KX_KetsjiEngine::EndFrame()
RenderDebugProperties();
}
- double tottime = m_logger->GetAverage(), time;
+ double tottime = m_logger->GetAverage();
if (tottime < 1e-6)
tottime = 1e-6;
#ifdef WITH_PYTHON
for (int i = tc_first; i < tc_numCategories; ++i) {
- time = m_logger->GetAverage((KX_TimeCategory)i);
+ double time = m_logger->GetAverage((KX_TimeCategory)i);
PyObject *val = PyTuple_New(2);
PyTuple_SetItem(val, 0, PyFloat_FromDouble(time*1000.f));
PyTuple_SetItem(val, 1, PyFloat_FromDouble(time/tottime * 100.f));
diff --git a/source/gameengine/Ketsji/KX_ObjectActuator.cpp b/source/gameengine/Ketsji/KX_ObjectActuator.cpp
index 2f85453dd23..0eec86987be 100644
--- a/source/gameengine/Ketsji/KX_ObjectActuator.cpp
+++ b/source/gameengine/Ketsji/KX_ObjectActuator.cpp
@@ -32,6 +32,7 @@
* \ingroup ketsji
*/
+#include <stdio.h>
#include "KX_ObjectActuator.h"
#include "KX_GameObject.h"
diff --git a/source/gameengine/Ketsji/KX_TouchEventManager.cpp b/source/gameengine/Ketsji/KX_TouchEventManager.cpp
index d010d3d50a0..40e5eb00b79 100644
--- a/source/gameengine/Ketsji/KX_TouchEventManager.cpp
+++ b/source/gameengine/Ketsji/KX_TouchEventManager.cpp
@@ -97,9 +97,14 @@ bool KX_TouchEventManager::newBroadphaseResponse(void *client_data,
bool has_py_callbacks = false;
+#ifdef WITH_PYTHON
// Consider callbacks for broadphase inclusion if it's a sensor object type
if (gobj1 && gobj2)
has_py_callbacks = gobj1->m_collisionCallbacks || gobj2->m_collisionCallbacks;
+#else
+ (void)gobj1;
+ (void)gobj2;
+#endif
switch (info1->m_type)
{
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLLight.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLLight.cpp
index 91ad2838ccd..e1b7a2151c5 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLLight.cpp
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLLight.cpp
@@ -25,6 +25,8 @@
* ***** END GPL LICENSE BLOCK *****
*/
+#include <stdio.h>
+
#include "GL/glew.h"
#include "RAS_OpenGLLight.h"