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:
authorBenoit Bolsee <benoit.bolsee@online.be>2009-03-28 01:11:30 +0300
committerBenoit Bolsee <benoit.bolsee@online.be>2009-03-28 01:11:30 +0300
commitafec4049626690e91e75dc88f3b9097a21f9c168 (patch)
tree1198f566b4524a5970c3767abeac8d3fe2c73b15 /source/gameengine/Ketsji/KX_GameActuator.cpp
parent059c2a10c4df53a7cd96689e8a60be2afd4b4d46 (diff)
BGE API Cleanup: GameActuator (patch from Andre)
Diffstat (limited to 'source/gameengine/Ketsji/KX_GameActuator.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_GameActuator.cpp35
1 files changed, 26 insertions, 9 deletions
diff --git a/source/gameengine/Ketsji/KX_GameActuator.cpp b/source/gameengine/Ketsji/KX_GameActuator.cpp
index 3c0695b5952..6799ac7269c 100644
--- a/source/gameengine/Ketsji/KX_GameActuator.cpp
+++ b/source/gameengine/Ketsji/KX_GameActuator.cpp
@@ -241,21 +241,44 @@ PyParentObject KX_GameActuator::Parents[] =
PyMethodDef KX_GameActuator::Methods[] =
{
+ // Deprecated ----->
{"getFile", (PyCFunction) KX_GameActuator::sPyGetFile, METH_VARARGS, (PY_METHODCHAR)GetFile_doc},
{"setFile", (PyCFunction) KX_GameActuator::sPySetFile, METH_VARARGS, (PY_METHODCHAR)SetFile_doc},
+ // <-----
{NULL,NULL} //Sentinel
};
PyAttributeDef KX_GameActuator::Attributes[] = {
+ KX_PYATTRIBUTE_STRING_RW("file",0,100,false,KX_GameActuator,m_filename),
{ NULL } //Sentinel
};
+PyObject*
+KX_GameActuator::_getattr(const char *attr)
+{
+ PyObject* object = _getattr_self(Attributes, this, attr);
+ if (object != NULL)
+ return object;
+ _getattr_up(SCA_IActuator);
+}
+
+int KX_GameActuator::_setattr(const char *attr, PyObject *value)
+{
+ int ret = _setattr_self(Attributes, this, attr, value);
+ if (ret >= 0)
+ return ret;
+ return SCA_IActuator::_setattr(attr, value);
+}
+
+
+// Deprecated ----->
/* getFile */
const char KX_GameActuator::GetFile_doc[] =
"getFile()\n"
"get the name of the file to start.\n";
PyObject* KX_GameActuator::PyGetFile(PyObject* self, PyObject* args, PyObject* kwds)
{
+ ShowDeprecationWarning("getFile()", "the file property");
return PyString_FromString(m_filename);
}
@@ -266,6 +289,8 @@ const char KX_GameActuator::SetFile_doc[] =
PyObject* KX_GameActuator::PySetFile(PyObject* self, PyObject* args, PyObject* kwds)
{
char* new_file;
+
+ ShowDeprecationWarning("setFile()", "the file property");
if (!PyArg_ParseTuple(args, "s", &new_file))
{
@@ -277,12 +302,4 @@ PyObject* KX_GameActuator::PySetFile(PyObject* self, PyObject* args, PyObject* k
Py_RETURN_NONE;
}
-
-
-
-PyObject* KX_GameActuator::_getattr(const char *attr)
-{
- _getattr_up(SCA_IActuator);
-}
-
-
+// <-----