[Bf-blender-cvs] [761135a2846] master: Fix showing "__pycache__" in templates menu

Campbell Barton noreply at git.blender.org
Mon Jul 15 11:41:44 CEST 2019


Commit: 761135a284676c75b771fe4ef3b511f8fe48d97f
Author: Campbell Barton
Date:   Mon Jul 15 19:39:24 2019 +1000
Branches: master
https://developer.blender.org/rB761135a284676c75b771fe4ef3b511f8fe48d97f

Fix showing "__pycache__" in templates menu

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

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

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

diff --git a/release/scripts/startup/bl_ui/space_text.py b/release/scripts/startup/bl_ui/space_text.py
index 6956a8379bd..d1976894653 100644
--- a/release/scripts/startup/bl_ui/space_text.py
+++ b/release/scripts/startup/bl_ui/space_text.py
@@ -240,6 +240,7 @@ class TEXT_MT_templates_py(Menu):
             bpy.utils.script_paths("templates_py"),
             "text.open",
             props_default={"internal": True},
+            filter_ext=lambda ext: (ext.lower() == ".py")
         )
 
 
@@ -251,6 +252,7 @@ class TEXT_MT_templates_osl(Menu):
             bpy.utils.script_paths("templates_osl"),
             "text.open",
             props_default={"internal": True},
+            filter_ext=lambda ext: (ext.lower() == ".osl")
         )



More information about the Bf-blender-cvs mailing list