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:
authorCampbell Barton <ideasman42@gmail.com>2008-08-22 10:02:01 +0400
committerCampbell Barton <ideasman42@gmail.com>2008-08-22 10:02:01 +0400
commit9b298109126bd77b5ee219d5e456cdbb96cc6bb9 (patch)
tree89d2e107e65b514c554601e052caada8953fcfce /source/gameengine/PyDoc/GameLogic.py
parent4655426ec7d643d8a67cf7bad6e446c9620d9b7d (diff)
BGE Python API - GameLogic.getBlendFileList(path='//') to return a list of blend's in the current directory. Needed for creating a level selector that lists all files in the level directory.
CMakeFile include path to compile with recent changes.
Diffstat (limited to 'source/gameengine/PyDoc/GameLogic.py')
-rw-r--r--source/gameengine/PyDoc/GameLogic.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/source/gameengine/PyDoc/GameLogic.py b/source/gameengine/PyDoc/GameLogic.py
index c911ce8ec60..b65bc0f3ce8 100644
--- a/source/gameengine/PyDoc/GameLogic.py
+++ b/source/gameengine/PyDoc/GameLogic.py
@@ -14,8 +14,7 @@ Documentation for the GameLogic Module.
Examples::
# To get a controller:
- import GameLogic
- co = GameLogic.getCurrentController()
+ co = GameLogic.getCurrentController() # GameLogic is automatically imported
# To get the game object associated with this controller:
obj = co.getOwner()
@@ -237,3 +236,13 @@ def expandPath(path):
@return: The converted string
@rtype: string
"""
+
+def getBlendFileList(path = "//"):
+ """
+ Returns a list of blend files in the same directory as the open blend file, or from using the option argument.
+
+ @param path: Optional directory argument, will be expanded (like expandPath) into the full path.
+ @type path: string
+ @return: A list of filenames, with no directory prefix
+ @rtype: list
+ """ \ No newline at end of file