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:
authorBenoit Bolsee <benoit.bolsee@online.be>2009-04-23 02:12:36 +0400
committerBenoit Bolsee <benoit.bolsee@online.be>2009-04-23 02:12:36 +0400
commit90508ed125c8dc81425e74c1e19e3510e1f7799c (patch)
tree598db9805e246377dc273f7e1407336e32c9712c /source/gameengine/Ketsji/KX_PythonInit.cpp
parentfd108f101988ad119b8a5ed4e83cd64227fc1e96 (diff)
BGE bug #17670: Python controlled mist doesnt work in textured mode.
Diffstat (limited to 'source/gameengine/Ketsji/KX_PythonInit.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_PythonInit.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp
index 873e49be6bb..8edc71aeec7 100644
--- a/source/gameengine/Ketsji/KX_PythonInit.cpp
+++ b/source/gameengine/Ketsji/KX_PythonInit.cpp
@@ -632,6 +632,17 @@ static PyObject* gPySetMistColor(PyObject*, PyObject* value)
Py_RETURN_NONE;
}
+static PyObject* gPyDisableMist(PyObject*)
+{
+
+ if (!gp_Rasterizer) {
+ PyErr_SetString(PyExc_RuntimeError, "Rasterizer.setMistColor(color), Rasterizer not available");
+ return NULL;
+ }
+ gp_Rasterizer->DisableFog();
+
+ Py_RETURN_NONE;
+}
static PyObject* gPySetMistStart(PyObject*, PyObject* args)
@@ -900,6 +911,7 @@ static struct PyMethodDef rasterizer_methods[] = {
METH_VARARGS, "setMousePosition(int x,int y)"},
{"setBackgroundColor",(PyCFunction)gPySetBackgroundColor,METH_O,"set Background Color (rgb)"},
{"setAmbientColor",(PyCFunction)gPySetAmbientColor,METH_O,"set Ambient Color (rgb)"},
+ {"disableMist",(PyCFunction)gPyDisableMist,METH_NOARGS,"turn off mist"},
{"setMistColor",(PyCFunction)gPySetMistColor,METH_O,"set Mist Color (rgb)"},
{"setMistStart",(PyCFunction)gPySetMistStart,METH_VARARGS,"set Mist Start(rgb)"},
{"setMistEnd",(PyCFunction)gPySetMistEnd,METH_VARARGS,"set Mist End(rgb)"},