Skip to content

Commit

Permalink
UPBGE: Fix compilation without python.
Browse files Browse the repository at this point in the history
  • Loading branch information
panzergame committed Dec 19, 2016
1 parent 86adc3c commit d63c4d1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions source/gameengine/Converter/BL_BlenderDataConversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1212,6 +1212,7 @@ static KX_GameObject* getGameOb(STR_String busc,CListValue* sumolist)

static void BL_ConvertComponentsObject(KX_GameObject *gameobj, Object *blenderobj)
{
#ifdef WITH_PYTHON
PythonComponent *pc = (PythonComponent *)blenderobj->components.first;
PyObject *arg_dict = NULL, *args = NULL, *mod = NULL, *cls = NULL, *pycomp = NULL, *ret = NULL;

Expand Down Expand Up @@ -1286,6 +1287,7 @@ static void BL_ConvertComponentsObject(KX_GameObject *gameobj, Object *blenderob
Py_XDECREF(pycomp);

gameobj->SetComponents(components);
#endif // WITH_PYTHON
}

/* helper for BL_ConvertBlenderObjects, avoids code duplication
Expand Down
2 changes: 2 additions & 0 deletions source/gameengine/Ketsji/KX_BlenderMaterial.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ class KX_BlenderMaterial : public CValue, public RAS_IPolyMaterial
void OnExit();
};

#ifdef WITH_PYTHON
bool ConvertPythonToMaterial(PyObject *value, KX_BlenderMaterial **material, bool py_none_ok, const char *error_prefix);
#endif // WITH_PYTHON

#endif
4 changes: 3 additions & 1 deletion source/gameengine/Ketsji/KX_KetsjiEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -398,9 +398,11 @@ bool KX_KetsjiEngine::NextFrame()
// Handle all SDL Joystick events here to share them for all scenes properly.
short addrem[JOYINDEX_MAX] = {0};
if (DEV_Joystick::HandleEvents(addrem)) {
# ifdef WITH_PYTHON
updatePythonJoysticks(addrem);
# endif // WITH_PYTHON
}
#endif
#endif // WITH_SDL

// for each scene, call the proceed functions
for (CListValue::iterator<KX_Scene> sceit = m_scenes->GetBegin(), sceend = m_scenes->GetEnd(); sceit != sceend; ++sceit) {
Expand Down

0 comments on commit d63c4d1

Please sign in to comment.