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:
Diffstat (limited to 'release/scripts/startup/bl_operators/wm.py')
-rw-r--r--release/scripts/startup/bl_operators/wm.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index bb5f3a3a2a9..6ed46191099 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -859,6 +859,38 @@ class WM_OT_keyconfig_activate(bpy.types.Operator):
bpy.utils.keyconfig_set(self.filepath)
return {'FINISHED'}
+class WM_OT_appconfig_default(bpy.types.Operator):
+ bl_idname = "wm.appconfig_default"
+ bl_label = "Default Application Configuration"
+
+ def execute(self, context):
+ import os
+
+ context.window_manager.keyconfigs.active = context.window_manager.keyconfigs.default
+
+ filepath = os.path.join(bpy.utils.preset_paths("interaction")[0], "blender.py")
+
+ if os.path.exists(filepath):
+ bpy.ops.script.execute_preset(filepath = filepath, menu_idname = "USERPREF_MT_interaction_presets")
+
+ return {'FINISHED'}
+
+class WM_OT_appconfig_activate(bpy.types.Operator):
+ bl_idname = "wm.appconfig_activate"
+ bl_label = "Activate Application Configuration"
+
+ filepath = StringProperty(name="File Path", maxlen=1024)
+
+ def execute(self, context):
+ import os
+ bpy.utils.keyconfig_set(self.filepath)
+
+ filepath = self.filepath.replace("keyconfig", "interaction")
+
+ if os.path.exists(filepath):
+ bpy.ops.script.execute_preset(filepath = filepath, menu_idname = "USERPREF_MT_interaction_presets")
+
+ return {'FINISHED'}
class WM_OT_sysinfo(bpy.types.Operator):
'''Generate System Info'''