diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-06-25 14:11:37 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-06-25 14:11:37 +0400 |
commit | d428ba1de8074e8b0ca2b7c0b060c18ebf7d6b0c (patch) | |
tree | 0200656374d9d08125eba99ecc009ca3e70cc7fb /source/gameengine/Ketsji/KX_GameObject.cpp | |
parent | 7a357cba3994bee7d05c7a8bf5736eb94067d564 (diff) |
PyAPI RNA/BGE
* all mathutils types now have optional callbacks
* PyRNA returns mathutils quat and euler types automatically when they have the rotation subtype.
* PyRNA, reuse the BPy_StructRNA PyObject rather name making a new one for each function returned.
* use more arithb.c functions for Mathutils quaternion type (less inline cruft).
* BGE Mathutils integration mostly finished- KX_PyMath now converts to Mathutils types rather then lists.
* make all mathutils types share the same header so they can share a number of functions - dealloc, getWrapped, getOwner.
Diffstat (limited to 'source/gameengine/Ketsji/KX_GameObject.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_GameObject.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index a3b2ba79e11..577f767b475 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -1184,11 +1184,7 @@ CListValue* KX_GameObject::GetChildrenRecursive() return list; } - #ifdef USE_MATHUTILS -extern "C" { -#include "../../blender/python/generic/Mathutils.h" /* so we can have mathutils callbacks */ -} /* These require an SGNode */ #define MATHUTILS_VEC_CB_POS_LOCAL 1 @@ -1880,12 +1876,7 @@ int KX_GameObject::pyattr_set_worldOrientation(void *self_v, const KX_PYATTRIBUT if (!PyOrientationTo(value, rot, "gameOb.worldOrientation = sequence: KX_GameObject, ")) return PY_SET_ATTR_FAIL; - if (self->GetSGNode() && self->GetSGNode()->GetSGParent()) { - self->NodeSetLocalOrientation(self->GetSGNode()->GetSGParent()->GetWorldOrientation().inverse()*rot); - } - else { - self->NodeSetLocalOrientation(rot); - } + self->NodeSetGlobalOrientation(rot); self->NodeUpdateGS(0.f); return PY_SET_ATTR_SUCCESS; |