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/Ketsji/KX_ISceneConverter.h | |
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/Ketsji/KX_ISceneConverter.h')
-rw-r--r-- | source/gameengine/Ketsji/KX_ISceneConverter.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/KX_ISceneConverter.h b/source/gameengine/Ketsji/KX_ISceneConverter.h index 0dbfd7de2c6..7c1d593a81e 100644 --- a/source/gameengine/Ketsji/KX_ISceneConverter.h +++ b/source/gameengine/Ketsji/KX_ISceneConverter.h @@ -62,6 +62,9 @@ public: virtual void RemoveScene(class KX_Scene *scene)=0; + // handle any pending merges from asynchronous loads + virtual void MergeAsyncLoads()=0; + virtual void SetAlwaysUseExpandFraming(bool to_what) = 0; virtual void SetNewFileName(const STR_String& filename) = 0; |