diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2012-12-22 09:38:32 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2012-12-22 09:38:32 +0400 |
commit | 84966c3d0ae2d39fa4e691ed0131d8b94f8785e4 (patch) | |
tree | 96f1fbaac1e4b2f151c7726c90b8491a718666c1 /source/gameengine/Converter/CMakeLists.txt | |
parent | 8062bcd16f9e91d76dbd074f32b889ce2e0cba84 (diff) |
BGE: Committing async LibLoad from Swiss. This does the lib loading in a separate thread to keep the BGE from freezing. Here is an example from the docs:
# Print a message when an async LibLoad is done
import bge
def finished_cb(status):
print("Library (%s) loaded in %.2fms." % (status.libraryName, status.timeTaken))
bge.logic.LibLoad('myblend.blend', 'Scene', async=True).onFinish = finished_cb
LibLoad() now returns a KX_LibLoadStatus object for information on the library loading. LibNew() and LibFree() are unaffected by this commit. In other words, the async option only works for LibLoad(). Furthermore it only works for Scenes, not Actions or Meshes.
Diffstat (limited to 'source/gameengine/Converter/CMakeLists.txt')
-rw-r--r-- | source/gameengine/Converter/CMakeLists.txt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/gameengine/Converter/CMakeLists.txt b/source/gameengine/Converter/CMakeLists.txt index e9dd97f3821..e01729e156f 100644 --- a/source/gameengine/Converter/CMakeLists.txt +++ b/source/gameengine/Converter/CMakeLists.txt @@ -83,6 +83,7 @@ set(SRC KX_ConvertProperties.cpp KX_ConvertSensors.cpp KX_IpoConvert.cpp + KX_LibLoadStatus.cpp KX_SoftBodyDeformer.cpp BL_ActionActuator.h @@ -105,6 +106,7 @@ set(SRC KX_ConvertProperties.h KX_ConvertSensors.h KX_IpoConvert.h + KX_LibLoadStatus.h KX_SoftBodyDeformer.h ) |