diff options
author | Arystanbek Dyussenov <arystan.d@gmail.com> | 2009-09-15 22:01:18 +0400 |
---|---|---|
committer | Arystanbek Dyussenov <arystan.d@gmail.com> | 2009-09-15 22:01:18 +0400 |
commit | 816377cc02fe5dd4be945c0f3d415861114b4980 (patch) | |
tree | 306e9d1363aa66bc919e43b80b3380fab9f60ea9 /source/gameengine/Ketsji/KX_StateActuator.cpp | |
parent | c8af263e5d8d9d41a757e8438cdcf3b64d57e0c0 (diff) | |
parent | ee768ada680ce0a8aa184c882005c0ef1c0140fb (diff) |
Undo revision 23130 which was a merge with 2.5, a messy one because I did something wrong (`svn status` output: http://www.pasteall.org/7887).soc-2009-kazanbas
The command: svn merge -r 23130:23129 https://svn.blender.org/svnroot/bf-blender/branches/soc-2009-kazanbas
Diffstat (limited to 'source/gameengine/Ketsji/KX_StateActuator.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_StateActuator.cpp | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/KX_StateActuator.cpp b/source/gameengine/Ketsji/KX_StateActuator.cpp index 4159e9c373d..09d95612cbb 100644 --- a/source/gameengine/Ketsji/KX_StateActuator.cpp +++ b/source/gameengine/Ketsji/KX_StateActuator.cpp @@ -159,6 +159,12 @@ PyTypeObject KX_StateActuator::Type = { }; PyMethodDef KX_StateActuator::Methods[] = { + // deprecated --> + {"setOperation", (PyCFunction) KX_StateActuator::sPySetOperation, + METH_VARARGS, (const char *)SetOperation_doc}, + {"setMask", (PyCFunction) KX_StateActuator::sPySetMask, + METH_VARARGS, (const char *)SetMask_doc}, + // <-- {NULL,NULL} //Sentinel }; @@ -167,3 +173,52 @@ PyAttributeDef KX_StateActuator::Attributes[] = { KX_PYATTRIBUTE_INT_RW("mask",0,0x3FFFFFFF,false,KX_StateActuator,m_mask), { NULL } //Sentinel }; + + +/* set operation ---------------------------------------------------------- */ +const char +KX_StateActuator::SetOperation_doc[] = +"setOperation(op)\n" +"\t - op : bit operation (0=Copy, 1=Set, 2=Clear, 3=Negate)" +"\tSet the type of bit operation to be applied on object state mask.\n" +"\tUse setMask() to specify the bits that will be modified.\n"; +PyObject* + +KX_StateActuator::PySetOperation(PyObject* args) { + ShowDeprecationWarning("setOperation()", "the operation property"); + int oper; + + if(!PyArg_ParseTuple(args, "i:setOperation", &oper)) { + return NULL; + } + + m_operation = oper; + + Py_RETURN_NONE; +} + +/* set mask ---------------------------------------------------------- */ +const char +KX_StateActuator::SetMask_doc[] = +"setMask(mask)\n" +"\t - mask : bits that will be modified" +"\tSet the value that defines the bits that will be modified by the operation.\n" +"\tThe bits that are 1 in the value will be updated in the object state,\n" +"\tthe bits that are 0 are will be left unmodified expect for the Copy operation\n" +"\twhich copies the value to the object state.\n"; +PyObject* + +KX_StateActuator::PySetMask(PyObject* args) { + ShowDeprecationWarning("setMask()", "the mask property"); + int mask; + + if(!PyArg_ParseTuple(args, "i:setMask", &mask)) { + return NULL; + } + + m_mask = mask; + + Py_RETURN_NONE; +} + + |