Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-02-26 08:17:54 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-02-26 08:17:54 +0300
commit936a6eeda87bfd36ada735e5edac06f161a5de25 (patch)
tree17dc1f385218fe9c00f65ac113aba4f2c451e254
parentf87194820bdd20540203a7bb6b91e1932f9ebd16 (diff)
small errors in touch sensor and gameObject
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.cpp2
-rw-r--r--source/gameengine/Ketsji/KX_TouchSensor.cpp11
2 files changed, 3 insertions, 10 deletions
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp
index 5e013a1c647..9c6bd2edf0e 100644
--- a/source/gameengine/Ketsji/KX_GameObject.cpp
+++ b/source/gameengine/Ketsji/KX_GameObject.cpp
@@ -1170,7 +1170,7 @@ int KX_GameObject::_setattr(const char *attr, PyObject *value) // _setattr metho
{
if (!strcmp(attr, "parent")) {
- PyErr_SetString(PyExc_AttributeError, "attribute \"mass\" is read only\nUse setParent()");
+ PyErr_SetString(PyExc_AttributeError, "attribute \"parent\" is read only\nUse setParent()");
return 1;
}
diff --git a/source/gameengine/Ketsji/KX_TouchSensor.cpp b/source/gameengine/Ketsji/KX_TouchSensor.cpp
index de4b5c401fc..32fcc148395 100644
--- a/source/gameengine/Ketsji/KX_TouchSensor.cpp
+++ b/source/gameengine/Ketsji/KX_TouchSensor.cpp
@@ -284,6 +284,8 @@ PyAttributeDef KX_TouchSensor::Attributes[] = {
KX_PYATTRIBUTE_STRING_RW("propertyName",0,100,false,KX_TouchSensor,m_touchedpropname),
KX_PYATTRIBUTE_BOOL_RW("materialCheck",KX_TouchSensor,m_bFindMaterial),
KX_PYATTRIBUTE_BOOL_RW("pulseCollisions",KX_TouchSensor,m_bTouchPulse),
+ KX_PYATTRIBUTE_DUMMY("objectHit"),
+ KX_PYATTRIBUTE_DUMMY("objectHitList"),
{ NULL } //Sentinel
};
@@ -309,15 +311,6 @@ int KX_TouchSensor::_setattr(const char *attr, PyObject *value)
if (ret >= 0)
return ret;
- if (!strcmp(attr, "objectHit")) {
- PyErr_SetString(PyExc_AttributeError, "attribute \"objectHit\" is read only");
- return 1;
- }
- if (!strcmp(attr, "objectHitList")) {
- PyErr_SetString(PyExc_AttributeError, "attribute \"objectHit\" is read only");
- return 1;
- }
-
return SCA_ISensor::_setattr(attr, value);
}