[#21807] Import Key Configuration problems
authorMartin Poirier <theeth@yahoo.com>
Sun, 28 Mar 2010 21:10:48 +0000 (21:10 +0000)
committerMartin Poirier <theeth@yahoo.com>
Sun, 28 Mar 2010 21:10:48 +0000 (21:10 +0000)
For some reason, __import__ doesn't recognize the cfg folder as part of the part.

Using exec("import " ... fixes that, but should be investigated further.

release/scripts/ui/space_userpref.py

index 9f86c27ca250526d5435a5c14cf1514e1716b697..4ee1f119f53626336e0b0305a0c69f4d0c085787 100644 (file)
@@ -1853,7 +1853,7 @@ class WM_OT_keyconfig_import(bpy.types.Operator):
         else:
             shutil.move(self.properties.path, path)
 
         else:
             shutil.move(self.properties.path, path)
 
-        __import__(config_name)
+        exec("import " + config_name)
 
         wm = bpy.context.manager
         wm.active_keyconfig = wm.keyconfigs[config_name]
 
         wm = bpy.context.manager
         wm.active_keyconfig = wm.keyconfigs[config_name]