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-10-24 15:03:18 +0400
committerKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>2004-10-24 15:03:18 +0400
commit657eff7ed7f23e9218a22ff6b3c96d331d69dd47 (patch)
treef9a7c7a0e95fd40c6c6f3300f6248f23b3e9041b /source/gameengine/Ketsji/KX_PythonInit.cpp
parent6424bf6eb02345cc4e8db0951edba97993dce301 (diff)
Port stereo stuff from tuhopuu2: anaglyph, vinterlace
Diffstat (limited to 'source/gameengine/Ketsji/KX_PythonInit.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_PythonInit.cpp48
1 files changed, 48 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp
index ba466f20f64..42b26185b4c 100644
--- a/source/gameengine/Ketsji/KX_PythonInit.cpp
+++ b/source/gameengine/Ketsji/KX_PythonInit.cpp
@@ -341,7 +341,51 @@ static PyObject* gPySetMousePosition(PyObject*,
Py_Return;
}
+static PyObject* gPySetEyeSeparation(PyObject*,
+ PyObject* args,
+ PyObject*)
+{
+ float sep;
+ if (PyArg_ParseTuple(args, "f", &sep))
+ {
+ if (gp_Rasterizer)
+ gp_Rasterizer->SetEyeSeparation(sep);
+
+ Py_Return;
+ }
+
+ return NULL;
+}
+
+static PyObject* gPyGetEyeSeparation(PyObject*, PyObject*, PyObject*)
+{
+ if (gp_Rasterizer)
+ return PyFloat_FromDouble(gp_Rasterizer->GetEyeSeparation());
+
+ return NULL;
+}
+static PyObject* gPySetFocalLength(PyObject*,
+ PyObject* args,
+ PyObject*)
+{
+ float focus;
+ if (PyArg_ParseTuple(args, "f", &focus))
+ {
+ if (gp_Rasterizer)
+ gp_Rasterizer->SetFocalLength(focus);
+ Py_Return;
+ }
+
+ return NULL;
+}
+
+static PyObject* gPyGetFocalLength(PyObject*, PyObject*, PyObject*)
+{
+ if (gp_Rasterizer)
+ return PyFloat_FromDouble(gp_Rasterizer->GetFocalLength());
+ return NULL;
+}
static PyObject* gPySetBackgroundColor(PyObject*,
PyObject* args,
@@ -461,6 +505,10 @@ static struct PyMethodDef rasterizer_methods[] = {
{"setMistStart",(PyCFunction)gPySetMistStart,METH_VARARGS,"set Mist Start(rgb)"},
{"setMistEnd",(PyCFunction)gPySetMistEnd,METH_VARARGS,"set Mist End(rgb)"},
+ {"setEyeSeparation", (PyCFunction) gPySetEyeSeparation, METH_VARARGS, "set the eye separation for stereo mode"},
+ {"getEyeSeparation", (PyCFunction) gPyGetEyeSeparation, METH_VARARGS, "get the eye separation for stereo mode"},
+ {"setFocalLength", (PyCFunction) gPySetFocalLength, METH_VARARGS, "set the focal length for stereo mode"},
+ {"getFocalLength", (PyCFunction) gPyGetFocalLength, METH_VARARGS, "get the focal length for stereo mode"},
{ NULL, (PyCFunction) NULL, 0, NULL }
};