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:
authorCampbell Barton <ideasman42@gmail.com>2009-04-05 10:08:41 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-04-05 10:08:41 +0400
commit53e721305ef76505257bba3c62c24a042a3030a9 (patch)
tree0a7fe9adbaab2bb3a73d9c75fce5d3fb15a42127 /source/gameengine/Ketsji/KX_GameObject.cpp
parent04ef5a492af04fa9317245c7a843afed1cbd8252 (diff)
BGE Python API
- made camera use PyAttributeDef's - removed unneeded duplicate matrix type checks - fixed own bug (added since 2.48a) that broke a converting 4x4 matrix to a PyObject
Diffstat (limited to 'source/gameengine/Ketsji/KX_GameObject.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp
index d8fb54086b3..dd38bdfb06f 100644
--- a/source/gameengine/Ketsji/KX_GameObject.cpp
+++ b/source/gameengine/Ketsji/KX_GameObject.cpp
@@ -1303,16 +1303,14 @@ int KX_GameObject::pyattr_set_orientation(void *self_v, const KX_PYATTRIBUTE_DEF
}
MT_Matrix3x3 rot;
- if (PyObject_IsMT_Matrix(value, 3))
+
+ if (PyMatTo(value, rot))
{
- if (PyMatTo(value, rot))
- {
- self->NodeSetLocalOrientation(rot);
- self->NodeUpdateGS(0.f,true);
- return 0;
- }
- return 1;
+ self->NodeSetLocalOrientation(rot);
+ self->NodeUpdateGS(0.f,true);
+ return 0;
}
+ return 1;
if (PySequence_Size(value) == 4)
{