[Bf-blender-cvs] [87c4f309543] master: Fix T61455: Import any add-on broken

Philipp Oeser noreply at git.blender.org
Tue Feb 12 13:38:58 CET 2019


Commit: 87c4f309543a1fed5d7fe377dfdbf48ccf960380
Author: Philipp Oeser
Date:   Tue Feb 12 13:32:39 2019 +0100
Branches: master
https://developer.blender.org/rB87c4f309543a1fed5d7fe377dfdbf48ccf960380

Fix T61455: Import any add-on broken

recent split userpref.py out of wm.py (rB9ec944bbab7a) forgot to move
'module_filesystem_remove' there as well...

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

M	release/scripts/startup/bl_operators/userpref.py
M	release/scripts/startup/bl_operators/wm.py

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

diff --git a/release/scripts/startup/bl_operators/userpref.py b/release/scripts/startup/bl_operators/userpref.py
index 072899320e4..a43aac786ed 100644
--- a/release/scripts/startup/bl_operators/userpref.py
+++ b/release/scripts/startup/bl_operators/userpref.py
@@ -36,6 +36,20 @@ from bpy.props import (
 from bpy.app.translations import pgettext_tip as tip_
 
 
+def module_filesystem_remove(path_base, module_name):
+    import os
+    module_name = os.path.splitext(module_name)[0]
+    for f in os.listdir(path_base):
+        f_base = os.path.splitext(f)[0]
+        if f_base == module_name:
+            f_full = os.path.join(path_base, f)
+
+            if os.path.isdir(f_full):
+                os.rmdir(f_full)
+            else:
+                os.remove(f_full)
+
+
 class WM_OT_keyconfig_activate(Operator):
     bl_idname = "wm.keyconfig_activate"
     bl_label = "Activate Keyconfig"
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index 3c6e8196c02..dc1bbb4467c 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -144,20 +144,6 @@ def execute_context_assign(self, context):
     return operator_path_undo_return(context, data_path)
 
 
-def module_filesystem_remove(path_base, module_name):
-    import os
-    module_name = os.path.splitext(module_name)[0]
-    for f in os.listdir(path_base):
-        f_base = os.path.splitext(f)[0]
-        if f_base == module_name:
-            f_full = os.path.join(path_base, f)
-
-            if os.path.isdir(f_full):
-                os.rmdir(f_full)
-            else:
-                os.remove(f_full)
-
-
 class WM_OT_context_set_boolean(Operator):
     """Set a context value"""
     bl_idname = "wm.context_set_boolean"



More information about the Bf-blender-cvs mailing list