diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-05-06 21:54:55 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-05-06 21:54:55 +0400 |
commit | 4255f3c7abe5c0bc7e9d2bc407ec6671e6ae6c45 (patch) | |
tree | d36e4b68107597912f8f9cf38764a03c78b8401f /source/blender/python/api2_2x/doc | |
parent | 722f24d15357275ee3efed33fa03f9b27909a604 (diff) |
made python add mesh module respect blenders user settings for editmode and view align.
added sys.cleanpath() was a patch in the tracker but blender's internal path cleaning is now more general and can be used from
python.
Diffstat (limited to 'source/blender/python/api2_2x/doc')
-rw-r--r-- | source/blender/python/api2_2x/doc/Sys.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/python/api2_2x/doc/Sys.py b/source/blender/python/api2_2x/doc/Sys.py index f1efeeb2344..d7c62f2cb02 100644 --- a/source/blender/python/api2_2x/doc/Sys.py +++ b/source/blender/python/api2_2x/doc/Sys.py @@ -153,7 +153,7 @@ def expandpath (path): Internally, Blender recognizes two special character sequences in paths: - '//' (used at the beginning): means base path -- the current .blend file's dir; - - '#' (used at the end): means current frame number. + - '#' characters in the filename will be replaced by the frame number. The expanded string can be passed to generic python functions that don't understand Blender's internal relative paths. @note: this function is also useful for obtaining the name of the image @@ -165,3 +165,12 @@ def expandpath (path): @rtype: string @return: the expanded (if necessary) path. """ + +def cleanpath (path): + """ + Clean the given 'path' by removing unneeded components such as "/./" and "/test/../" + @type path: string + @param path: a path name. + @rtype: string + @return: the cleaned (if necessary) path. + """ |