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_ConstraintActuator.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_ConstraintActuator.cpp50
1 files changed, 15 insertions, 35 deletions
diff --git a/source/gameengine/Ketsji/KX_ConstraintActuator.cpp b/source/gameengine/Ketsji/KX_ConstraintActuator.cpp
index bd03dea486b..d09eae647c8 100644
--- a/source/gameengine/Ketsji/KX_ConstraintActuator.cpp
+++ b/source/gameengine/Ketsji/KX_ConstraintActuator.cpp
@@ -54,9 +54,8 @@ KX_ConstraintActuator::KX_ConstraintActuator(SCA_IObject *gameobj,
int locrotxyz,
int time,
int option,
- char *property,
- PyTypeObject* T) :
- SCA_IActuator(gameobj, T),
+ char *property) :
+ SCA_IActuator(gameobj),
m_refDirVector(refDir),
m_currentTime(0)
{
@@ -581,19 +580,15 @@ PyTypeObject KX_ConstraintActuator::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_ConstraintActuator::Parents[] = {
- &KX_ConstraintActuator::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_IActuator::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
PyMethodDef KX_ConstraintActuator::Methods[] = {
@@ -639,21 +634,6 @@ PyAttributeDef KX_ConstraintActuator::Attributes[] = {
{ NULL } //Sentinel
};
-PyObject* KX_ConstraintActuator::py_getattro(PyObject *attr)
-{
- py_getattro_up(SCA_IActuator);
-}
-
-PyObject* KX_ConstraintActuator::py_getattro_dict() {
- py_getattro_dict_up(SCA_IActuator);
-}
-
-int KX_ConstraintActuator::py_setattro(PyObject *attr, PyObject* value)
-{
- py_setattro_up(SCA_IActuator);
-}
-
-
int KX_ConstraintActuator::pyattr_check_direction(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef)
{
KX_ConstraintActuator* act = static_cast<KX_ConstraintActuator*>(self);
@@ -691,7 +671,7 @@ const char KX_ConstraintActuator::GetDamp_doc[] =
"\tReturns the damping parameter.\n";
PyObject* KX_ConstraintActuator::PyGetDamp(){
ShowDeprecationWarning("getDamp()", "the damp property");
- return PyInt_FromLong(m_posDampTime);
+ return PyLong_FromSsize_t(m_posDampTime);
}
/* 2. setRotDamp */
@@ -718,7 +698,7 @@ const char KX_ConstraintActuator::GetRotDamp_doc[] =
"\tReturns the damping time for application of the constraint.\n";
PyObject* KX_ConstraintActuator::PyGetRotDamp(){
ShowDeprecationWarning("getRotDamp()", "the rotDamp property");
- return PyInt_FromLong(m_rotDampTime);
+ return PyLong_FromSsize_t(m_rotDampTime);
}
/* 2. setDirection */
@@ -791,7 +771,7 @@ const char KX_ConstraintActuator::GetOption_doc[] =
"\tReturns the option parameter.\n";
PyObject* KX_ConstraintActuator::PyGetOption(){
ShowDeprecationWarning("getOption()", "the option property");
- return PyInt_FromLong(m_option);
+ return PyLong_FromSsize_t(m_option);
}
/* 2. setTime */
@@ -820,7 +800,7 @@ const char KX_ConstraintActuator::GetTime_doc[] =
"\tReturns the time parameter.\n";
PyObject* KX_ConstraintActuator::PyGetTime(){
ShowDeprecationWarning("getTime()", "the time property");
- return PyInt_FromLong(m_activeTime);
+ return PyLong_FromSsize_t(m_activeTime);
}
/* 2. setProperty */
@@ -849,7 +829,7 @@ const char KX_ConstraintActuator::GetProperty_doc[] =
"\tReturns the property parameter.\n";
PyObject* KX_ConstraintActuator::PyGetProperty(){
ShowDeprecationWarning("getProperty()", "the 'property' property");
- return PyString_FromString(m_property.Ptr());
+ return PyUnicode_FromString(m_property.Ptr());
}
/* 4. setDistance */
@@ -978,7 +958,7 @@ const char KX_ConstraintActuator::GetLimit_doc[] =
"\tReturns the type of constraint.\n";
PyObject* KX_ConstraintActuator::PyGetLimit() {
ShowDeprecationWarning("setLimit()", "the limit property");
- return PyInt_FromLong(m_locrot);
+ return PyLong_FromSsize_t(m_locrot);
}
/* eof */