Keymap: use strict format for keymap definitions
authorCampbell Barton <ideasman42@gmail.com>
Sun, 2 Dec 2018 02:58:52 +0000 (13:58 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 2 Dec 2018 03:02:03 +0000 (14:02 +1100)
Ensure we use lists for keymap items and item properties.

This means scripts can access keymap definitions from other layouts,
manipulating them without sometimes encountering a tuple that needs
to be converted into a list.

release/scripts/modules/bl_keymap_utils/io.py
release/scripts/presets/keyconfig/keymap_data/blender_default.py

index 7135d4bf7bd6e46315f2118346b3850db7803914..ee08a2d7fb0c631428a43ba3f212b78e8c0cf969 100644 (file)
@@ -227,6 +227,7 @@ def _kmi_props_setattr(kmi_props, attr, value):
 
 
 def keymap_init_from_data(km, km_items, is_modal=False):
+    assert type(km_items) is list
     new_fn = getattr(km.keymap_items, "new_modal" if is_modal else "new")
     for (kmi_idname, kmi_args, kmi_data) in km_items:
         kmi = new_fn(kmi_idname, **kmi_args)
@@ -236,6 +237,7 @@ def keymap_init_from_data(km, km_items, is_modal=False):
             kmi_props_data = kmi_data.get("properties", None)
             if kmi_props_data is not None:
                 kmi_props = kmi.properties
+                assert type(kmi_props_data) is list
                 for attr, value in kmi_props_data:
                     _kmi_props_setattr(kmi_props, attr, value)
 
index 251cf6fd9bfc12c5c8f655ec5baf09a6c3d40233..ddcd4242c4a6446fb9635f9ddd2bb226619786b8 100644 (file)
@@ -4945,13 +4945,12 @@ def km_generic_tool_annotate(params):
     return (
         "Generic Tool: Annotate",
         {"region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("gpencil.annotate", {"type": params.tool_mouse, "value": 'PRESS'},
              {"properties": [("mode", 'DRAW'), ("wait_for_input", False)]}),
             ("gpencil.annotate", {"type": params.tool_mouse, "value": 'PRESS', "ctrl": True},
              {"properties": [("mode", 'ERASER'), ("wait_for_input", False)]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -4959,13 +4958,12 @@ def km_generic_tool_annotate_line(params):
     return (
         "Generic Tool: Annotate Line",
         {"region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("gpencil.annotate", {"type": params.tool_tweak, "value": 'ANY'},
              {"properties": [("mode", 'DRAW_STRAIGHT'), ("wait_for_input", False)]}),
             ("gpencil.annotate", {"type": params.tool_mouse, "value": 'PRESS', "ctrl": True},
              {"properties": [("mode", 'ERASER'), ("wait_for_input", False)]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -4973,13 +4971,12 @@ def km_generic_tool_annotate_polygon(params):
     return (
         "Generic Tool: Annotate Polygon",
         {"region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("gpencil.annotate", {"type": params.tool_mouse, "value": 'PRESS'},
              {"properties": [("mode", 'DRAW_POLY'), ("wait_for_input", False)]}),
             ("gpencil.annotate", {"type": params.tool_mouse, "value": 'PRESS', "ctrl": True},
              {"properties": [("mode", 'ERASER'), ("wait_for_input", False)]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -4987,25 +4984,23 @@ def km_generic_tool_annotate_eraser(params):
     return (
         "Generic Tool: Annotate Eraser",
         {"region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("gpencil.annotate", {"type": params.tool_mouse, "value": 'PRESS'},
              {"properties": [("mode", 'ERASER'), ("wait_for_input", False)]}),
             ("gpencil.annotate", {"type": params.tool_mouse, "value": 'PRESS', "ctrl": True},
              {"properties": [("mode", 'ERASER'), ("wait_for_input", False)]}),
-        ),
-        },
+        ]},
     )
 
 def km_image_editor_tool_uv_cursor(params):
     return (
         "Image Editor Tool: Uv, Cursor",
         {"space_type": 'IMAGE_EDITOR', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("uv.cursor_set", {"type": params.tool_mouse, "value": 'PRESS'}, None),
             ("transform.translate", {"type": params.tool_tweak, "value": 'ANY'},
              {"properties": [("release_confirm", True), ("cursor_transform", True)]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5029,13 +5024,12 @@ def km_image_editor_tool_uv_select_circle(params):
     return (
         "Image Editor Tool: Uv, Select Circle",
         {"space_type": 'IMAGE_EDITOR', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("uv.select_circle", {"type": params.tool_mouse, "value": 'PRESS'},
              {"properties": [("deselect", False)]}),
             ("uv.select_circle", {"type": params.tool_mouse, "value": 'PRESS', "ctrl": True},
              {"properties": [("deselect", True)]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5051,11 +5045,10 @@ def km_node_editor_tool_select(params):
     return (
         "Node Tool: Select",
         {"space_type": 'NODE_EDITOR', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("node.select", {"type": params.select_mouse, "value": 'PRESS'},
              {"properties": [("extend", False)]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5063,13 +5056,12 @@ def km_node_editor_tool_select_box(params):
     return (
         "Node Tool: Select Box",
         {"space_type": 'NODE_EDITOR', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("node.select_box", {"type": params.tool_mouse, "value": 'PRESS'},
               {"properties": [("deselect", False), ("tweak", True)]}),
             ("node.select_box", {"type": params.tool_mouse, "value": 'PRESS', "ctrl": True},
               {"properties": [("deselect", True), ("tweak", True)]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5077,13 +5069,12 @@ def km_node_editor_tool_select_lasso(params):
     return (
         "Node Tool: Select Lasso",
         {"space_type": 'NODE_EDITOR', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("node.select_lasso", {"type": params.tool_mouse, "value": 'PRESS'},
               {"properties": [("deselect", False)]}),
             ("node.select_lasso", {"type": params.tool_mouse, "value": 'PRESS', "ctrl": True},
               {"properties": [("deselect", True)]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5091,10 +5082,9 @@ def km_node_editor_tool_links_cut(params):
     return (
         "Node Tool: Links Cut",
         {"space_type": 'NODE_EDITOR', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("node.links_cut", {"type": params.tool_mouse, "value": 'PRESS'}, None),
-        ),
-        },
+        ]},
     )
 
 
@@ -5103,12 +5093,11 @@ def km_3d_view_tool_object_cursor(params):
     return (
         "3D View Tool: Object, Cursor",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("view3d.cursor3d", {"type": params.tool_mouse, "value": 'PRESS'}, None),
             ("transform.translate", {"type": params.tool_tweak, "value": 'ANY'},
              {"properties": [("release_confirm", True), ("cursor_transform", True)]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5132,13 +5121,12 @@ def km_3d_view_tool_object_select_circle(params):
     return (
         "3D View Tool: Object, Select Circle",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("view3d.select_circle", {"type": params.tool_mouse, "value": 'PRESS'},
              {"properties": [("deselect", False)]}),
             ("view3d.select_circle", {"type": params.tool_mouse, "value": 'PRESS', "ctrl": True},
              {"properties": [("deselect", True)]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5154,10 +5142,9 @@ def km_3d_view_tool_object_transform(params):
     return (
         "3D View Tool: Object, Transform",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("transform.from_gizmo", {"type": params.tool_tweak, "value": 'ANY'}, None),
-        ),
-        },
+        ]},
     )
 
 
@@ -5165,11 +5152,10 @@ def km_3d_view_tool_object_move(params):
     return (
         "3D View Tool: Object, Move",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("transform.translate", {"type": params.tool_tweak, "value": 'ANY'},
              {"properties": [("release_confirm", True)]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5177,11 +5163,10 @@ def km_3d_view_tool_object_rotate(params):
     return (
         "3D View Tool: Object, Rotate",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("transform.rotate", {"type": params.tool_tweak, "value": 'ANY'},
              {"properties": [("release_confirm", True)]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5189,11 +5174,10 @@ def km_3d_view_tool_object_scale(params):
     return (
         "3D View Tool: Object, Scale",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("transform.resize", {"type": params.tool_tweak, "value": 'ANY'},
              {"properties": [("release_confirm", True)]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5201,10 +5185,9 @@ def km_3d_view_tool_object_measure(params):
     return (
         "3D View Tool: Object, Measure",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("view3d.ruler_add", {"type": params.tool_tweak, "value": 'ANY'}, None),
-        ),
-        },
+        ]},
     )
 
 
@@ -5212,10 +5195,9 @@ def km_3d_view_tool_pose_breakdowner(params):
     return (
         "3D View Tool: Pose, Breakdowner",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("pose.breakdown", {"type": params.tool_tweak, "value": 'ANY'}, None),
-        ),
-        },
+        ]},
     )
 
 
@@ -5223,10 +5205,9 @@ def km_3d_view_tool_pose_push(params):
     return (
         "3D View Tool: Pose, Push",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("pose.push", {"type": params.tool_tweak, "value": 'ANY'}, None),
-        ),
-        },
+        ]},
     )
 
 
@@ -5234,10 +5215,9 @@ def km_3d_view_tool_pose_relax(params):
     return (
         "3D View Tool: Pose, Relax",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("pose.relax", {"type": params.tool_tweak, "value": 'ANY'}, None),
-        ),
-        },
+        ]},
     )
 
 
@@ -5245,11 +5225,10 @@ def km_3d_view_tool_edit_armature_roll(params):
     return (
         "3D View Tool: Edit Armature, Roll",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("transform.transform", {"type": params.tool_tweak, "value": 'ANY'},
              {"properties": [("release_confirm", True), ("mode", 'BONE_ROLL')]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5257,11 +5236,10 @@ def km_3d_view_tool_edit_armature_bone_size(params):
     return (
         "3D View Tool: Edit Armature, Bone Size",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("transform.transform", {"type": params.tool_tweak, "value": 'ANY'},
              {"properties": [("release_confirm", True), ("mode", 'BONE_SIZE')]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5269,11 +5247,10 @@ def km_3d_view_tool_edit_armature_bone_envelope(params):
     return (
         "3D View Tool: Edit Armature, Bone Envelope",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("transform.transform", {"type": params.tool_tweak, "value": 'ANY'},
              {"properties": [("release_confirm", True), ("mode", 'BONE_ENVELOPE')]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5281,11 +5258,10 @@ def km_3d_view_tool_edit_armature_extrude(params):
     return (
         "3D View Tool: Edit Armature, Extrude",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("armature.extrude_move", {"type": params.tool_tweak, "value": 'ANY'},
              {"properties": [("TRANSFORM_OT_translate", [("release_confirm", True)])]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5293,10 +5269,9 @@ def km_3d_view_tool_edit_armature_extrude_to_cursor(params):
     return (
         "3D View Tool: Edit Armature, Extrude to Cursor",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("armature.click_extrude", {"type": params.tool_mouse, "value": 'PRESS'}, None),
-        ),
-        },
+        ]},
     )
 
 
@@ -5304,11 +5279,10 @@ def km_3d_view_tool_edit_mesh_add_cube(params):
     return (
         "3D View Tool: Edit Mesh, Add Cube",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("view3d.cursor3d", {"type": params.tool_mouse, "value": 'CLICK'}, None),
             ("mesh.primitive_cube_add_gizmo", {"type": params.tool_tweak, "value": 'ANY'}, None),
-        ),
-        },
+        ]},
     )
 
 
@@ -5316,11 +5290,10 @@ def km_3d_view_tool_edit_mesh_extrude_region(params):
     return (
         "3D View Tool: Edit Mesh, Extrude Region",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("mesh.extrude_context_move", {"type": params.tool_tweak, "value": 'ANY'},
              {"properties": [("TRANSFORM_OT_translate", [("release_confirm", True)])]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5328,11 +5301,10 @@ def km_3d_view_tool_edit_mesh_extrude_along_normals(params):
     return (
         "3D View Tool: Edit Mesh, Extrude Along Normals",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("mesh.extrude_region_shrink_fatten", {"type": params.tool_tweak, "value": 'ANY'},
              {"properties": [("TRANSFORM_OT_shrink_fatten", [("release_confirm", True)])]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5340,11 +5312,10 @@ def km_3d_view_tool_edit_mesh_extrude_individual(params):
     return (
         "3D View Tool: Edit Mesh, Extrude Individual",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("mesh.extrude_faces_move", {"type": params.tool_tweak, "value": 'ANY'},
              {"properties": [("TRANSFORM_OT_shrink_fatten", [("release_confirm", True)])]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5352,10 +5323,9 @@ def km_3d_view_tool_edit_mesh_extrude_to_cursor(params):
     return (
         "3D View Tool: Edit Mesh, Extrude to Cursor",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("mesh.dupli_extrude_cursor", {"type": params.tool_mouse, "value": 'PRESS'}, None),
-        ),
-        },
+        ]},
     )
 
 
@@ -5363,11 +5333,10 @@ def km_3d_view_tool_edit_mesh_inset_faces(params):
     return (
         "3D View Tool: Edit Mesh, Inset Faces",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("mesh.inset", {"type": params.tool_tweak, "value": 'ANY'},
              {"properties": [("release_confirm", True)]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5375,11 +5344,10 @@ def km_3d_view_tool_edit_mesh_bevel(params):
     return (
         "3D View Tool: Edit Mesh, Bevel",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("mesh.bevel", {"type": params.tool_tweak, "value": 'ANY'},
              {"properties": [("release_confirm", True)]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5387,11 +5355,10 @@ def km_3d_view_tool_edit_mesh_loop_cut(params):
     return (
         "3D View Tool: Edit Mesh, Loop Cut",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("mesh.loopcut_slide", {"type": params.tool_mouse, "value": 'PRESS'},
              {"properties": [("TRANSFORM_OT_edge_slide", [("release_confirm", True)])]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5399,10 +5366,9 @@ def km_3d_view_tool_edit_mesh_offset_edge_loop_cut(params):
     return (
         "3D View Tool: Edit Mesh, Offset Edge Loop Cut",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("mesh.offset_edge_loops_slide", {"type": params.tool_mouse, "value": 'PRESS'}, None),
-        ),
-        },
+        ]},
     )
 
 
@@ -5410,11 +5376,10 @@ def km_3d_view_tool_edit_mesh_knife(params):
     return (
         "3D View Tool: Edit Mesh, Knife",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("mesh.knife_tool", {"type": params.tool_mouse, "value": 'PRESS'},
              {"properties": [("wait_for_input", False)]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5422,10 +5387,9 @@ def km_3d_view_tool_edit_mesh_bisect(params):
     return (
         "3D View Tool: Edit Mesh, Bisect",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("mesh.bisect", {"type": params.tool_tweak, "value": 'ANY'}, None),
-        ),
-        },
+        ]},
     )
 
 
@@ -5433,14 +5397,13 @@ def km_3d_view_tool_edit_mesh_poly_build(params):
     return (
         "3D View Tool: Edit Mesh, Poly Build",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("mesh.polybuild_face_at_cursor_move", {"type": params.tool_mouse, "value": 'PRESS'},
              {"properties": [("TRANSFORM_OT_translate", [("release_confirm", True)])]}),
             ("mesh.polybuild_split_at_cursor_move", {"type": params.tool_mouse, "value": 'PRESS', "ctrl": True},
              {"properties": [("TRANSFORM_OT_translate", [("release_confirm", True)])]}),
             ("mesh.polybuild_dissolve_at_cursor", {"type": params.tool_mouse, "value": 'CLICK', "alt": True}, None),
-        ),
-        },
+        ]},
     )
 
 
@@ -5448,10 +5411,9 @@ def km_3d_view_tool_edit_mesh_spin(params):
     return (
         "3D View Tool: Edit Mesh, Spin",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("mesh.spin", {"type": params.tool_tweak, "value": 'ANY'}, None),
-        ),
-        },
+        ]},
     )
 
 
@@ -5459,11 +5421,10 @@ def km_3d_view_tool_edit_mesh_spin_duplicate(params):
     return (
         "3D View Tool: Edit Mesh, Spin (Duplicate)",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("mesh.spin", {"type": params.tool_tweak, "value": 'ANY'},
              {"properties": [("dupli", True)]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5471,11 +5432,10 @@ def km_3d_view_tool_edit_mesh_smooth(params):
     return (
         "3D View Tool: Edit Mesh, Smooth",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("mesh.vertices_smooth", {"type": params.tool_tweak, "value": 'ANY'},
              {"properties": [("factor", 0.0)]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5483,11 +5443,10 @@ def km_3d_view_tool_edit_mesh_randomize(params):
     return (
         "3D View Tool: Edit Mesh, Randomize",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("transform.vertex_random", {"type": params.tool_tweak, "value": 'ANY'},
              {"properties": [("offset", 0.0)]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5495,11 +5454,10 @@ def km_3d_view_tool_edit_mesh_edge_slide(params):
     return (
         "3D View Tool: Edit Mesh, Edge Slide",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("transform.edge_slide", {"type": params.tool_tweak, "value": 'ANY'},
              {"properties": [("release_confirm", True)]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5507,11 +5465,10 @@ def km_3d_view_tool_edit_mesh_vertex_slide(params):
     return (
         "3D View Tool: Edit Mesh, Vertex Slide",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("transform.vert_slide", {"type": params.tool_tweak, "value": 'ANY'},
              {"properties": [("release_confirm", True)]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5519,11 +5476,10 @@ def km_3d_view_tool_edit_mesh_shrink_fatten(params):
     return (
         "3D View Tool: Edit Mesh, Shrink/Fatten",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("transform.shrink_fatten", {"type": params.tool_tweak, "value": 'ANY'},
              {"properties": [("release_confirm", True)]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5531,11 +5487,10 @@ def km_3d_view_tool_edit_mesh_push_pull(params):
     return (
         "3D View Tool: Edit Mesh, Push/Pull",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("transform.push_pull", {"type": params.tool_tweak, "value": 'ANY'},
              {"properties": [("release_confirm", True)]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5543,11 +5498,10 @@ def km_3d_view_tool_edit_mesh_shear(params):
     return (
         "3D View Tool: Edit Mesh, Shear",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("transform.shear", {"type": params.tool_tweak, "value": 'ANY'},
              {"properties": [("release_confirm", True)]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5555,11 +5509,10 @@ def km_3d_view_tool_edit_mesh_to_sphere(params):
     return (
         "3D View Tool: Edit Mesh, To Sphere",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("transform.tosphere", {"type": params.tool_tweak, "value": 'ANY'},
              {"properties": [("release_confirm", True)]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5567,11 +5520,10 @@ def km_3d_view_tool_edit_mesh_rip_region(params):
     return (
         "3D View Tool: Edit Mesh, Rip Region",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("mesh.rip_move", {"type": params.tool_tweak, "value": 'ANY'},
              {"properties": [("TRANSFORM_OT_translate", [("release_confirm", True)])]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5579,11 +5531,10 @@ def km_3d_view_tool_edit_mesh_rip_edge(params):
     return (
         "3D View Tool: Edit Mesh, Rip Edge",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("mesh.rip_edge_move", {"type": params.tool_tweak, "value": 'ANY'},
              {"properties": [("TRANSFORM_OT_translate", [("release_confirm", True)])]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5591,11 +5542,10 @@ def km_3d_view_tool_edit_curve_draw(params):
     return (
         "3D View Tool: Edit Curve, Draw",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("curve.draw", {"type": params.tool_mouse, "value": 'PRESS'},
              {"properties": [("wait_for_input", False)]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5603,11 +5553,10 @@ def km_3d_view_tool_edit_curve_tilt(params):
     return (
         "3D View Tool: Edit Curve, Tilt",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("transform.tilt", {"type": params.action_tweak, "value": 'ANY'},
              {"properties": [("release_confirm", True)]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5615,11 +5564,10 @@ def km_3d_view_tool_edit_curve_extrude(params):
     return (
         "3D View Tool: Edit Curve, Extrude",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("curve.extrude_move", {"type": params.tool_tweak, "value": 'ANY'},
              {"properties": [("TRANSFORM_OT_translate", [("release_confirm", True)])]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5627,10 +5575,9 @@ def km_3d_view_tool_edit_curve_extrude_cursor(params):
     return (
         "3D View Tool: Edit Curve, Extrude Cursor",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("curve.vertex_add", {"type": params.tool_mouse, "value": 'PRESS'}, None),
-        ),
-        },
+        ]},
     )
 
 
@@ -5638,15 +5585,14 @@ def km_3d_view_tool_sculpt_box_hide(params):
     return (
         "3D View Tool: Sculpt, Box Hide",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("paint.hide_show", {"type": params.tool_tweak, "value": 'ANY'},
              {"properties": [("action", 'HIDE')]}),
             ("paint.hide_show", {"type": params.tool_tweak, "value": 'ANY', "ctrl": True},
              {"properties": [("action", 'SHOW')]}),
             ("paint.hide_show", {"type": params.select_mouse, "value": 'PRESS'},
              {"properties": [("action", 'SHOW'), ("area", 'ALL')]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5654,13 +5600,12 @@ def km_3d_view_tool_sculpt_box_mask(params):
     return (
         "3D View Tool: Sculpt, Box Mask",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("view3d.select_box", {"type": params.tool_tweak, "value": 'ANY'},
              {"properties": [("mode", 'ADD')]}),
             ("view3d.select_box", {"type": params.tool_tweak, "value": 'ANY', "ctrl": True},
              {"properties": [("mode", 'SUB')]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5668,10 +5613,9 @@ def km_3d_view_tool_paint_weight_sample_weight(params):
     return (
         "3D View Tool: Paint Weight, Sample Weight",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("paint.weight_sample", {"type": params.tool_mouse, "value": 'PRESS'}, None),
-        ),
-        },
+        ]},
     )
 
 
@@ -5679,10 +5623,9 @@ def km_3d_view_tool_paint_weight_sample_vertex_group(params):
     return (
         "3D View Tool: Paint Weight, Sample Vertex Group",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("paint.weight_sample_group", {"type": params.tool_mouse, "value": 'PRESS'}, None),
-        ),
-        },
+        ]},
     )
 
 
@@ -5690,10 +5633,9 @@ def km_3d_view_tool_paint_weight_gradient(params):
     return (
         "3D View Tool: Paint Weight, Gradient",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("paint.weight_gradient", {"type": params.tool_tweak, "value": 'ANY'}, None),
-        ),
-        },
+        ]},
     )
 
 
@@ -5701,11 +5643,10 @@ def km_3d_view_tool_gpencil_paint_line(params):
     return (
         "3D View Tool: Gpencil Paint, Line",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("gpencil.primitive", {"type": params.tool_tweak, "value": 'ANY'},
              {"properties": [("type", 'LINE'), ("wait_for_input", False)]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5713,11 +5654,10 @@ def km_3d_view_tool_gpencil_paint_box(params):
     return (
         "3D View Tool: Gpencil Paint, Box",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("gpencil.primitive", {"type": params.tool_tweak, "value": 'ANY'},
              {"properties": [("type", 'BOX'), ("wait_for_input", False)]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5725,11 +5665,10 @@ def km_3d_view_tool_gpencil_paint_circle(params):
     return (
         "3D View Tool: Gpencil Paint, Circle",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("gpencil.primitive", {"type": params.tool_tweak, "value": 'ANY'},
              {"properties": [("type", 'CIRCLE'), ("wait_for_input", False)]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5753,12 +5692,11 @@ def km_3d_view_tool_gpencil_edit_select_circle(params):
     return (
         "3D View Tool: Gpencil Edit, Select Circle",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("gpencil.select_circle", {"type": params.tool_tweak, "value": 'ANY'}, None),
             ("gpencil.select_circle", {"type": params.tool_mouse, "value": 'PRESS', "ctrl": True},
              {"properties": [("deselect", True)]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5774,11 +5712,10 @@ def km_3d_view_tool_gpencil_edit_bend(params):
     return (
         "3D View Tool: Gpencil Edit, Bend",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("transform.bend", {"type": params.tool_tweak, "value": 'ANY'},
              {"properties": [("release_confirm", True)]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5786,11 +5723,10 @@ def km_3d_view_tool_gpencil_edit_shear(params):
     return (
         "3D View Tool: Gpencil Edit, Shear",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("transform.shear", {"type": params.tool_tweak, "value": 'ANY'},
              {"properties": [("release_confirm", True)]}),
-        ),
-        },
+        ]},
     )
 
 
@@ -5798,11 +5734,10 @@ def km_3d_view_tool_gpencil_edit_to_sphere(params):
     return (
         "3D View Tool: Gpencil Edit, To Sphere",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
-        {"items": (
+        {"items": [
             ("transform.tosphere", {"type": params.tool_tweak, "value": 'ANY'},
              {"properties": [("release_confirm", True)]}),
-        ),
-        },
+        ]},
     )