Fix T61455: Import any add-on broken
authorPhilipp Oeser <info@graphics-engineer.com>
Tue, 12 Feb 2019 12:32:39 +0000 (13:32 +0100)
committerPhilipp Oeser <info@graphics-engineer.com>
Tue, 12 Feb 2019 12:33:33 +0000 (13:33 +0100)
recent split userpref.py out of wm.py (rB9ec944bbab7a) forgot to move
'module_filesystem_remove' there as well...

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

index 0728993..a43aac7 100644 (file)
@@ -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"
index 3c6e819..dc1bbb4 100644 (file)
@@ -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"