Fix showing "__pycache__" in templates menu
authorCampbell Barton <ideasman42@gmail.com>
Mon, 15 Jul 2019 09:39:24 +0000 (19:39 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 15 Jul 2019 09:40:27 +0000 (19:40 +1000)
release/scripts/startup/bl_ui/space_text.py

index 6956a8379bddd9584ed82df11accb410d117f613..d1976894653269e3ff9e8430f9dcd638318b2e9f 100644 (file)
@@ -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")
         )