Support for building without Python
This commit is contained in:
parent
c40cc0bf6d
commit
10af70cef8
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "IntValue.h"
|
||||
#include "ErrorValue.h"
|
||||
#include "FloatValue.h"
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
* \ingroup ketsji
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "KX_ObjectActuator.h"
|
||||
#include "KX_GameObject.h"
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "GL/glew.h"
|
||||
|
||||
#include "RAS_OpenGLLight.h"
|
||||
|
|
Loading…
Reference in New Issue