diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-05-03 13:21:58 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-05-03 13:21:58 +0400 |
commit | 22b501c7917e8e209aab2dee02101286b7ecc45f (patch) | |
tree | 832aae982e875475c2781bdf49b1cd8633194056 /source/gameengine/Expressions/PyObjectPlus.cpp | |
parent | b0ec497f39cb7aa7df1f7936418b443aeefbaade (diff) |
fixes for bugs submitted by BGE users, fixes by myself and Mitchell Stokes
- when the attribute check function failed it didnt set an error raising a SystemError instead
- Rasterizer.getMaterialMode would never return KX_BLENDER_MULTITEX_MATERIAL
- PropertySensor value attribute checking function was always returning a fail.
- Vertex Self Shadow python script didnt update for meshes with modifiers.
Diffstat (limited to 'source/gameengine/Expressions/PyObjectPlus.cpp')
-rw-r--r-- | source/gameengine/Expressions/PyObjectPlus.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/gameengine/Expressions/PyObjectPlus.cpp b/source/gameengine/Expressions/PyObjectPlus.cpp index e6b49332273..107b12b7159 100644 --- a/source/gameengine/Expressions/PyObjectPlus.cpp +++ b/source/gameengine/Expressions/PyObjectPlus.cpp @@ -519,6 +519,10 @@ int PyObjectPlus::py_set_attrdef(void *self, const PyAttributeDef *attrdef, PyOb { if ((*attrdef->m_checkFunction)(self, attrdef) != 0) { + // if the checing function didnt set an error then set a generic one here so we dont set an error with no exception + if (PyErr_Occurred()==0) + PyErr_Format(PyExc_AttributeError, "type check error for attribute \"%s\", reasion unknown", attrdef->m_name); + // post check returned an error, restore values UNDO_AND_ERROR: if (undoBuffer) |