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/Converter/BL_ShapeActionActuator.cpp')
-rw-r--r--source/gameengine/Converter/BL_ShapeActionActuator.cpp40
1 files changed, 12 insertions, 28 deletions
diff --git a/source/gameengine/Converter/BL_ShapeActionActuator.cpp b/source/gameengine/Converter/BL_ShapeActionActuator.cpp
index 7aa8714de3a..970539777f4 100644
--- a/source/gameengine/Converter/BL_ShapeActionActuator.cpp
+++ b/source/gameengine/Converter/BL_ShapeActionActuator.cpp
@@ -427,21 +427,18 @@ PyTypeObject BL_ShapeActionActuator::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 BL_ShapeActionActuator::Parents[] = {
- &BL_ShapeActionActuator::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 BL_ShapeActionActuator::Methods[] = {
{"setAction", (PyCFunction) BL_ShapeActionActuator::sPySetAction, METH_VARARGS, (PY_METHODCHAR)SetAction_doc},
{"setStart", (PyCFunction) BL_ShapeActionActuator::sPySetStart, METH_VARARGS, (PY_METHODCHAR)SetStart_doc},
@@ -480,19 +477,6 @@ PyAttributeDef BL_ShapeActionActuator::Attributes[] = {
{ NULL } //Sentinel
};
-
-PyObject* BL_ShapeActionActuator::py_getattro(PyObject* attr) {
- py_getattro_up(SCA_IActuator);
-}
-
-PyObject* BL_ShapeActionActuator::py_getattro_dict() {
- py_getattro_dict_up(SCA_IActuator);
-}
-
-int BL_ShapeActionActuator::py_setattro(PyObject *attr, PyObject* value) {
- py_setattro_up(SCA_IActuator);
-}
-
/* setStart */
const char BL_ShapeActionActuator::GetAction_doc[] =
"getAction()\n"
@@ -501,7 +485,7 @@ const char BL_ShapeActionActuator::GetAction_doc[] =
PyObject* BL_ShapeActionActuator::PyGetAction() {
ShowDeprecationWarning("getAction()", "the action property");
if (m_action){
- return PyString_FromString(m_action->id.name+2);
+ return PyUnicode_FromString(m_action->id.name+2);
}
Py_RETURN_NONE;
}
@@ -860,21 +844,21 @@ PyObject* BL_ShapeActionActuator::PySetType(PyObject* args) {
PyObject* BL_ShapeActionActuator::pyattr_get_action(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
BL_ShapeActionActuator* self= static_cast<BL_ShapeActionActuator*>(self_v);
- return PyString_FromString(self->GetAction() ? self->GetAction()->id.name+2 : "");
+ return PyUnicode_FromString(self->GetAction() ? self->GetAction()->id.name+2 : "");
}
int BL_ShapeActionActuator::pyattr_set_action(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value)
{
BL_ShapeActionActuator* self= static_cast<BL_ShapeActionActuator*>(self_v);
/* exact copy of BL_ActionActuator's function from here down */
- if (!PyString_Check(value))
+ if (!PyUnicode_Check(value))
{
PyErr_SetString(PyExc_ValueError, "actuator.action = val: Shape Action Actuator, expected the string name of the action");
return PY_SET_ATTR_FAIL;
}
bAction *action= NULL;
- STR_String val = PyString_AsString(value);
+ STR_String val = _PyUnicode_AsString(value);
if (val != "")
{