diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-04-27 01:04:42 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-04-27 01:04:42 +0400 |
commit | 6bb55fd93eb728b07a04dbe5c440a6525dd6cef1 (patch) | |
tree | dd538dea8bb24f7fda6a8ea3c47d015af8ec5361 /source/gameengine | |
parent | 523b95898bc6ec94171eccee9f3a8801e10c233a (diff) |
py/rna, euler objects order is now wrapped correctly...
eg:
eul = bpy.context.object.rotation_euler
eul.order = 'XZY' # will update the objects setting.
Diffstat (limited to 'source/gameengine')
-rw-r--r-- | source/gameengine/Ketsji/KX_GameObject.cpp | 30 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_ObjectActuator.cpp | 22 |
2 files changed, 26 insertions, 26 deletions
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index c62a20aa852..776207ef209 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -1252,18 +1252,18 @@ void KX_GameObject::Relink(GEN_Map<GEN_HashedPtr, void*> *map_parameter) static int mathutils_kxgameob_vector_cb_index= -1; /* index for our callbacks */ -static int mathutils_kxgameob_generic_check(PyObject *self_v) +static int mathutils_kxgameob_generic_check(BaseMathObject *bmo) { - KX_GameObject* self= static_cast<KX_GameObject*>BGE_PROXY_REF(self_v); + KX_GameObject* self= static_cast<KX_GameObject*>BGE_PROXY_REF(bmo->cb_user); if(self==NULL) return 0; return 1; } -static int mathutils_kxgameob_vector_get(PyObject *self_v, int subtype, float *vec_from) +static int mathutils_kxgameob_vector_get(BaseMathObject *bmo, int subtype, float *vec_from) { - KX_GameObject* self= static_cast<KX_GameObject*>BGE_PROXY_REF(self_v); + KX_GameObject* self= static_cast<KX_GameObject*>BGE_PROXY_REF(bmo->cb_user); if(self==NULL) return 0; @@ -1309,9 +1309,9 @@ static int mathutils_kxgameob_vector_get(PyObject *self_v, int subtype, float *v return 1; } -static int mathutils_kxgameob_vector_set(PyObject *self_v, int subtype, float *vec_to) +static int mathutils_kxgameob_vector_set(BaseMathObject *bmo, int subtype, float *vec_to) { - KX_GameObject* self= static_cast<KX_GameObject*>BGE_PROXY_REF(self_v); + KX_GameObject* self= static_cast<KX_GameObject*>BGE_PROXY_REF(bmo->cb_user); if(self==NULL) return 0; @@ -1353,27 +1353,27 @@ static int mathutils_kxgameob_vector_set(PyObject *self_v, int subtype, float *v return 1; } -static int mathutils_kxgameob_vector_get_index(PyObject *self_v, int subtype, float *vec_from, int index) +static int mathutils_kxgameob_vector_get_index(BaseMathObject *bmo, int subtype, float *vec_from, int index) { float f[4]; /* lazy, avoid repeteing the case statement */ - if(!mathutils_kxgameob_vector_get(self_v, subtype, f)) + if(!mathutils_kxgameob_vector_get(bmo, subtype, f)) return 0; vec_from[index]= f[index]; return 1; } -static int mathutils_kxgameob_vector_set_index(PyObject *self_v, int subtype, float *vec_to, int index) +static int mathutils_kxgameob_vector_set_index(BaseMathObject *bmo, int subtype, float *vec_to, int index) { float f= vec_to[index]; /* lazy, avoid repeteing the case statement */ - if(!mathutils_kxgameob_vector_get(self_v, subtype, vec_to)) + if(!mathutils_kxgameob_vector_get(bmo, subtype, vec_to)) return 0; vec_to[index]= f; - mathutils_kxgameob_vector_set(self_v, subtype, vec_to); + mathutils_kxgameob_vector_set(bmo, subtype, vec_to); return 1; } @@ -1392,9 +1392,9 @@ Mathutils_Callback mathutils_kxgameob_vector_cb = { static int mathutils_kxgameob_matrix_cb_index= -1; /* index for our callbacks */ -static int mathutils_kxgameob_matrix_get(PyObject *self_v, int subtype, float *mat_from) +static int mathutils_kxgameob_matrix_get(BaseMathObject *bmo, int subtype, float *mat_from) { - KX_GameObject* self= static_cast<KX_GameObject*>BGE_PROXY_REF(self_v); + KX_GameObject* self= static_cast<KX_GameObject*>BGE_PROXY_REF(bmo->cb_user); if(self==NULL) return 0; @@ -1411,9 +1411,9 @@ static int mathutils_kxgameob_matrix_get(PyObject *self_v, int subtype, float *m } -static int mathutils_kxgameob_matrix_set(PyObject *self_v, int subtype, float *mat_to) +static int mathutils_kxgameob_matrix_set(BaseMathObject *bmo, int subtype, float *mat_to) { - KX_GameObject* self= static_cast<KX_GameObject*>BGE_PROXY_REF(self_v); + KX_GameObject* self= static_cast<KX_GameObject*>BGE_PROXY_REF(bmo->cb_user); if(self==NULL) return 0; diff --git a/source/gameengine/Ketsji/KX_ObjectActuator.cpp b/source/gameengine/Ketsji/KX_ObjectActuator.cpp index c93ebe2ee8b..824017f5704 100644 --- a/source/gameengine/Ketsji/KX_ObjectActuator.cpp +++ b/source/gameengine/Ketsji/KX_ObjectActuator.cpp @@ -383,18 +383,18 @@ PyAttributeDef KX_ObjectActuator::Attributes[] = { static int mathutils_kxobactu_vector_cb_index= -1; /* index for our callbacks */ -static int mathutils_obactu_generic_check(PyObject *self_v) +static int mathutils_obactu_generic_check(BaseMathObject *bmo) { - KX_ObjectActuator* self= static_cast<KX_ObjectActuator*>BGE_PROXY_REF(self_v); + KX_ObjectActuator* self= static_cast<KX_ObjectActuator*>BGE_PROXY_REF(bmo->cb_user); if(self==NULL) return 0; return 1; } -static int mathutils_obactu_vector_get(PyObject *self_v, int subtype, float *vec_from) +static int mathutils_obactu_vector_get(BaseMathObject *bmo, int subtype, float *vec_from) { - KX_ObjectActuator* self= static_cast<KX_ObjectActuator*>BGE_PROXY_REF(self_v); + KX_ObjectActuator* self= static_cast<KX_ObjectActuator*>BGE_PROXY_REF(bmo->cb_user); if(self==NULL) return 0; @@ -410,9 +410,9 @@ static int mathutils_obactu_vector_get(PyObject *self_v, int subtype, float *vec return 1; } -static int mathutils_obactu_vector_set(PyObject *self_v, int subtype, float *vec_to) +static int mathutils_obactu_vector_set(BaseMathObject *bmo, int subtype, float *vec_to) { - KX_ObjectActuator* self= static_cast<KX_ObjectActuator*>BGE_PROXY_REF(self_v); + KX_ObjectActuator* self= static_cast<KX_ObjectActuator*>BGE_PROXY_REF(bmo->cb_user); if(self==NULL) return 0; @@ -428,27 +428,27 @@ static int mathutils_obactu_vector_set(PyObject *self_v, int subtype, float *vec return 1; } -static int mathutils_obactu_vector_get_index(PyObject *self_v, int subtype, float *vec_from, int index) +static int mathutils_obactu_vector_get_index(BaseMathObject *bmo, int subtype, float *vec_from, int index) { float f[4]; /* lazy, avoid repeteing the case statement */ - if(!mathutils_obactu_vector_get(self_v, subtype, f)) + if(!mathutils_obactu_vector_get(bmo, subtype, f)) return 0; vec_from[index]= f[index]; return 1; } -static int mathutils_obactu_vector_set_index(PyObject *self_v, int subtype, float *vec_to, int index) +static int mathutils_obactu_vector_set_index(BaseMathObject *bmo, int subtype, float *vec_to, int index) { float f= vec_to[index]; /* lazy, avoid repeteing the case statement */ - if(!mathutils_obactu_vector_get(self_v, subtype, vec_to)) + if(!mathutils_obactu_vector_get(bmo, subtype, vec_to)) return 0; vec_to[index]= f; - mathutils_obactu_vector_set(self_v, subtype, vec_to); + mathutils_obactu_vector_set(bmo, subtype, vec_to); return 1; } |