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:
authorPorteries Tristan <republicthunderbolt9@gmail.com>2015-10-27 13:04:04 +0300
committerPorteries Tristan <republicthunderbolt9@gmail.com>2015-10-27 13:10:12 +0300
commit13a4bcd148bd7a32af8af626f42f7793aca7b7fe (patch)
treed2ec1c6cb1fda3223805eb01e2ca3bb3d583fb06 /source/gameengine/BlenderRoutines
parent95164a09a73b5f72cfb21abfe608dfd0873b7706 (diff)
BGE: Fix T31357: wrong zoom when sets camera.
This patch makes independant the override camera zoom and the default camera object zoom. The override zoom is 2.0f and the camera object zoom is computed with the RegionView3D camera zoom. These features are only used for the embedded BGE, so there's no compatibility issues with the blenderplayer. I let the override zoom with a setter to allow later to create an override camera in blenderplayer easily. Tested with the 3 framing modes in embedded and standalone.
Diffstat (limited to 'source/gameengine/BlenderRoutines')
-rw-r--r--source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
index 91382669d5c..e3c8c894033 100644
--- a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
+++ b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
@@ -359,25 +359,22 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c
}
// some blender stuff
- float camzoom;
+ float camzoom = 1.0f;
int draw_letterbox = 0;
-
+
if (rv3d->persp==RV3D_CAMOB) {
if (startscene->gm.framing.type == SCE_GAMEFRAMING_BARS) { /* Letterbox */
- camzoom = 1.0f;
draw_letterbox = 1;
}
else {
camzoom = 1.0f / BKE_screen_view3d_zoom_to_fac(rv3d->camzoom);
}
}
- else {
- camzoom = 2.0;
- }
rasterizer->SetDrawingMode(drawtype);
ketsjiengine->SetCameraZoom(camzoom);
-
+ ketsjiengine->SetCameraOverrideZoom(2.0f);
+
// if we got an exitcode 3 (KX_EXIT_REQUEST_START_OTHER_GAME) load a different file
if (exitrequested == KX_EXIT_REQUEST_START_OTHER_GAME || exitrequested == KX_EXIT_REQUEST_RESTART_GAME)
{