svn merge -r 21041:21301 https://svn.blender.org/svnroot/bf-blender/branches/blender2...
[blender.git] / source / gameengine / Ketsji / KX_ParentActuator.cpp
index cd2ed456c48ddae1c2d0a5d52b691253b360bd1b..befa2aaff563ff05b1f051fbd4c1f6097596c39c 100644 (file)
@@ -50,9 +50,8 @@ KX_ParentActuator::KX_ParentActuator(SCA_IObject *gameobj,
                                                                         int mode,
                                                                         bool addToCompound,
                                                                         bool ghost,
-                                                                        SCA_IObject *ob,
-                                                                        PyTypeObject* T)
-       : SCA_IActuator(gameobj, T),
+                                                                        SCA_IObject *ob)
+       : SCA_IActuator(gameobj),
          m_mode(mode),
          m_addToCompound(addToCompound),
          m_ghost(ghost),
@@ -157,19 +156,15 @@ PyTypeObject KX_ParentActuator::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_ParentActuator::Parents[] = {
-       &KX_ParentActuator::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_ParentActuator::Methods[] = {
@@ -217,18 +212,6 @@ int KX_ParentActuator::pyattr_set_object(void *self, const struct KX_PYATTRIBUTE
 }
 
 
-PyObject* KX_ParentActuator::py_getattro(PyObject *attr) {     
-       py_getattro_up(SCA_IActuator);
-}
-
-PyObject* KX_ParentActuator::py_getattro_dict() {
-       py_getattro_dict_up(SCA_IActuator);
-}
-
-int KX_ParentActuator::py_setattro(PyObject *attr, PyObject* value) {
-       py_setattro_up(SCA_IActuator);
-}
-
 /* Deprecated -----> */
 /* 1. setObject                                                            */
 const char KX_ParentActuator::SetObject_doc[] = 
@@ -273,7 +256,7 @@ PyObject* KX_ParentActuator::PyGetObject(PyObject* args)
                Py_RETURN_NONE;
        
        if (ret_name_only)
-               return PyString_FromString(m_ob->GetName().ReadPtr());
+               return PyUnicode_FromString(m_ob->GetName().ReadPtr());
        else
                return m_ob->GetProxy();
 }