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_SceneActuator.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_SceneActuator.cpp47
1 files changed, 12 insertions, 35 deletions
diff --git a/source/gameengine/Ketsji/KX_SceneActuator.cpp b/source/gameengine/Ketsji/KX_SceneActuator.cpp
index 1b790ec9824..16521f2ddcc 100644
--- a/source/gameengine/Ketsji/KX_SceneActuator.cpp
+++ b/source/gameengine/Ketsji/KX_SceneActuator.cpp
@@ -49,9 +49,8 @@ KX_SceneActuator::KX_SceneActuator(SCA_IObject *gameobj,
KX_Scene *scene,
KX_KetsjiEngine* ketsjiEngine,
const STR_String& nextSceneName,
- KX_Camera* camera,
- PyTypeObject* T)
- : SCA_IActuator(gameobj, T)
+ KX_Camera* camera)
+ : SCA_IActuator(gameobj)
{
m_mode = mode;
m_scene = scene;
@@ -134,7 +133,7 @@ bool KX_SceneActuator::Update()
{
// if no camera is set and the parent object is a camera, use it as the camera
SCA_IObject* parent = GetParent();
- if (parent->isA(&KX_Camera::Type))
+ if (parent->GetGameObjectType()==SCA_IObject::OBJ_CAMERA)
{
m_scene->SetActiveCamera((KX_Camera*)parent);
}
@@ -240,25 +239,17 @@ PyTypeObject KX_SceneActuator::Type = {
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_SceneActuator::Parents[] =
-{
- &KX_SceneActuator::Type,
- &SCA_IActuator::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ NULL, //py_base_getattro,
+ NULL, //py_base_setattro,
+ 0,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
+ &SCA_IActuator::Type
};
-
-
PyMethodDef KX_SceneActuator::Methods[] =
{
//Deprecated functions ------>
@@ -280,20 +271,6 @@ PyAttributeDef KX_SceneActuator::Attributes[] = {
{ NULL } //Sentinel
};
-PyObject* KX_SceneActuator::py_getattro(PyObject *attr)
-{
- py_getattro_up(SCA_IActuator);
-}
-
-PyObject* KX_SceneActuator::py_getattro_dict() {
- py_getattro_dict_up(SCA_IActuator);
-}
-
-int KX_SceneActuator::py_setattro(PyObject *attr, PyObject *value)
-{
- py_setattro_up(SCA_IActuator);
-}
-
PyObject* KX_SceneActuator::pyattr_get_camera(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef)
{
KX_SceneActuator* actuator = static_cast<KX_SceneActuator*>(self);