[Bf-blender-cvs] [4f47f7fa96] app-templates: Only show startup.blend in template menu

Campbell Barton noreply at git.blender.org
Thu Mar 16 18:58:44 CET 2017


Commit: 4f47f7fa9642638575b759e76f5c87d1e778f907
Author: Campbell Barton
Date:   Fri Mar 17 05:03:04 2017 +1100
Branches: app-templates
https://developer.blender.org/rB4f47f7fa9642638575b759e76f5c87d1e778f907

Only show startup.blend in template menu

===================================================================

M	release/scripts/startup/bl_ui/space_userpref.py

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index ae3afd2f0e..a1804678a2 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -126,7 +126,7 @@ class USERPREF_MT_app_templates(Menu):
                 "use_splash": use_splash,
                 "use_template": True,
             },
-            filter_ext=lambda ext: ext.lower() == ".blend",
+            filter_path=lambda path: os.path.basename(path) == "startup.blend",
             # name of directory the file is in.
             display_name=lambda f: bpy.path.display_name(f.rsplit(os.sep, 2)[-2]),
         )




More information about the Bf-blender-cvs mailing list