[Bf-blender-cvs] [10af70c] master: Support for building without Python

Campbell Barton noreply at git.blender.org
Tue Jun 17 14:04:57 CEST 2014


Commit: 10af70cef8962744b1509614496861ee9c4a37e0
Author: Campbell Barton
Date:   Tue Jun 17 21:52:04 2014 +1000
https://developer.blender.org/rB10af70cef8962744b1509614496861ee9c4a37e0

Support for building without Python

===================================================================

M	source/blender/blenkernel/intern/idprop.c
M	source/blender/editors/util/numinput.c
M	source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
M	source/gameengine/Expressions/IntValue.cpp
M	source/gameengine/Ketsji/KX_KetsjiEngine.cpp
M	source/gameengine/Ketsji/KX_ObjectActuator.cpp
M	source/gameengine/Ketsji/KX_TouchEventManager.cpp
M	source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLLight.cpp

===================================================================

diff --git a/source/blender/blenkernel/intern/idprop.c b/source/blender/blenkernel/intern/idprop.c
index f12a072..3188676 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 ee391af..26b9d8b 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 a5dede3..298b16a 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 5cb8a1c..a2d0559 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 dc81bae..7d7e15a 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 2f85453..0eec869 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 d010d3d..40e5eb0 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 91ad283..e1b7a21 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"




More information about the Bf-blender-cvs mailing list