diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-04-05 10:08:41 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-04-05 10:08:41 +0400 |
commit | 53e721305ef76505257bba3c62c24a042a3030a9 (patch) | |
tree | 0a7fe9adbaab2bb3a73d9c75fce5d3fb15a42127 /source/gameengine/Ketsji/KX_GameObject.cpp | |
parent | 04ef5a492af04fa9317245c7a843afed1cbd8252 (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.cpp | 14 |
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) { |