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:
Diffstat (limited to 'source/gameengine/Ketsji/KX_Light.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_Light.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/source/gameengine/Ketsji/KX_Light.cpp b/source/gameengine/Ketsji/KX_Light.cpp
index 6f9d8b0211b..7b5b77ccacf 100644
--- a/source/gameengine/Ketsji/KX_Light.cpp
+++ b/source/gameengine/Ketsji/KX_Light.cpp
@@ -236,7 +236,7 @@ int KX_LightObject::py_setattro(PyObject *attr, PyObject *pyvalue)
}
}
- if (PyFloat_Check(pyvalue))
+ if (PyFloat_Check(pyvalue) || PyInt_Check(pyvalue))
{
float value = PyFloat_AsDouble(pyvalue);
if (!strcmp(attr_str, "energy"))
@@ -306,10 +306,22 @@ PyMethodDef KX_LightObject::Methods[] = {
};
PyAttributeDef KX_LightObject::Attributes[] = {
+ KX_PYATTRIBUTE_DUMMY("layer"),
+ KX_PYATTRIBUTE_DUMMY("energy"),
+ KX_PYATTRIBUTE_DUMMY("distance"),
+ KX_PYATTRIBUTE_DUMMY("colour"),
+ KX_PYATTRIBUTE_DUMMY("color"),
+ KX_PYATTRIBUTE_DUMMY("lin_attenuation"),
+ KX_PYATTRIBUTE_DUMMY("quad_attenuation"),
+ KX_PYATTRIBUTE_DUMMY("spotsize"),
+ KX_PYATTRIBUTE_DUMMY("spotblend"),
+ KX_PYATTRIBUTE_DUMMY("SPOT"),
+ KX_PYATTRIBUTE_DUMMY("SUN"),
+ KX_PYATTRIBUTE_DUMMY("NORMAL"),
+ KX_PYATTRIBUTE_DUMMY("type"),
{ NULL } //Sentinel
};
-
PyTypeObject KX_LightObject::Type = {
PyObject_HEAD_INIT(NULL)
0,