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/GameLogic')
-rw-r--r--source/gameengine/GameLogic/CMakeLists.txt3
-rw-r--r--source/gameengine/GameLogic/SCA_2DFilterActuator.cpp2
-rw-r--r--source/gameengine/GameLogic/SCA_ANDController.cpp4
-rw-r--r--source/gameengine/GameLogic/SCA_ActuatorSensor.cpp4
-rw-r--r--source/gameengine/GameLogic/SCA_ActuatorSensor.h4
-rw-r--r--source/gameengine/GameLogic/SCA_AlwaysSensor.cpp2
-rw-r--r--source/gameengine/GameLogic/SCA_DelaySensor.cpp4
-rw-r--r--source/gameengine/GameLogic/SCA_IController.cpp4
-rw-r--r--source/gameengine/GameLogic/SCA_IController.h4
-rw-r--r--source/gameengine/GameLogic/SCA_ILogicBrick.cpp4
-rw-r--r--source/gameengine/GameLogic/SCA_ILogicBrick.h4
-rw-r--r--source/gameengine/GameLogic/SCA_IObject.cpp4
-rw-r--r--source/gameengine/GameLogic/SCA_IObject.h2
-rw-r--r--source/gameengine/GameLogic/SCA_ISensor.cpp4
-rw-r--r--source/gameengine/GameLogic/SCA_ISensor.h4
-rw-r--r--source/gameengine/GameLogic/SCA_JoystickSensor.cpp2
-rw-r--r--source/gameengine/GameLogic/SCA_JoystickSensor.h4
-rw-r--r--source/gameengine/GameLogic/SCA_KeyboardSensor.cpp4
-rw-r--r--source/gameengine/GameLogic/SCA_KeyboardSensor.h2
-rw-r--r--source/gameengine/GameLogic/SCA_LogicManager.cpp2
-rw-r--r--source/gameengine/GameLogic/SCA_MouseSensor.cpp4
-rw-r--r--source/gameengine/GameLogic/SCA_MouseSensor.h2
-rw-r--r--source/gameengine/GameLogic/SCA_NANDController.cpp2
-rw-r--r--source/gameengine/GameLogic/SCA_NORController.cpp4
-rw-r--r--source/gameengine/GameLogic/SCA_ORController.cpp4
-rw-r--r--source/gameengine/GameLogic/SCA_PropertyActuator.cpp2
-rw-r--r--source/gameengine/GameLogic/SCA_PropertySensor.cpp4
-rw-r--r--source/gameengine/GameLogic/SCA_PropertySensor.h2
-rw-r--r--source/gameengine/GameLogic/SCA_PythonController.cpp20
-rw-r--r--source/gameengine/GameLogic/SCA_PythonController.h8
-rw-r--r--source/gameengine/GameLogic/SCA_PythonKeyboard.cpp6
-rw-r--r--source/gameengine/GameLogic/SCA_PythonKeyboard.h4
-rw-r--r--source/gameengine/GameLogic/SCA_PythonMouse.cpp6
-rw-r--r--source/gameengine/GameLogic/SCA_PythonMouse.h4
-rw-r--r--source/gameengine/GameLogic/SCA_RandomActuator.cpp2
-rw-r--r--source/gameengine/GameLogic/SCA_RandomActuator.h4
-rw-r--r--source/gameengine/GameLogic/SCA_RandomSensor.cpp4
-rw-r--r--source/gameengine/GameLogic/SCA_RandomSensor.h2
-rw-r--r--source/gameengine/GameLogic/SCA_XNORController.cpp4
-rw-r--r--source/gameengine/GameLogic/SCA_XORController.cpp4
-rw-r--r--source/gameengine/GameLogic/SConscript3
41 files changed, 80 insertions, 82 deletions
diff --git a/source/gameengine/GameLogic/CMakeLists.txt b/source/gameengine/GameLogic/CMakeLists.txt
index 57150a90e99..b346df2b340 100644
--- a/source/gameengine/GameLogic/CMakeLists.txt
+++ b/source/gameengine/GameLogic/CMakeLists.txt
@@ -87,8 +87,7 @@ ENDIF(WITH_SDL)
IF(WITH_PYTHON)
LIST(APPEND INC ${PYTHON_INC})
-ELSE(WITH_PYTHON)
- ADD_DEFINITIONS(-DDISABLE_PYTHON)
+ ADD_DEFINITIONS(-DWITH_PYTHON)
ENDIF(WITH_PYTHON)
BLENDERLIB(bf_logic "${SRC}" "${INC}")
diff --git a/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp b/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp
index f6d24af0e67..3e9217251b5 100644
--- a/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp
+++ b/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp
@@ -96,7 +96,7 @@ void SCA_2DFilterActuator::SetShaderText(const char *text)
m_shaderText = text;
}
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
/* ------------------------------------------------------------------------- */
/* Python functions */
diff --git a/source/gameengine/GameLogic/SCA_ANDController.cpp b/source/gameengine/GameLogic/SCA_ANDController.cpp
index 53c9be5215e..7e2c5bdb350 100644
--- a/source/gameengine/GameLogic/SCA_ANDController.cpp
+++ b/source/gameengine/GameLogic/SCA_ANDController.cpp
@@ -87,7 +87,7 @@ CValue* SCA_ANDController::GetReplica()
return replica;
}
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
/* ------------------------------------------------------------------------- */
/* Python functions */
@@ -123,5 +123,5 @@ PyMethodDef SCA_ANDController::Methods[] = {
PyAttributeDef SCA_ANDController::Attributes[] = {
{ NULL } //Sentinel
};
-#endif // DISABLE_PYTHON
+#endif // WITH_PYTHON
/* eof */
diff --git a/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp b/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp
index c77e58d2f3b..d6c328cd730 100644
--- a/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp
+++ b/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp
@@ -110,7 +110,7 @@ void SCA_ActuatorSensor::Update()
}
}
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
/* ------------------------------------------------------------------------- */
/* Python functions */
@@ -160,6 +160,6 @@ int SCA_ActuatorSensor::CheckActuator(void *self, const PyAttributeDef*)
return 1;
}
-#endif // DISABLE_PYTHON
+#endif // WITH_PYTHON
/* eof */
diff --git a/source/gameengine/GameLogic/SCA_ActuatorSensor.h b/source/gameengine/GameLogic/SCA_ActuatorSensor.h
index 323746889bf..eb52d365079 100644
--- a/source/gameengine/GameLogic/SCA_ActuatorSensor.h
+++ b/source/gameengine/GameLogic/SCA_ActuatorSensor.h
@@ -56,7 +56,7 @@ public:
virtual void ReParent(SCA_IObject* parent);
void Update();
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
@@ -64,7 +64,7 @@ public:
static int CheckActuator(void *self, const PyAttributeDef*);
-#endif // DISABLE_PYTHON
+#endif // WITH_PYTHON
};
#endif
diff --git a/source/gameengine/GameLogic/SCA_AlwaysSensor.cpp b/source/gameengine/GameLogic/SCA_AlwaysSensor.cpp
index e364225af3d..88f5855b223 100644
--- a/source/gameengine/GameLogic/SCA_AlwaysSensor.cpp
+++ b/source/gameengine/GameLogic/SCA_AlwaysSensor.cpp
@@ -94,7 +94,7 @@ bool SCA_AlwaysSensor::Evaluate()
return result;
}
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
/* ------------------------------------------------------------------------- */
/* Python functions */
diff --git a/source/gameengine/GameLogic/SCA_DelaySensor.cpp b/source/gameengine/GameLogic/SCA_DelaySensor.cpp
index 6cad801e429..abe72fb6757 100644
--- a/source/gameengine/GameLogic/SCA_DelaySensor.cpp
+++ b/source/gameengine/GameLogic/SCA_DelaySensor.cpp
@@ -120,7 +120,7 @@ bool SCA_DelaySensor::Evaluate()
return trigger;
}
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
/* ------------------------------------------------------------------------- */
/* Python functions */
@@ -160,6 +160,6 @@ PyAttributeDef SCA_DelaySensor::Attributes[] = {
{ NULL } //Sentinel
};
-#endif // DISABLE_PYTHON
+#endif // WITH_PYTHON
/* eof */
diff --git a/source/gameengine/GameLogic/SCA_IController.cpp b/source/gameengine/GameLogic/SCA_IController.cpp
index c291ff091aa..0c6b8350bca 100644
--- a/source/gameengine/GameLogic/SCA_IController.cpp
+++ b/source/gameengine/GameLogic/SCA_IController.cpp
@@ -194,7 +194,7 @@ void SCA_IController::ApplyState(unsigned int state)
}
}
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
/* Python api */
@@ -247,4 +247,4 @@ PyObject* SCA_IController::pyattr_get_actuators(void *self_v, const KX_PYATTRIBU
{
return KX_PythonSeq_CreatePyObject((static_cast<SCA_IController*>(self_v))->m_proxy, KX_PYGENSEQ_CONT_TYPE_ACTUATORS);
}
-#endif // DISABLE_PYTHON
+#endif // WITH_PYTHON
diff --git a/source/gameengine/GameLogic/SCA_IController.h b/source/gameengine/GameLogic/SCA_IController.h
index e23a0d7dc92..2d19770be4a 100644
--- a/source/gameengine/GameLogic/SCA_IController.h
+++ b/source/gameengine/GameLogic/SCA_IController.h
@@ -99,11 +99,11 @@ public:
}
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
static PyObject* pyattr_get_state(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
static PyObject* pyattr_get_sensors(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
static PyObject* pyattr_get_actuators(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
-#endif // DISABLE_PYTHON
+#endif // WITH_PYTHON
};
#endif
diff --git a/source/gameengine/GameLogic/SCA_ILogicBrick.cpp b/source/gameengine/GameLogic/SCA_ILogicBrick.cpp
index f2e1a8dd151..afda218c99c 100644
--- a/source/gameengine/GameLogic/SCA_ILogicBrick.cpp
+++ b/source/gameengine/GameLogic/SCA_ILogicBrick.cpp
@@ -169,7 +169,7 @@ CValue* SCA_ILogicBrick::GetEvent()
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
/* python stuff */
@@ -253,4 +253,4 @@ PyObject* SCA_ILogicBrick::BoolToPyArg(bool boolarg)
return PyLong_FromSsize_t(boolarg? KX_TRUE: KX_FALSE);
}
-#endif // DISABLE_PYTHON
+#endif // WITH_PYTHON
diff --git a/source/gameengine/GameLogic/SCA_ILogicBrick.h b/source/gameengine/GameLogic/SCA_ILogicBrick.h
index 3225c245550..a444210e8d9 100644
--- a/source/gameengine/GameLogic/SCA_ILogicBrick.h
+++ b/source/gameengine/GameLogic/SCA_ILogicBrick.h
@@ -133,7 +133,7 @@ public:
virtual void Replace_IScene(SCA_IScene *val) {};
virtual void Replace_NetworkScene(NG_NetworkScene *val) {};
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
// python methods
static PyObject* pyattr_get_owner(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
@@ -157,7 +157,7 @@ protected:
/** Convert a a c++ value to KX_TRUE, KX_FALSE in Python. */
PyObject* BoolToPyArg(bool);
-#endif // DISABLE_PYTHON
+#endif // WITH_PYTHON
};
diff --git a/source/gameengine/GameLogic/SCA_IObject.cpp b/source/gameengine/GameLogic/SCA_IObject.cpp
index 7c0a5b2db15..ff71d1bf96b 100644
--- a/source/gameengine/GameLogic/SCA_IObject.cpp
+++ b/source/gameengine/GameLogic/SCA_IObject.cpp
@@ -303,7 +303,7 @@ void SCA_IObject::SetState(unsigned int state)
}
}
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
/* ------------------------------------------------------------------------- */
/* Python functions */
@@ -342,4 +342,4 @@ PyAttributeDef SCA_IObject::Attributes[] = {
{ NULL } //Sentinel
};
-#endif // DISABLE_PYTHON
+#endif // WITH_PYTHON
diff --git a/source/gameengine/GameLogic/SCA_IObject.h b/source/gameengine/GameLogic/SCA_IObject.h
index 0178da5f343..591be6fe53b 100644
--- a/source/gameengine/GameLogic/SCA_IObject.h
+++ b/source/gameengine/GameLogic/SCA_IObject.h
@@ -41,7 +41,7 @@ class SCA_ISensor;
class SCA_IController;
class SCA_IActuator;
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
template<class T> T PyVecTo(PyObject*);
#endif
diff --git a/source/gameengine/GameLogic/SCA_ISensor.cpp b/source/gameengine/GameLogic/SCA_ISensor.cpp
index fada69848b2..c655924aa48 100644
--- a/source/gameengine/GameLogic/SCA_ISensor.cpp
+++ b/source/gameengine/GameLogic/SCA_ISensor.cpp
@@ -300,7 +300,7 @@ void SCA_ISensor::Activate(class SCA_LogicManager* logicmgr)
}
}
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
/* ----------------------------------------------- */
/* Python Functions */
@@ -427,6 +427,6 @@ int SCA_ISensor::pyattr_check_tap(void *self_v, const KX_PYATTRIBUTE_DEF *attrde
self->m_level = false;
return 0;
}
-#endif // DISABLE_PYTHON
+#endif // WITH_PYTHON
/* eof */
diff --git a/source/gameengine/GameLogic/SCA_ISensor.h b/source/gameengine/GameLogic/SCA_ISensor.h
index 2d3a3ef08a0..f31dd83343b 100644
--- a/source/gameengine/GameLogic/SCA_ISensor.h
+++ b/source/gameengine/GameLogic/SCA_ISensor.h
@@ -190,7 +190,7 @@ public:
bool IsNoLink() const
{ return !m_links; }
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
/* Python functions: */
KX_PYMETHOD_DOC_NOARGS(SCA_ISensor,reset);
@@ -210,7 +210,7 @@ public:
KX_SENSOR_JUST_DEACTIVATED
};
-#endif // DISABLE_PYTHON
+#endif // WITH_PYTHON
};
#endif //__SCA_ISENSOR
diff --git a/source/gameengine/GameLogic/SCA_JoystickSensor.cpp b/source/gameengine/GameLogic/SCA_JoystickSensor.cpp
index 29a6a73b865..a68938ec834 100644
--- a/source/gameengine/GameLogic/SCA_JoystickSensor.cpp
+++ b/source/gameengine/GameLogic/SCA_JoystickSensor.cpp
@@ -241,7 +241,7 @@ bool SCA_JoystickSensor::isValid(SCA_JoystickSensor::KX_JOYSENSORMODE m)
return res;
}
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
/* ------------------------------------------------------------------------- */
/* Python functions */
diff --git a/source/gameengine/GameLogic/SCA_JoystickSensor.h b/source/gameengine/GameLogic/SCA_JoystickSensor.h
index 90fb16de747..39f826dfe02 100644
--- a/source/gameengine/GameLogic/SCA_JoystickSensor.h
+++ b/source/gameengine/GameLogic/SCA_JoystickSensor.h
@@ -117,7 +117,7 @@ public:
return m_joyindex;
}
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
@@ -157,7 +157,7 @@ public:
return 0;
}
-#endif // DISABLE_PYTHON
+#endif // WITH_PYTHON
};
diff --git a/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp b/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
index 1a87528e540..fe4124eb833 100644
--- a/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
+++ b/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
@@ -408,7 +408,7 @@ void SCA_KeyboardSensor::LogKeystrokes(void)
}
}
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
/* ------------------------------------------------------------------------- */
/* Python Functions */
@@ -501,7 +501,7 @@ PyObject* SCA_KeyboardSensor::pyattr_get_events(void *self_v, const KX_PYATTRIBU
return resultlist;
}
-#endif // DISABLE_PYTHON
+#endif // WITH_PYTHON
/* Accessed from python */
diff --git a/source/gameengine/GameLogic/SCA_KeyboardSensor.h b/source/gameengine/GameLogic/SCA_KeyboardSensor.h
index 5ca329b0846..0a3b25ac361 100644
--- a/source/gameengine/GameLogic/SCA_KeyboardSensor.h
+++ b/source/gameengine/GameLogic/SCA_KeyboardSensor.h
@@ -103,7 +103,7 @@ public:
virtual bool IsPositiveTrigger();
bool TriggerOnAllKeys();
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
diff --git a/source/gameengine/GameLogic/SCA_LogicManager.cpp b/source/gameengine/GameLogic/SCA_LogicManager.cpp
index d003c5618f1..ab06fe7f9ef 100644
--- a/source/gameengine/GameLogic/SCA_LogicManager.cpp
+++ b/source/gameengine/GameLogic/SCA_LogicManager.cpp
@@ -307,7 +307,7 @@ void SCA_LogicManager::AddTriggeredController(SCA_IController* controller, SCA_I
{
controller->Activate(m_triggeredControllerSet);
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
// so that the controller knows which sensor has activited it
// only needed for python controller
diff --git a/source/gameengine/GameLogic/SCA_MouseSensor.cpp b/source/gameengine/GameLogic/SCA_MouseSensor.cpp
index 9f4b25986b0..af11353c93e 100644
--- a/source/gameengine/GameLogic/SCA_MouseSensor.cpp
+++ b/source/gameengine/GameLogic/SCA_MouseSensor.cpp
@@ -232,7 +232,7 @@ bool SCA_MouseSensor::isValid(SCA_MouseSensor::KX_MOUSESENSORMODE m)
return ((m > KX_MOUSESENSORMODE_NODEF) && (m < KX_MOUSESENSORMODE_MAX));
}
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
/* ------------------------------------------------------------------------- */
/* Python functions */
@@ -305,6 +305,6 @@ PyAttributeDef SCA_MouseSensor::Attributes[] = {
{ NULL } //Sentinel
};
-#endif // DISABLE_PYTHON
+#endif // WITH_PYTHON
/* eof */
diff --git a/source/gameengine/GameLogic/SCA_MouseSensor.h b/source/gameengine/GameLogic/SCA_MouseSensor.h
index f52b57a3e11..dc0e9a11d39 100644
--- a/source/gameengine/GameLogic/SCA_MouseSensor.h
+++ b/source/gameengine/GameLogic/SCA_MouseSensor.h
@@ -104,7 +104,7 @@ class SCA_MouseSensor : public SCA_ISensor
static void UpdateHotkey(void *self);
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
diff --git a/source/gameengine/GameLogic/SCA_NANDController.cpp b/source/gameengine/GameLogic/SCA_NANDController.cpp
index c09a53d8ac7..bcb2c84a083 100644
--- a/source/gameengine/GameLogic/SCA_NANDController.cpp
+++ b/source/gameengine/GameLogic/SCA_NANDController.cpp
@@ -87,7 +87,7 @@ CValue* SCA_NANDController::GetReplica()
return replica;
}
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
/* ------------------------------------------------------------------------- */
/* Python functions */
diff --git a/source/gameengine/GameLogic/SCA_NORController.cpp b/source/gameengine/GameLogic/SCA_NORController.cpp
index 8ebd79efcfa..5711fb5751b 100644
--- a/source/gameengine/GameLogic/SCA_NORController.cpp
+++ b/source/gameengine/GameLogic/SCA_NORController.cpp
@@ -87,7 +87,7 @@ CValue* SCA_NORController::GetReplica()
return replica;
}
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
/* ------------------------------------------------------------------------- */
/* Python functions */
@@ -124,6 +124,6 @@ PyAttributeDef SCA_NORController::Attributes[] = {
{ NULL } //Sentinel
};
-#endif // DISABLE_PYTHON
+#endif // WITH_PYTHON
/* eof */
diff --git a/source/gameengine/GameLogic/SCA_ORController.cpp b/source/gameengine/GameLogic/SCA_ORController.cpp
index a638147e211..72c368d632f 100644
--- a/source/gameengine/GameLogic/SCA_ORController.cpp
+++ b/source/gameengine/GameLogic/SCA_ORController.cpp
@@ -83,7 +83,7 @@ void SCA_ORController::Trigger(SCA_LogicManager* logicmgr)
}
}
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
/* ------------------------------------------------------------------------- */
/* Python functions */
@@ -120,6 +120,6 @@ PyAttributeDef SCA_ORController::Attributes[] = {
{ NULL } //Sentinel
};
-#endif // DISABLE_PYTHON
+#endif // WITH_PYTHON
/* eof */
diff --git a/source/gameengine/GameLogic/SCA_PropertyActuator.cpp b/source/gameengine/GameLogic/SCA_PropertyActuator.cpp
index c1b49d32712..a5ac5654e21 100644
--- a/source/gameengine/GameLogic/SCA_PropertyActuator.cpp
+++ b/source/gameengine/GameLogic/SCA_PropertyActuator.cpp
@@ -217,7 +217,7 @@ void SCA_PropertyActuator::Relink(GEN_Map<GEN_HashedPtr, void*> *obj_map)
}
}
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
/* ------------------------------------------------------------------------- */
/* Python functions */
diff --git a/source/gameengine/GameLogic/SCA_PropertySensor.cpp b/source/gameengine/GameLogic/SCA_PropertySensor.cpp
index be86b976a70..a32cc50fd63 100644
--- a/source/gameengine/GameLogic/SCA_PropertySensor.cpp
+++ b/source/gameengine/GameLogic/SCA_PropertySensor.cpp
@@ -304,7 +304,7 @@ CValue* SCA_PropertySensor::FindIdentifier(const STR_String& identifiername)
return GetParent()->FindIdentifier(identifiername);
}
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
/* ------------------------------------------------------------------------- */
/* Python functions */
@@ -378,6 +378,6 @@ PyAttributeDef SCA_PropertySensor::Attributes[] = {
{ NULL } //Sentinel
};
-#endif // DISABLE_PYTHON
+#endif // WITH_PYTHON
/* eof */
diff --git a/source/gameengine/GameLogic/SCA_PropertySensor.h b/source/gameengine/GameLogic/SCA_PropertySensor.h
index 9a5c4762558..5a29c526fc0 100644
--- a/source/gameengine/GameLogic/SCA_PropertySensor.h
+++ b/source/gameengine/GameLogic/SCA_PropertySensor.h
@@ -84,7 +84,7 @@ public:
virtual bool IsPositiveTrigger();
virtual CValue* FindIdentifier(const STR_String& identifiername);
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
diff --git a/source/gameengine/GameLogic/SCA_PythonController.cpp b/source/gameengine/GameLogic/SCA_PythonController.cpp
index 45f0684c02f..109b199f230 100644
--- a/source/gameengine/GameLogic/SCA_PythonController.cpp
+++ b/source/gameengine/GameLogic/SCA_PythonController.cpp
@@ -35,10 +35,10 @@
#include "SCA_IActuator.h"
#include "PyObjectPlus.h"
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
#include "compile.h"
#include "eval.h"
-#endif // DISABLE_PYTHON
+#endif // WITH_PYTHON
#include <algorithm>
@@ -49,7 +49,7 @@ SCA_PythonController* SCA_PythonController::m_sCurrentController = NULL;
SCA_PythonController::SCA_PythonController(SCA_IObject* gameobj, int mode)
: SCA_IController(gameobj),
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
m_bytecode(NULL),
m_function(NULL),
#endif
@@ -57,7 +57,7 @@ SCA_PythonController::SCA_PythonController(SCA_IObject* gameobj, int mode)
m_bModified(true),
m_debug(false),
m_mode(mode)
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
, m_pythondictionary(NULL)
#endif
@@ -84,7 +84,7 @@ int SCA_PythonController::Release()
SCA_PythonController::~SCA_PythonController()
{
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
//printf("released python byte script\n");
Py_XDECREF(m_bytecode);
@@ -104,7 +104,7 @@ CValue* SCA_PythonController::GetReplica()
{
SCA_PythonController* replica = new SCA_PythonController(*this);
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
/* why is this needed at all??? - m_bytecode is NULL'd below so this doesnt make sense
* but removing it crashes blender (with YoFrankie). so leave in for now - Campbell */
Py_XINCREF(replica->m_bytecode);
@@ -146,7 +146,7 @@ void SCA_PythonController::SetScriptName(const STR_String& name)
}
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
void SCA_PythonController::SetNamespace(PyObject* pythondictionary)
{
if (m_pythondictionary)
@@ -171,7 +171,7 @@ int SCA_PythonController::IsTriggered(class SCA_ISensor* sensor)
return 0;
}
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
/* warning, self is not the SCA_PythonController, its a PyObjectPlus_Proxy */
PyObject* SCA_PythonController::sPyGetCurrentController(PyObject *self)
@@ -527,13 +527,13 @@ int SCA_PythonController::pyattr_set_script(void *self_v, const KX_PYATTRIBUTE_D
return PY_SET_ATTR_SUCCESS;
}
-#else // DISABLE_PYTHON
+#else // WITH_PYTHON
void SCA_PythonController::Trigger(SCA_LogicManager* logicmgr)
{
/* intentionally blank */
}
-#endif // DISABLE_PYTHON
+#endif // WITH_PYTHON
/* eof */
diff --git a/source/gameengine/GameLogic/SCA_PythonController.h b/source/gameengine/GameLogic/SCA_PythonController.h
index bd78014038c..602b5e27e47 100644
--- a/source/gameengine/GameLogic/SCA_PythonController.h
+++ b/source/gameengine/GameLogic/SCA_PythonController.h
@@ -42,7 +42,7 @@ class SCA_IObject;
class SCA_PythonController : public SCA_IController
{
Py_Header;
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
struct _object * m_bytecode; /* SCA_PYEXEC_SCRIPT only */
PyObject* m_function; /* SCA_PYEXEC_MODULE only */
#endif
@@ -55,7 +55,7 @@ class SCA_PythonController : public SCA_IController
protected:
STR_String m_scriptText;
STR_String m_scriptName;
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
PyObject* m_pythondictionary; /* for SCA_PYEXEC_SCRIPT only */
PyObject* m_pythonfunction; /* for SCA_PYEXEC_MODULE only */
#endif
@@ -83,7 +83,7 @@ class SCA_PythonController : public SCA_IController
void SetScriptText(const STR_String& text);
void SetScriptName(const STR_String& name);
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
void SetNamespace(PyObject* pythondictionary);
#endif
void SetDebug(bool debug) { m_debug = debug; }
@@ -94,7 +94,7 @@ class SCA_PythonController : public SCA_IController
bool Import();
void ErrorPrint(const char *error_msg);
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
static const char* sPyGetCurrentController__doc__;
static PyObject* sPyGetCurrentController(PyObject* self);
static const char* sPyAddActiveActuator__doc__;
diff --git a/source/gameengine/GameLogic/SCA_PythonKeyboard.cpp b/source/gameengine/GameLogic/SCA_PythonKeyboard.cpp
index 3d5d3568335..213446935b6 100644
--- a/source/gameengine/GameLogic/SCA_PythonKeyboard.cpp
+++ b/source/gameengine/GameLogic/SCA_PythonKeyboard.cpp
@@ -33,20 +33,20 @@ SCA_PythonKeyboard::SCA_PythonKeyboard(SCA_IInputDevice* keyboard)
: PyObjectPlus(),
m_keyboard(keyboard)
{
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
m_event_dict = PyDict_New();
#endif
}
SCA_PythonKeyboard::~SCA_PythonKeyboard()
{
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
PyDict_Clear(m_event_dict);
Py_DECREF(m_event_dict);
#endif
}
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
/* ------------------------------------------------------------------------- */
/* Python functions */
diff --git a/source/gameengine/GameLogic/SCA_PythonKeyboard.h b/source/gameengine/GameLogic/SCA_PythonKeyboard.h
index 260835155e6..6a89ba7de76 100644
--- a/source/gameengine/GameLogic/SCA_PythonKeyboard.h
+++ b/source/gameengine/GameLogic/SCA_PythonKeyboard.h
@@ -32,14 +32,14 @@ class SCA_PythonKeyboard : public PyObjectPlus
Py_Header;
private:
class SCA_IInputDevice *m_keyboard;
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
PyObject* m_event_dict;
#endif
public:
SCA_PythonKeyboard(class SCA_IInputDevice* keyboard);
virtual ~SCA_PythonKeyboard();
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
static PyObject* pyattr_get_events(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
#endif
};
diff --git a/source/gameengine/GameLogic/SCA_PythonMouse.cpp b/source/gameengine/GameLogic/SCA_PythonMouse.cpp
index 936ee2ff5c4..7267eb74594 100644
--- a/source/gameengine/GameLogic/SCA_PythonMouse.cpp
+++ b/source/gameengine/GameLogic/SCA_PythonMouse.cpp
@@ -35,20 +35,20 @@ SCA_PythonMouse::SCA_PythonMouse(SCA_IInputDevice* mouse, RAS_ICanvas* canvas)
m_mouse(mouse),
m_canvas(canvas)
{
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
m_event_dict = PyDict_New();
#endif
}
SCA_PythonMouse::~SCA_PythonMouse()
{
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
PyDict_Clear(m_event_dict);
Py_DECREF(m_event_dict);
#endif
}
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
/* ------------------------------------------------------------------------- */
/* Python functions */
diff --git a/source/gameengine/GameLogic/SCA_PythonMouse.h b/source/gameengine/GameLogic/SCA_PythonMouse.h
index 9e1085e6bec..15a7e19c602 100644
--- a/source/gameengine/GameLogic/SCA_PythonMouse.h
+++ b/source/gameengine/GameLogic/SCA_PythonMouse.h
@@ -33,7 +33,7 @@ class SCA_PythonMouse : public PyObjectPlus
private:
class SCA_IInputDevice *m_mouse;
class RAS_ICanvas *m_canvas;
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
PyObject* m_event_dict;
#endif
public:
@@ -42,7 +42,7 @@ public:
void Show(bool visible);
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
KX_PYMETHOD_DOC(SCA_PythonMouse, show);
static PyObject* pyattr_get_events(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
diff --git a/source/gameengine/GameLogic/SCA_RandomActuator.cpp b/source/gameengine/GameLogic/SCA_RandomActuator.cpp
index 4b90ca7dadf..c3d5988be24 100644
--- a/source/gameengine/GameLogic/SCA_RandomActuator.cpp
+++ b/source/gameengine/GameLogic/SCA_RandomActuator.cpp
@@ -305,7 +305,7 @@ void SCA_RandomActuator::enforceConstraints() {
}
}
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
/* ------------------------------------------------------------------------- */
/* Python functions */
diff --git a/source/gameengine/GameLogic/SCA_RandomActuator.h b/source/gameengine/GameLogic/SCA_RandomActuator.h
index 41d19f5b4c4..1fd2180f32c 100644
--- a/source/gameengine/GameLogic/SCA_RandomActuator.h
+++ b/source/gameengine/GameLogic/SCA_RandomActuator.h
@@ -92,7 +92,7 @@ class SCA_RandomActuator : public SCA_IActuator
virtual CValue* GetReplica();
virtual void ProcessReplica();
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
@@ -112,7 +112,7 @@ class SCA_RandomActuator : public SCA_IActuator
KX_PYMETHOD_DOC_VARARGS(SCA_RandomActuator, setFloatNormal);
KX_PYMETHOD_DOC_VARARGS(SCA_RandomActuator, setFloatNegativeExponential);
-#endif // DISABLE_PYTHON
+#endif // WITH_PYTHON
}; /* end of class KX_EditObjectActuator : public SCA_PropertyActuator */
diff --git a/source/gameengine/GameLogic/SCA_RandomSensor.cpp b/source/gameengine/GameLogic/SCA_RandomSensor.cpp
index a7d18ff40d4..8194f1c97c8 100644
--- a/source/gameengine/GameLogic/SCA_RandomSensor.cpp
+++ b/source/gameengine/GameLogic/SCA_RandomSensor.cpp
@@ -120,7 +120,7 @@ bool SCA_RandomSensor::Evaluate()
return evaluateResult;
}
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
/* ------------------------------------------------------------------------- */
/* Python functions */
@@ -176,6 +176,6 @@ int SCA_RandomSensor::pyattr_set_seed(void *self_v, const KX_PYATTRIBUTE_DEF *at
return PY_SET_ATTR_SUCCESS;
}
-#endif // DISABLE_PYTHON
+#endif // WITH_PYTHON
/* eof */
diff --git a/source/gameengine/GameLogic/SCA_RandomSensor.h b/source/gameengine/GameLogic/SCA_RandomSensor.h
index 3be17943d84..af5a767c1c1 100644
--- a/source/gameengine/GameLogic/SCA_RandomSensor.h
+++ b/source/gameengine/GameLogic/SCA_RandomSensor.h
@@ -56,7 +56,7 @@ public:
virtual bool IsPositiveTrigger();
virtual void Init();
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
diff --git a/source/gameengine/GameLogic/SCA_XNORController.cpp b/source/gameengine/GameLogic/SCA_XNORController.cpp
index 9f54e41d110..f1f76c83718 100644
--- a/source/gameengine/GameLogic/SCA_XNORController.cpp
+++ b/source/gameengine/GameLogic/SCA_XNORController.cpp
@@ -91,7 +91,7 @@ CValue* SCA_XNORController::GetReplica()
return replica;
}
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
/* ------------------------------------------------------------------------- */
/* Python functions */
@@ -128,6 +128,6 @@ PyAttributeDef SCA_XNORController::Attributes[] = {
{ NULL } //Sentinel
};
-#endif // DISABLE_PYTHON
+#endif // WITH_PYTHON
/* eof */
diff --git a/source/gameengine/GameLogic/SCA_XORController.cpp b/source/gameengine/GameLogic/SCA_XORController.cpp
index a58f30a3bed..ee63b72e455 100644
--- a/source/gameengine/GameLogic/SCA_XORController.cpp
+++ b/source/gameengine/GameLogic/SCA_XORController.cpp
@@ -91,7 +91,7 @@ CValue* SCA_XORController::GetReplica()
return replica;
}
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
/* ------------------------------------------------------------------------- */
/* Python functions */
@@ -127,6 +127,6 @@ PyMethodDef SCA_XORController::Methods[] = {
PyAttributeDef SCA_XORController::Attributes[] = {
{ NULL } //Sentinel
};
-#endif // DISABLE_PYTHON
+#endif // WITH_PYTHON
/* eof */
diff --git a/source/gameengine/GameLogic/SConscript b/source/gameengine/GameLogic/SConscript
index c9d1fed875d..04990e10d06 100644
--- a/source/gameengine/GameLogic/SConscript
+++ b/source/gameengine/GameLogic/SConscript
@@ -16,8 +16,7 @@ else:
if env['WITH_BF_PYTHON']:
incs += ' ' + env['BF_PYTHON_INC']
-else:
- defs.append('DISABLE_PYTHON')
+ defs.append('WITH_PYTHON')
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
if env['BF_DEBUG']: