Changeset View
Changeset View
Standalone View
Standalone View
source/gameengine/Ketsji/KX_PythonInit.cpp
| Context not available. | |||||
| # include "mathutils.h" // 'mathutils' module copied here so the blenderlayer can use. | # include "mathutils.h" // 'mathutils' module copied here so the blenderlayer can use. | ||||
| # include "bgl.h" | # include "bgl.h" | ||||
| # include "blf_py_api.h" | # include "blf_py_api.h" | ||||
| # include "BKE_blender.h" /* BLENDER_VERSION, BLENDER_SUBVERSION */ | |||||
| # include "marshal.h" /* python header for loading/saving dicts */ | # include "marshal.h" /* python header for loading/saving dicts */ | ||||
| } | } | ||||
| Context not available. | |||||
| return gp_KetsjiEngine->GetPyProfileDict(); | return gp_KetsjiEngine->GetPyProfileDict(); | ||||
| } | } | ||||
| PyDoc_STRVAR(gPyGetBlenderVersion_doc, | |||||
| "getBlenderVersion()\n" | |||||
| "Gets Blender's version as a tuple of format (major, minor[, subversion])" | |||||
| ); | |||||
| static PyObject *gPyGetBlenderVersion(PyObject *) | |||||
| { | |||||
| if (BLENDER_SUBVERSION) | |||||
| return Py_BuildValue("(iii)", BLENDER_VERSION / 100, BLENDER_VERSION % 100, BLENDER_SUBVERSION); | |||||
| else | |||||
| return Py_BuildValue("(ii)", BLENDER_VERSION / 100, BLENDER_VERSION % 100); | |||||
| } | |||||
| PyDoc_STRVAR(gPySendMessage_doc, | PyDoc_STRVAR(gPySendMessage_doc, | ||||
| "sendMessage(subject, [body, to, from])\n" | "sendMessage(subject, [body, to, from])\n" | ||||
| "sends a message in same manner as a message actuator" | "sends a message in same manner as a message actuator" | ||||
| Context not available. | |||||
| {"PrintMemInfo", (PyCFunction)pyPrintStats, METH_NOARGS, (const char *)"Print engine statistics"}, | {"PrintMemInfo", (PyCFunction)pyPrintStats, METH_NOARGS, (const char *)"Print engine statistics"}, | ||||
| {"NextFrame", (PyCFunction)gPyNextFrame, METH_NOARGS, (const char *)"Render next frame (if Python has control)"}, | {"NextFrame", (PyCFunction)gPyNextFrame, METH_NOARGS, (const char *)"Render next frame (if Python has control)"}, | ||||
| {"getProfileInfo", (PyCFunction)gPyGetProfileInfo, METH_NOARGS, gPyGetProfileInfo_doc}, | {"getProfileInfo", (PyCFunction)gPyGetProfileInfo, METH_NOARGS, gPyGetProfileInfo_doc}, | ||||
| {"getBlenderVersion", (PyCFunction)gPyGetBlenderVersion, METH_NOARGS, gPyGetBlenderVersion_doc}, | |||||
| /* library functions */ | /* library functions */ | ||||
| {"LibLoad", (PyCFunction)gLibLoad, METH_VARARGS|METH_KEYWORDS, (const char *)""}, | {"LibLoad", (PyCFunction)gLibLoad, METH_VARARGS|METH_KEYWORDS, (const char *)""}, | ||||
| {"LibNew", (PyCFunction)gLibNew, METH_VARARGS, (const char *)""}, | {"LibNew", (PyCFunction)gLibNew, METH_VARARGS, (const char *)""}, | ||||
| Context not available. | |||||
campbellbarton: these lines changed in master. (trivial to update) | |||||
Not Done Inline Actionssuggest has_ prefix for compile time options. campbellbarton: suggest `has_` prefix for compile time options. | |||||
Not Done Inline Actionsshould be "bpy.app" campbellbarton: should be "bpy.app" | |||||
Not Done Inline ActionsNo, "bge.app". ;-) Matpi: No, "bge.app". ;-) | |||||
Not Done Inline ActionsThis is left over from old days where we could do import GameLogic This line allows for import Application But I think we should only have access via bpy.app campbellbarton: This is left over from old days where we could do `import GameLogic`
This line allows for… | |||||
Not Done Inline ActionsDidn't know this was not meant to be kept as a feature. Will update. Matpi: Didn't know this was not meant to be kept as a feature. Will update. | |||||
Not Done Inline Actionsstyle. campbellbarton: style. | |||||
Not Done Inline ActionsSorry, don't get what's wrong with it? Matpi: Sorry, don't get what's wrong with it? | |||||
Not Done Inline ActionsThis still needs updating to match master. campbellbarton: This still needs updating to match master. | |||||
Not Done Inline ActionsWill be done, sorry. Matpi: Will be done, sorry. | |||||
these lines changed in master. (trivial to update)