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:
authorCampbell Barton <ideasman42@gmail.com>2019-09-05 21:24:14 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-09-05 21:44:12 +0300
commit23d19c2b0dd3f47339ef07be39d47c41848be39b (patch)
tree7386082c13a2cc9fbbb4d40dd6b7d6c1464e5e58
parent493fa59225cdf606fa3bb236efd1bb75f1747a98 (diff)
Fix T63653: Industry Compatible Keymap can't be saved & loaded
Replace keymap specific operator.
-rw-r--r--release/scripts/presets/keyconfig/industry_compatible.py38
-rw-r--r--release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py12
2 files changed, 6 insertions, 44 deletions
diff --git a/release/scripts/presets/keyconfig/industry_compatible.py b/release/scripts/presets/keyconfig/industry_compatible.py
index 3f9ce98c7e5..b7f069c7418 100644
--- a/release/scripts/presets/keyconfig/industry_compatible.py
+++ b/release/scripts/presets/keyconfig/industry_compatible.py
@@ -1,40 +1,6 @@
import os
import bpy
-# ------------------------------------------------------------------------------
-# Operators needed by this keymap to function
-
-# Selection Modes
-
-class IC_KEYMAP_OT_mesh_select_mode(bpy.types.Operator):
- bl_idname = "ic_keymap.mesh_select_mode"
- bl_label = "Switch to Vertex, Edge or Face Mode from any mode"
- bl_options = {'UNDO'}
-
- type: bpy.props.EnumProperty(
- name="Mode",
- items=(
- ('VERT', "Vertex", "Switcth to Vertex Mode From any Mode"),
- ('EDGE', "Edge", "Switcth to Edge Mode From any Mode"),
- ('FACE', "Face", "Switcth to Face Mode From any Mode"),
- ),
- )
-
- @classmethod
- def poll(cls, context):
- return (context.active_object is not None) and (context.object.type == 'MESH')
-
- def execute(self, context):
- bpy.ops.object.mode_set(mode='EDIT')
- bpy.ops.mesh.select_mode(type=self.type)
-
- return{'FINISHED'}
-
-
-classes = (
- IC_KEYMAP_OT_mesh_select_mode,
-)
-
# ------------------------------------------------------------------------------
# Keymap
@@ -66,8 +32,4 @@ def load():
keyconfig_init_from_data(kc, keyconfig_data)
if __name__ == "__main__":
- # XXX, no way to unregister
- for cls in classes:
- bpy.utils.register_class(cls)
-
load()
diff --git a/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py b/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py
index f9ee7aff935..d1cd27296e1 100644
--- a/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py
+++ b/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py
@@ -3385,12 +3385,12 @@ def km_object_non_modal(params):
items.extend([
- ("ic_keymap.mesh_select_mode",{"type": 'ONE', "value": 'PRESS'},
- {"properties": [("type", 'VERT')]}),
- ("ic_keymap.mesh_select_mode",{"type": 'TWO', "value": 'PRESS'},
- {"properties": [("type", 'EDGE')]}),
- ("ic_keymap.mesh_select_mode",{"type": 'THREE', "value": 'PRESS'},
- {"properties": [("type", 'FACE')]}),
+ ("object.mode_set_with_submode",{"type": 'ONE', "value": 'PRESS'},
+ {"properties": [("mode", 'EDIT'), ("mesh_select_mode", {'VERT'})]}),
+ ("object.mode_set_with_submode",{"type": 'TWO', "value": 'PRESS'},
+ {"properties": [("mode", 'EDIT'), ("mesh_select_mode", {'EDGE'})]}),
+ ("object.mode_set_with_submode",{"type": 'THREE', "value": 'PRESS'},
+ {"properties": [("mode", 'EDIT'), ("mesh_select_mode", {'FACE'})]}),
("object.mode_set",{"type": 'ONE', "value": 'PRESS'},
{"properties": [("mode", 'EDIT')]}),
("object.mode_set",{"type": 'FOUR', "value": 'PRESS'},