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.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/KX_Light.cpp b/source/gameengine/Ketsji/KX_Light.cpp
index 9be4256f58f..f5ec21ee1b8 100644
--- a/source/gameengine/Ketsji/KX_Light.cpp
+++ b/source/gameengine/Ketsji/KX_Light.cpp
@@ -98,6 +98,9 @@ PyObject* KX_LightObject::_getattr(const STR_String& attr)
if (attr == "lin_attenuation")
return PyFloat_FromDouble(m_lightobj.m_att1);
+ if (attr == "quad_attenuation")
+ return PyFloat_FromDouble(m_lightobj.m_att2);
+
if (attr == "spotsize")
return PyFloat_FromDouble(m_lightobj.m_spotsize);
@@ -165,6 +168,12 @@ int KX_LightObject::_setattr(const STR_String& attr, PyObject *pyvalue)
return 0;
}
+ if (attr == "quad_attenuation")
+ {
+ m_lightobj.m_att2 = value;
+ return 0;
+ }
+
if (attr == "spotsize")
{
m_lightobj.m_spotsize = value;