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:
authorCian Jinks <cjinks99@gmail.com>2021-09-22 17:09:31 +0300
committerCian Jinks <cjinks99@gmail.com>2021-09-22 17:09:31 +0300
commite734491048ef2436af41e272b8900f20785ecbe6 (patch)
tree8cee3fc068c782c0ba8cb9a581e768968c565569 /release/scripts/startup/bl_operators/userpref.py
parentf21cd0881948f6eaf16af0b354cd904df7407bda (diff)
parent204b01a254ac2445fea217e5211b2ed6aef631ca (diff)
Merge branch 'master' into soc-2021-knife-toolssoc-2021-knife-tools
Diffstat (limited to 'release/scripts/startup/bl_operators/userpref.py')
-rw-r--r--release/scripts/startup/bl_operators/userpref.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_operators/userpref.py b/release/scripts/startup/bl_operators/userpref.py
index 623bf583a74..67a02f6e1f4 100644
--- a/release/scripts/startup/bl_operators/userpref.py
+++ b/release/scripts/startup/bl_operators/userpref.py
@@ -268,7 +268,7 @@ class PREFERENCES_OT_keyconfig_export(Operator):
)
filepath: StringProperty(
subtype='FILE_PATH',
- default="keymap.py",
+ default="",
)
filter_folder: BoolProperty(
name="Filter folders",
@@ -307,7 +307,13 @@ class PREFERENCES_OT_keyconfig_export(Operator):
return {'FINISHED'}
def invoke(self, context, _event):
+ import os
wm = context.window_manager
+ if not self.filepath:
+ self.filepath = os.path.join(
+ os.path.expanduser("~"),
+ bpy.path.display_name_to_filepath(wm.keyconfigs.active.name) + ".py",
+ )
wm.fileselect_add(self)
return {'RUNNING_MODAL'}