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:
authorDalai Felinto <dfelinto@gmail.com>2009-06-10 02:56:43 +0400
committerDalai Felinto <dfelinto@gmail.com>2009-06-10 02:56:43 +0400
commit323863015db62f1b7b10a09a34489503070c23b4 (patch)
tree31d61768c5f7b1e68b2eb6aae9d06da6baf03799 /source/gameengine/Ketsji/KX_KetsjiEngine.cpp
parent9a54ca9af79012354e91424d3b434ea23bc053ad (diff)
fix for bug #18898: GE perspective 3D View not working properly (missing LENS)
note: I'm not changing GamePlayer files. There is no such a thing as 3D view camera in gameplayer (override_camera).
Diffstat (limited to 'source/gameengine/Ketsji/KX_KetsjiEngine.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_KetsjiEngine.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
index b30b79e7f23..a43ea59220b 100644
--- a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
+++ b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
@@ -1078,6 +1078,11 @@ void KX_KetsjiEngine::SetCameraOverrideClipping(float near, float far)
m_overrideCamFar = far;
}
+void KX_KetsjiEngine::SetCameraOverrideLens(float lens)
+{
+ m_overrideCamLens = lens;
+}
+
void KX_KetsjiEngine::GetSceneViewport(KX_Scene *scene, KX_Camera* cam, RAS_Rect& area, RAS_Rect& viewport)
{
// In this function we make sure the rasterizer settings are upto
@@ -1351,6 +1356,8 @@ void KX_KetsjiEngine::PostProcessScene(KX_Scene* scene)
KX_Camera* activecam = NULL;
RAS_CameraData camdata = RAS_CameraData();
+ if (override_camera) camdata.m_lens = m_overrideCamLens;
+
activecam = new KX_Camera(scene,KX_Scene::m_callbacks,camdata);
activecam->SetName("__default__cam__");