diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-04-20 19:06:46 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-04-20 19:06:46 +0400 |
commit | 874c29cea8e6f9bc411fccf2d6f4cb07e94328d0 (patch) | |
tree | 5971e577cf7c02e05a1e37b5ad058c71a6744877 /source/gameengine/Ketsji/KX_StateActuator.cpp | |
parent | 7555bfa793a2b0fc187c6211c56986f35b2d7b09 (diff) | |
parent | c5bc4e4fb1a33eda8c31f2ea02e91f32f74c8fa5 (diff) |
2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r19323:HEAD
Notes:
* blenderbuttons and ICON_SNAP_PEEL_OBJECT were not merged.
Diffstat (limited to 'source/gameengine/Ketsji/KX_StateActuator.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_StateActuator.cpp | 47 |
1 files changed, 26 insertions, 21 deletions
diff --git a/source/gameengine/Ketsji/KX_StateActuator.cpp b/source/gameengine/Ketsji/KX_StateActuator.cpp index 0de4da79bd8..976e7ea5204 100644 --- a/source/gameengine/Ketsji/KX_StateActuator.cpp +++ b/source/gameengine/Ketsji/KX_StateActuator.cpp @@ -108,24 +108,23 @@ KX_StateActuator::Update() /* Integration hooks ------------------------------------------------------- */ -PyTypeObject -KX_StateActuator::Type = { - PyObject_HEAD_INIT(&PyType_Type) +PyTypeObject KX_StateActuator::Type = { + PyObject_HEAD_INIT(NULL) 0, "KX_StateActuator", - sizeof(KX_StateActuator), + sizeof(PyObjectPlus_Proxy), 0, - PyDestructor, + py_base_dealloc, 0, - __getattr, - __setattr, - 0, //&MyPyCompare, - __repr, - 0, //&cvalue_as_number, 0, 0, 0, - 0 + py_base_repr, + 0,0,0,0,0,0, + py_base_getattro, + py_base_setattro, + 0,0,0,0,0,0,0,0,0, + Methods }; PyParentObject @@ -139,22 +138,30 @@ KX_StateActuator::Parents[] = { PyMethodDef KX_StateActuator::Methods[] = { + // deprecated --> {"setOperation", (PyCFunction) KX_StateActuator::sPySetOperation, METH_VARARGS, (PY_METHODCHAR)SetOperation_doc}, {"setMask", (PyCFunction) KX_StateActuator::sPySetMask, METH_VARARGS, (PY_METHODCHAR)SetMask_doc}, + // <-- {NULL,NULL} //Sentinel }; PyAttributeDef KX_StateActuator::Attributes[] = { + KX_PYATTRIBUTE_INT_RW("operation",KX_StateActuator::OP_NOP+1,KX_StateActuator::OP_COUNT-1,false,KX_StateActuator,m_operation), + KX_PYATTRIBUTE_INT_RW("mask",0,0x3FFFFFFF,false,KX_StateActuator,m_mask), { NULL } //Sentinel }; -PyObject* KX_StateActuator::_getattr(const char *attr) +PyObject* KX_StateActuator::py_getattro(PyObject *attr) { - _getattr_up(SCA_IActuator); + py_getattro_up(SCA_IActuator); }; +int KX_StateActuator::py_setattro(PyObject *attr, PyObject* value) +{ + py_setattro_up(SCA_IActuator); +} /* set operation ---------------------------------------------------------- */ @@ -166,12 +173,11 @@ KX_StateActuator::SetOperation_doc[] = "\tUse setMask() to specify the bits that will be modified.\n"; PyObject* -KX_StateActuator::PySetOperation(PyObject* self, - PyObject* args, - PyObject* kwds) { +KX_StateActuator::PySetOperation(PyObject* args) { + ShowDeprecationWarning("setOperation()", "the operation property"); int oper; - if(!PyArg_ParseTuple(args, "i", &oper)) { + if(!PyArg_ParseTuple(args, "i:setOperation", &oper)) { return NULL; } @@ -191,12 +197,11 @@ KX_StateActuator::SetMask_doc[] = "\twhich copies the value to the object state.\n"; PyObject* -KX_StateActuator::PySetMask(PyObject* self, - PyObject* args, - PyObject* kwds) { +KX_StateActuator::PySetMask(PyObject* args) { + ShowDeprecationWarning("setMask()", "the mask property"); int mask; - if(!PyArg_ParseTuple(args, "i", &mask)) { + if(!PyArg_ParseTuple(args, "i:setMask", &mask)) { return NULL; } |