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:
authorCampbell Barton <ideasman42@gmail.com>2011-07-18 09:41:46 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-07-18 09:41:46 +0400
commit8dd72c476e51ee457fdd98625eff7a1afc88f49e (patch)
tree2884f282fe979811042778f39a97636502c43177 /release/scripts/startup/bl_ui/space_userpref.py
parent13e82ff8e1ab8b3fb03da026325a150cb7cf4ea0 (diff)
fix [#28005] Python Add-Ons are constantly reloaded if twice in the path
Addons are checked for their timestamps and reloaded when it changes but this failed when, 2 addons had the same name since different times caused 2 reloads on every redraw. Now when duplicate addons are in the path now give a error message in the UI and print path conflict in the console and don't thrash reloading.
Diffstat (limited to 'release/scripts/startup/bl_ui/space_userpref.py')
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 6a809aefb9d..139b3205835 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -889,6 +889,16 @@ class USERPREF_PT_addons(bpy.types.Panel):
return True
return False
+ @staticmethod
+ def draw_error(layout, message):
+ lines = message.split("\n")
+ box = layout.box()
+ rowsub = box.row()
+ rowsub.label(lines[0])
+ rowsub.label(icon='ERROR')
+ for l in lines[1:]:
+ box.label(l)
+
def draw(self, context):
layout = self.layout
@@ -909,6 +919,14 @@ class USERPREF_PT_addons(bpy.types.Panel):
col = split.column()
+ # set in addon_utils.modules(...)
+ if addon_utils.error_duplicates:
+ self.draw_error(col,
+ "Multiple addons using the same name found!\n"
+ "likely a problem with the script search path.\n"
+ "(see console for details)",
+ )
+
filter = context.window_manager.addon_filter
search = context.window_manager.addon_search.lower()
support = context.window_manager.addon_support