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:
authorKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>2004-07-17 09:28:23 +0400
committerKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>2004-07-17 09:28:23 +0400
commitbaa2f99f079920d404af65798a8df3e82bcc6a48 (patch)
tree2e8fb2bad0c3824e87e12cc0ebf3d4933eeb56f3 /source/gameengine/Ketsji/KX_Light.cpp
parent90fb63152628927d5d13b0101f4f2dcec025d2f7 (diff)
Port Python updates from Tuhopuu2:
getType/setType to action/sound actuator (sgefant) Use a more generic python -> math conversion.
Diffstat (limited to 'source/gameengine/Ketsji/KX_Light.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_Light.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/source/gameengine/Ketsji/KX_Light.cpp b/source/gameengine/Ketsji/KX_Light.cpp
index f5ec21ee1b8..06a52c07b3f 100644
--- a/source/gameengine/Ketsji/KX_Light.cpp
+++ b/source/gameengine/Ketsji/KX_Light.cpp
@@ -191,11 +191,15 @@ int KX_LightObject::_setattr(const STR_String& attr, PyObject *pyvalue)
{
if (attr == "colour" || attr == "color")
{
- MT_Vector3 colour(MT_Vector3FromPyList(pyvalue));
- m_lightobj.m_red = colour[0];
- m_lightobj.m_green = colour[1];
- m_lightobj.m_blue = colour[2];
- return 0;
+ MT_Vector3 colour;
+ if (PyVecTo(pyvalue, colour))
+ {
+ m_lightobj.m_red = colour[0];
+ m_lightobj.m_green = colour[1];
+ m_lightobj.m_blue = colour[2];
+ return 0;
+ }
+ return 1;
}
}