diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-06-14 05:41:43 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-06-14 05:41:43 +0400 |
commit | 374d3a66858a28ede6ad12fcd5a6a9efc7407935 (patch) | |
tree | 8dd14edcbac80ae41e1faf8cc18a8758cfeda9b3 /source/gameengine/Ketsji/KX_GameObject.cpp | |
parent | a262847298e9d9f4426f991b4e6c3f9fa89163f8 (diff) |
bugfix [#21748] KX_Object scaling property not "writing" vector access .:. e.g. obj.scaling[2] = 2.0
- made worldspace readonly
- mathutils 'set' callbacks can now set their own error
Diffstat (limited to 'source/gameengine/Ketsji/KX_GameObject.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_GameObject.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index abc597a9eae..ecfacb8f9bb 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -1329,7 +1329,8 @@ static int mathutils_kxgameob_vector_set(BaseMathObject *bmo, int subtype) self->NodeUpdateGS(0.f); break; case MATHUTILS_VEC_CB_SCALE_GLOBAL: - break; + PyErr_SetString(PyExc_AttributeError, "KX_GameObject.worldScale is read-only"); + return 0; case MATHUTILS_VEC_CB_INERTIA_LOCAL: /* read only */ break; @@ -1370,9 +1371,7 @@ static int mathutils_kxgameob_vector_set_index(BaseMathObject *bmo, int subtype, return 0; bmo->data[index]= f; - mathutils_kxgameob_vector_set(bmo, subtype); - - return 1; + return mathutils_kxgameob_vector_set(bmo, subtype); } Mathutils_Callback mathutils_kxgameob_vector_cb = { |