diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-07-19 19:44:00 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-07-19 19:44:00 +0400 |
commit | a8785893c5657592c9cc27ce844664b5d62397de (patch) | |
tree | ebe335581b9af24280841f93a7a6fc1887a5f86f /source/blender/python/api2_2x/doc | |
parent | 37c8f08f28db1894cb3a10373b5a633ebafd32fd (diff) |
Added functions so python can change library paths.
* bpy.libraries.paths() -> list of library paths.
* bpy.libraries.replace(fromPath, toPath)
Diffstat (limited to 'source/blender/python/api2_2x/doc')
-rw-r--r-- | source/blender/python/api2_2x/doc/LibData.py | 42 |
1 files changed, 31 insertions, 11 deletions
diff --git a/source/blender/python/api2_2x/doc/LibData.py b/source/blender/python/api2_2x/doc/LibData.py index 47bd7fdb763..daa6a186531 100644 --- a/source/blender/python/api2_2x/doc/LibData.py +++ b/source/blender/python/api2_2x/doc/LibData.py @@ -27,17 +27,37 @@ Example:: """ def load(filename,relative=False): - """ - Select an existing .blend file for use as a library. Unlike the - Library module, multiple libraries can be defined at the same time. - - @type filename: string - @param filename: The filename of a Blender file. Filenames starting with "//" will be loaded relative to the blend file's location. - @type relative: boolean - @param relative: Convert relative paths to absolute paths (default). Setting this parameter to True will leave paths relative. - @rtype: Library - @return: return a L{Library} object. - """ + """ + Select an existing .blend file for use as a library. Unlike the + Library module, multiple libraries can be defined at the same time. + + @type filename: string + @param filename: The filename of a Blender file. Filenames starting with "//" will be loaded relative to the blend file's location. + @type relative: boolean + @param relative: Convert relative paths to absolute paths (default). Setting this parameter to True will leave paths relative. + @rtype: Library + @return: return a L{Library} object. + """ + +def paths(link=0): + """ + Returns a list of paths used in the current blend file. + + @type link: int + @param link: 0 (default if no args given) for all library paths, 1 for directly linked library paths only, 2 for indirectly linked library paths only. + @rtype: List + @return: return a list of path strings. + """ + +def replace(pathFrom, pathTo): + """ + Replaces an existing directly linked path. + + @type pathFrom: string + @param pathFrom: An existing library path. + @type pathTo: string + @param pathTo: A new library path. + """ class Libraries: """ |