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:
Diffstat (limited to 'source/gameengine/Ketsji/KX_RaySensor.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_RaySensor.cpp53
1 files changed, 14 insertions, 39 deletions
diff --git a/source/gameengine/Ketsji/KX_RaySensor.cpp b/source/gameengine/Ketsji/KX_RaySensor.cpp
index 78a61e9d95e..8616145d709 100644
--- a/source/gameengine/Ketsji/KX_RaySensor.cpp
+++ b/source/gameengine/Ketsji/KX_RaySensor.cpp
@@ -55,9 +55,8 @@ KX_RaySensor::KX_RaySensor(class SCA_EventManager* eventmgr,
bool bXRay,
double distance,
int axis,
- KX_Scene* ketsjiScene,
- PyTypeObject* T)
- : SCA_ISensor(gameobj,eventmgr, T),
+ KX_Scene* ketsjiScene)
+ : SCA_ISensor(gameobj,eventmgr),
m_propertyname(propname),
m_bFindMaterial(bFindMaterial),
m_bXRay(bXRay),
@@ -320,13 +319,7 @@ bool KX_RaySensor::Evaluate()
/* Integration hooks ------------------------------------------------------- */
PyTypeObject KX_RaySensor::Type = {
-#if (PY_VERSION_HEX >= 0x02060000)
PyVarObject_HEAD_INIT(NULL, 0)
-#else
- /* python 2.5 and below */
- PyObject_HEAD_INIT( NULL ) /* required py macro */
- 0, /* ob_size */
-#endif
"KX_RaySensor",
sizeof(PyObjectPlus_Proxy),
0,
@@ -336,28 +329,24 @@ PyTypeObject KX_RaySensor::Type = {
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 KX_RaySensor::Parents[] = {
- &KX_RaySensor::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_ISensor::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
+
};
PyMethodDef KX_RaySensor::Methods[] = {
// Deprecated ----->
- {"getHitObject",(PyCFunction) KX_RaySensor::sPyGetHitObject,METH_NOARGS, (PY_METHODCHAR)GetHitObject_doc},
- {"getHitPosition",(PyCFunction) KX_RaySensor::sPyGetHitPosition,METH_NOARGS, (PY_METHODCHAR)GetHitPosition_doc},
- {"getHitNormal",(PyCFunction) KX_RaySensor::sPyGetHitNormal,METH_NOARGS, (PY_METHODCHAR)GetHitNormal_doc},
- {"getRayDirection",(PyCFunction) KX_RaySensor::sPyGetRayDirection,METH_NOARGS, (PY_METHODCHAR)GetRayDirection_doc},
+ {"getHitObject",(PyCFunction) KX_RaySensor::sPyGetHitObject,METH_NOARGS, (const char *)GetHitObject_doc},
+ {"getHitPosition",(PyCFunction) KX_RaySensor::sPyGetHitPosition,METH_NOARGS, (const char *)GetHitPosition_doc},
+ {"getHitNormal",(PyCFunction) KX_RaySensor::sPyGetHitNormal,METH_NOARGS, (const char *)GetHitNormal_doc},
+ {"getRayDirection",(PyCFunction) KX_RaySensor::sPyGetRayDirection,METH_NOARGS, (const char *)GetRayDirection_doc},
// <-----
{NULL,NULL} //Sentinel
};
@@ -447,18 +436,4 @@ PyObject* KX_RaySensor::PyGetHitNormal()
return retVal;
}
-
-
-PyObject* KX_RaySensor::py_getattro(PyObject *attr) {
- py_getattro_up(SCA_ISensor);
-}
-
-PyObject* KX_RaySensor::py_getattro_dict() {
- py_getattro_dict_up(SCA_ISensor);
-}
-
-int KX_RaySensor::py_setattro(PyObject *attr, PyObject *value) {
- py_setattro_up(SCA_ISensor);
-}
-
// <----- Deprecated