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-04-18 00:06:06 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-04-18 00:06:06 +0400
commitdf8cf26404c7e922751643b1095e38f1ab430811 (patch)
treeb4258cc6c90913c379f5cdd05edebd8785230647 /source/gameengine/Ketsji/KX_Light.cpp
parent90c6cf77f10961de756f6ff06329d3fa65ce3da4 (diff)
Added m_zombie to the base python class (PyObjectPlus), when this is set all the subclasses will raise an error on access to their members.
Other small changes... - KX_Camera and KX_Light didnt have get/setitem access in their PyType definition. - CList.from_id() error checking for a long was checking for -1 against an unsigned value (own fault) - CValue::SpecialRelease was incrementing an int for no reason. - renamed m_attrlist to m_attr_dict since its a PyDict type. - removed custom getattro/setattro functions for KX_Scene and KX_GameObject, use py_base_getattro, py_base_setattro for all subclasses of PyObjectPlus. - lowercase windows.h in VideoBase.cpp for cross compiling.
Diffstat (limited to 'source/gameengine/Ketsji/KX_Light.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_Light.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/source/gameengine/Ketsji/KX_Light.cpp b/source/gameengine/Ketsji/KX_Light.cpp
index 0fcd2c39078..29033c2d802 100644
--- a/source/gameengine/Ketsji/KX_Light.cpp
+++ b/source/gameengine/Ketsji/KX_Light.cpp
@@ -177,14 +177,6 @@ PyObject* KX_LightObject::py_getattro(PyObject *attr)
{
char *attr_str= PyString_AsString(attr);
- if (ValidPythonToGameObject(this)==false) {
- if (!strcmp(attr_str, "isValid")) {
- PyErr_Clear();
- Py_RETURN_FALSE;
- }
- return NULL;
- }
-
if (!strcmp(attr_str, "layer"))
return PyInt_FromLong(m_lightobj.m_layer);
@@ -229,9 +221,6 @@ int KX_LightObject::py_setattro(PyObject *attr, PyObject *pyvalue)
{
char *attr_str= PyString_AsString(attr);
- if (ValidPythonToGameObject(this)==false)
- return -1;
-
if (PyInt_Check(pyvalue))
{
int value = PyInt_AsLong(pyvalue);
@@ -347,7 +336,9 @@ PyTypeObject KX_LightObject::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
+ 0,0,
+ &KX_GameObject::Mapping,
+ 0,0,0,
py_base_getattro,
py_base_setattro,
0,0,0,0,0,0,0,0,0,