bugfix [#24065] obj export (mtl image path)

This commit is contained in:
2010-10-01 05:19:40 +00:00
parent 4ab6881617
commit 3dea67a3fd
2 changed files with 15 additions and 0 deletions

View File

@@ -52,6 +52,17 @@ def relpath(path, start=None):
return path
def is_subdir(path, directory):
"""
Returns true if *path* in a subdirectory of *directory*.
Both paths must be absolute.
"""
from os.path import normpath, normcase
path = normpath(normcase(path))
directory = normpath(normcase(directory))
return path.startswith(directory)
def clean_name(name, replace="_"):
"""
Returns a name with characters replaced that may cause problems under various circumstances, such as writing to a file.