Blender Git Commit Log

Git Commits -> Revision 9847537

Revision 9847537 by Benoit Bolsee (ge_2df_textures)
March 31, 2017, 22:57 (GMT)
BGE: new bge.logic.Render() to perform render w/o logic step.

This function works only if python has control:
1. add scene custom property, call it __main__
2. give it string value as the name of a text block
3. code game loop in python in text block. Example:

import bge

bge.logic.setUseExternalClock(True)
t = 0.0;
scene = bge.logic.getCurrentScene()
cam = scene.cameras["Camera"]
cam.setViewport(120,120,370,370)
while not bge.logic.NextFrame():
cam.useViewport = True
# second render with viewport enable, clock time unchanged
bge.logic.Render()
# advance animation for next frame
t += 0.02
bge.logic.setClockTime(t)
cam.useViewport = False

Commit Details:

Full Hash: 9847537979b8a3ccf4ee5c7f6ca5b66ed9d7b80b
Parent Commit: e4ea5e5
Lines Changed: +60, -12

6 Modified Paths:

/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp (+27, -12) (Diff)
/source/gameengine/GamePlayer/ghost/GPG_Application.cpp (+6, -0) (Diff)
/source/gameengine/GamePlayer/ghost/GPG_Application.h (+1, -0) (Diff)
/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp (+13, -0) (Diff)
/source/gameengine/Ketsji/KX_PythonInit.cpp (+10, -0) (Diff)
/source/gameengine/Ketsji/KX_PythonInit.h (+3, -0) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021