Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2020-05-18 11:49:23 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2020-05-18 11:49:23 +0300
commit470ed9f07453acdf59b9ff8feac71df52409f0ab (patch)
tree9616c3ea319e9caad20ebcef3f211f7570364a48 /release/scripts/startup/bl_ui/space_topbar.py
parenta4b2734fe2675fbe2aeacc813b3dcd716fe81782 (diff)
parent04d15f162546ea9269b08525dac66482b83e8fe2 (diff)
Merge branch 'blender-v2.83-release'
Diffstat (limited to 'release/scripts/startup/bl_ui/space_topbar.py')
-rw-r--r--release/scripts/startup/bl_ui/space_topbar.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py
index 9aedd7ef0b3..6fc29119cdc 100644
--- a/release/scripts/startup/bl_ui/space_topbar.py
+++ b/release/scripts/startup/bl_ui/space_topbar.py
@@ -309,16 +309,18 @@ class TOPBAR_MT_file_new(Menu):
template_paths = bpy.utils.app_template_paths()
- # expand template paths
- app_templates = []
+ # Expand template paths.
+
+ # Use a set to avoid duplicate user/system templates.
+ # This is a corner case, but users managed to do it! T76849.
+ app_templates = set()
for path in template_paths:
for d in os.listdir(path):
if d.startswith(("__", ".")):
continue
template = os.path.join(path, d)
if os.path.isdir(template):
- # template_paths_expand.append(template)
- app_templates.append(d)
+ app_templates.add(d)
return sorted(app_templates)