[Bf-blender-cvs] [9a31389] decklink: BGE: Set render flag true on game start.

Benoit Bolsee noreply at git.blender.org
Tue Nov 24 22:57:22 CET 2015


Commit: 9a31389aed6e7bb3e28c67a747d8ad88004bd9a1
Author: Benoit Bolsee
Date:   Tue Nov 24 22:48:45 2015 +0100
Branches: decklink
https://developer.blender.org/rB9a31389aed6e7bb3e28c67a747d8ad88004bd9a1

BGE: Set render flag true on game start.

Fixes this bug:
1. add `logic.setRender(False)`
2. run game, exit game
3. remove the `logic.setRender` line
4. run game ... the render is still off

Now the render flag will be on by default on game start.

Note: during the game, the render flag stays unchanged across
      game restart/load. It's only on initial game start that it is
      initialized on.

===================================================================

M	source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
M	source/gameengine/GamePlayer/ghost/GPG_Application.cpp

===================================================================

diff --git a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
index e3c8c89..88a716e 100644
--- a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
+++ b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
@@ -340,6 +340,7 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c
 		ketsjiengine->SetUseFixedTime(usefixed);
 		ketsjiengine->SetTimingDisplay(frameRate, profile, properties);
 		ketsjiengine->SetRestrictAnimationFPS(restrictAnimFPS);
+		ketsjiengine->SetRender(true);
 		KX_KetsjiEngine::SetExitKey(ConvertKeyCode(startscene->gm.exitkey));
 
 		//set the global settings (carried over if restart/load new files)
diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
index a295d63..1791805 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
@@ -672,6 +672,7 @@ bool GPG_Application::initEngine(GHOST_IWindow* window, const int stereoMode)
 
 		//set the global settings (carried over if restart/load new files)
 		m_ketsjiengine->SetGlobalSettings(m_globalSettings);
+		m_ketsjiengine->SetRender(true);
 
 		m_engineInitialized = true;
 	}




More information about the Bf-blender-cvs mailing list