diff options
Diffstat (limited to 'release/scripts/modules/bpy/path.py')
-rw-r--r-- | release/scripts/modules/bpy/path.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/release/scripts/modules/bpy/path.py b/release/scripts/modules/bpy/path.py index d236af87052..845475b9180 100644 --- a/release/scripts/modules/bpy/path.py +++ b/release/scripts/modules/bpy/path.py @@ -201,7 +201,7 @@ _display_name_literals = { } -def display_name(name): +def display_name(name, *, has_ext=True): """ Creates a display string from name to be used menus and the user interface. Capitalize the first letter in all lowercase names, @@ -209,7 +209,8 @@ def display_name(name): filenames and module names. """ - name = _os.path.splitext(basename(name))[0] + if has_ext: + name = _os.path.splitext(basename(name))[0] # string replacements for disp_value, file_value in _display_name_literals.items(): |