recent change to keyframe menu broke BVH import, now don't use the operator at all, instead assign the action manually.

Also added bpy.path.display_name_from_filepath(), since filepaths are not ensured to be utf8.
same as calling:  os.path.splitext(os.path.basename(name))[0].encode("utf8", "replace").decode("utf8")
This commit is contained in:
Campbell Barton
2011-01-03 08:28:22 +00:00
parent e6d1f25842
commit dacdfbe6f3
2 changed files with 39 additions and 42 deletions

View File

@@ -110,6 +110,13 @@ def display_name(name):
return name_base
def display_name_from_filepath(name):
"""
Returns the path stripped of directort and extension, ensured to be utf8 compatible.
"""
return _os.path.splitext(_os.path.basename(name))[0].encode("utf8", "replace").decode("utf8")
def resolve_ncase(path):
"""
Resolve a case insensitive path on a case sensitive system,