Making KX_GameObject names read only.

This was committed in revision 2832 but never accounted for existing object name hashes which existed since revision 2.

Its possible to update the names elsewhere but unlikely anyone ever used this successfully so removing.
This commit is contained in:
Campbell Barton
2009-02-24 12:38:56 +00:00
parent 33aee345ed
commit adaa4b0fd0
2 changed files with 7 additions and 1 deletions

View File

@@ -1279,8 +1279,14 @@ int KX_GameObject::_setattr(const char *attr, PyObject *value) // _setattr metho
{
if (!strcmp(attr, "name"))
{
#if 0 // was added in revision 2832, but never took into account Object name mappings from revision 2
// unlikely anyone ever used this successfully , removing.
m_name = PyString_AsString(value);
return 0;
#else
PyErr_SetString(PyExc_AttributeError, "object name readonly");
return 1;
#endif
}
}