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.
This commit is contained in:
2008-05-06 17:54:55 +00:00
parent 722f24d153
commit 4255f3c7ab
4 changed files with 57 additions and 12 deletions

View File

@@ -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.
"""