[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36460] trunk/blender/release/scripts/ startup/bl_ui/space_userpref_keymap.py: fix [#27143] Cannot import key configuration with systemwide install

Campbell Barton ideasman42 at gmail.com
Tue May 3 10:21:12 CEST 2011


Revision: 36460
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36460
Author:   campbellbarton
Date:     2011-05-03 08:21:11 +0000 (Tue, 03 May 2011)
Log Message:
-----------
fix [#27143] Cannot import key configuration with systemwide install

Modified Paths:
--------------
    trunk/blender/release/scripts/startup/bl_ui/space_userpref_keymap.py

Modified: trunk/blender/release/scripts/startup/bl_ui/space_userpref_keymap.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_userpref_keymap.py	2011-05-03 07:51:07 UTC (rev 36459)
+++ trunk/blender/release/scripts/startup/bl_ui/space_userpref_keymap.py	2011-05-03 08:21:11 UTC (rev 36460)
@@ -555,13 +555,7 @@
 
         config_name = basename(self.filepath)
 
-        path = bpy.utils.preset_paths("keyconfig")[0]  # we need some way to tell the user and system preset path
-        print(path)
-
-        # create config folder if needed
-        if not os.path.exists(path):
-            os.mkdir(path)
-
+        path = bpy.utils.user_resource('SCRIPTS', os.path.join("presets", "keyconfig"), create=True)
         path = os.path.join(path, config_name)
 
         if self.keep_original:




More information about the Bf-blender-cvs mailing list