diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-12-11 17:38:02 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-12-11 17:38:02 +0300 |
commit | 3a9dcf1fea844796453c98843d24a27a4eef9874 (patch) | |
tree | bfc4c0b2c1ca449b72b8f25e7f5a9123e3256b94 /release/scripts/modules/bpy_types.py | |
parent | c6ffe237629b771f86eb92c755b0897e3a2233e0 (diff) | |
parent | 912877f290281190ed2fc12d333ba43c0607874b (diff) |
Sculpt Branch:sculpt25
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r25245:25315
Diffstat (limited to 'release/scripts/modules/bpy_types.py')
-rw-r--r-- | release/scripts/modules/bpy_types.py | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py index 28ea2d71be8..239990e2bd5 100644 --- a/release/scripts/modules/bpy_types.py +++ b/release/scripts/modules/bpy_types.py @@ -288,21 +288,7 @@ class Menu(StructRNA): # hard coded to set the operators 'path' to the filename. import os - - def path_to_name(f): - ''' Only capitalize all lowercase names, mixed case use them as is. - ''' - f_base = os.path.splitext(f)[0] - - # string replacements - f_base = f_base.replace("_colon_", ":") - - f_base = f_base.replace("_", " ") - - if f_base.lower() == f_base: - return ' '.join([w[0].upper() + w[1:] for w in f_base.split()]) - else: - return f_base + import bpy.utils layout = self.layout @@ -318,7 +304,7 @@ class Menu(StructRNA): if f.startswith("."): continue - layout.operator(operator, text=path_to_name(f)).path = path + layout.operator(operator, text=bpy.utils.display_name(f)).path = path def draw_preset(self, context): '''Define these on the subclass |