Cleanup: double quotes for strings, replace f-string with str.format
This commit is contained in:
@@ -240,7 +240,7 @@ def _selected_keyframes_for_bone(object: Object, bone: PoseBone) -> list[float]:
|
||||
Only keys on the given pose bone are considered.
|
||||
"""
|
||||
name = bpy.utils.escape_identifier(bone.name)
|
||||
return _selected_keyframes_in_action(object, f'pose.bones["{name}"].')
|
||||
return _selected_keyframes_in_action(object, "pose.bones[\"{:s}\"].".format(name))
|
||||
|
||||
|
||||
def _selected_keyframes_for_object(object: Object) -> list[float]:
|
||||
|
||||
@@ -115,14 +115,14 @@ def DefAttributeGetterSetters(attributes_list):
|
||||
# Define the list of attributes that should be exposed as read/write properties on the class.
|
||||
@DefAttributeGetterSetters([
|
||||
# Property Name, Attribute Name, Type, Default Value, Doc-string.
|
||||
('position', 'position', 'FLOAT_VECTOR', (0.0, 0.0, 0.0), "The position of the point (in local space)."),
|
||||
('radius', 'radius', 'FLOAT', 0.01, "The radius of the point."),
|
||||
('opacity', 'opacity', 'FLOAT', 0.0, "The opacity of the point."),
|
||||
('select', '.selection', 'BOOLEAN', True, "The selection state for this point."),
|
||||
('vertex_color', 'vertex_color', 'FLOAT_COLOR', (0.0, 0.0, 0.0, 0.0),
|
||||
("position", "position", 'FLOAT_VECTOR', (0.0, 0.0, 0.0), "The position of the point (in local space)."),
|
||||
("radius", "radius", 'FLOAT', 0.01, "The radius of the point."),
|
||||
("opacity", "opacity", 'FLOAT', 0.0, "The opacity of the point."),
|
||||
("select", ".selection", 'BOOLEAN', True, "The selection state for this point."),
|
||||
("vertex_color", "vertex_color", 'FLOAT_COLOR', (0.0, 0.0, 0.0, 0.0),
|
||||
"The color for this point. The alpha value is used as a mix factor with the base color of the stroke."),
|
||||
('rotation', 'rotation', 'FLOAT', 0.0, "The rotation for this point. Used to rotate textures."),
|
||||
('delta_time', 'delta_time', 'FLOAT', 0.0, "The time delta in seconds since the start of the stroke."),
|
||||
("rotation", "rotation", 'FLOAT', 0.0, "The rotation for this point. Used to rotate textures."),
|
||||
("delta_time", "delta_time", 'FLOAT', 0.0, "The time delta in seconds since the start of the stroke."),
|
||||
])
|
||||
class GreasePencilStrokePoint(AttributeGetterSetter):
|
||||
"""
|
||||
@@ -157,16 +157,16 @@ class GreasePencilStrokePointSlice(SliceHelper):
|
||||
# Define the list of attributes that should be exposed as read/write properties on the class.
|
||||
@DefAttributeGetterSetters([
|
||||
# Property Name, Attribute Name, Type, Default Value, Doc-string.
|
||||
('cyclic', 'cyclic', 'BOOLEAN', False, "The closed state for this stroke."),
|
||||
('material_index', 'material_index', 'INT', 0, "The index of the material for this stroke."),
|
||||
('select', '.selection', 'BOOLEAN', True, "The selection state for this stroke."),
|
||||
('softness', 'softness', 'FLOAT', 0.0, "Used by the renderer to generate a soft gradient from the stroke center line to the edges."),
|
||||
('start_cap', 'start_cap', 'INT8', 0, "The type of start cap of this stroke."),
|
||||
('end_cap', 'end_cap', 'INT8', 0, "The type of end cap of this stroke."),
|
||||
('aspect_ratio', 'aspect_ratio', 'FLOAT', 1.0, "The aspect ratio (x/y) used for textures. "),
|
||||
('fill_opacity', 'fill_opacity', 'FLOAT', 0.0, "The opacity of the fill."),
|
||||
('fill_color', 'fill_color', 'FLOAT_COLOR', (0.0, 0.0, 0.0, 0.0), "The color of the fill."),
|
||||
('time_start', 'init_time', 'FLOAT', 0.0, "A time value for when the stroke was created."),
|
||||
("cyclic", "cyclic", 'BOOLEAN', False, "The closed state for this stroke."),
|
||||
("material_index", "material_index", 'INT', 0, "The index of the material for this stroke."),
|
||||
("select", ".selection", 'BOOLEAN', True, "The selection state for this stroke."),
|
||||
("softness", "softness", 'FLOAT', 0.0, "Used by the renderer to generate a soft gradient from the stroke center line to the edges."),
|
||||
("start_cap", "start_cap", 'INT8', 0, "The type of start cap of this stroke."),
|
||||
("end_cap", "end_cap", 'INT8', 0, "The type of end cap of this stroke."),
|
||||
("aspect_ratio", "aspect_ratio", 'FLOAT', 1.0, "The aspect ratio (x/y) used for textures. "),
|
||||
("fill_opacity", "fill_opacity", 'FLOAT', 0.0, "The opacity of the fill."),
|
||||
("fill_color", "fill_color", 'FLOAT_COLOR', (0.0, 0.0, 0.0, 0.0), "The color of the fill."),
|
||||
("time_start", "init_time", 'FLOAT', 0.0, "A time value for when the stroke was created."),
|
||||
])
|
||||
class GreasePencilStroke(AttributeGetterSetter):
|
||||
"""
|
||||
@@ -214,7 +214,7 @@ class GreasePencilStroke(AttributeGetterSetter):
|
||||
The curve type of this stroke.
|
||||
"""
|
||||
# Note: This is read-only which is why it is not part of the AttributeGetterSetters.
|
||||
return super()._get_attribute('curve_type', 'INT8', 0)
|
||||
return super()._get_attribute("curve_type", 'INT8', 0)
|
||||
|
||||
|
||||
class GreasePencilStrokeSlice(SliceHelper):
|
||||
|
||||
@@ -252,7 +252,7 @@ def bake_action_iter(
|
||||
if key in obj.bl_rna.properties:
|
||||
rna_path = key
|
||||
else:
|
||||
rna_path = f'["{bpy.utils.escape_identifier(key)}"]'
|
||||
rna_path = "[\"{:s}\"]".format(bpy.utils.escape_identifier(key))
|
||||
try:
|
||||
obj.keyframe_insert(rna_path, frame=frame, group=group_name)
|
||||
except TypeError:
|
||||
|
||||
@@ -372,7 +372,7 @@ def load():
|
||||
),
|
||||
)
|
||||
|
||||
if platform == 'darwin':
|
||||
if platform == "darwin":
|
||||
from bl_keymap_utils.platform_helpers import keyconfig_data_oskey_from_ctrl_for_macos
|
||||
keyconfig_data = keyconfig_data_oskey_from_ctrl_for_macos(keyconfig_data)
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ def load():
|
||||
),
|
||||
)
|
||||
|
||||
if platform == 'darwin':
|
||||
if platform == "darwin":
|
||||
from bl_keymap_utils.platform_helpers import keyconfig_data_oskey_from_ctrl_for_macos
|
||||
keyconfig_data = keyconfig_data_oskey_from_ctrl_for_macos(keyconfig_data)
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ def load():
|
||||
params = industry_compatible.Params(use_mouse_emulate_3_button=prefs.inputs.use_mouse_emulate_3_button)
|
||||
keyconfig_data = industry_compatible.generate_keymaps(params)
|
||||
|
||||
if platform == 'darwin':
|
||||
if platform == "darwin":
|
||||
from bl_keymap_utils.platform_helpers import keyconfig_data_oskey_from_ctrl_for_macos
|
||||
keyconfig_data = keyconfig_data_oskey_from_ctrl_for_macos(keyconfig_data)
|
||||
|
||||
|
||||
@@ -324,17 +324,17 @@ def _template_space_region_type_toggle(
|
||||
if toolbar_key is not None:
|
||||
items.append(
|
||||
("wm.context_toggle", toolbar_key,
|
||||
{"properties": [("data_path", 'space_data.show_region_toolbar')]})
|
||||
{"properties": [("data_path", "space_data.show_region_toolbar")]})
|
||||
)
|
||||
if sidebar_key is not None:
|
||||
items.append(
|
||||
("wm.context_toggle", sidebar_key,
|
||||
{"properties": [("data_path", 'space_data.show_region_ui')]}),
|
||||
{"properties": [("data_path", "space_data.show_region_ui")]}),
|
||||
)
|
||||
if channels_key is not None:
|
||||
items.append(
|
||||
("wm.context_toggle", channels_key,
|
||||
{"properties": [("data_path", 'space_data.show_region_channels')]}),
|
||||
{"properties": [("data_path", "space_data.show_region_channels")]}),
|
||||
)
|
||||
|
||||
return items
|
||||
@@ -527,13 +527,13 @@ def _template_items_proportional_editing(params, *, connected, toggle_data_path)
|
||||
op_menu_pie("VIEW3D_MT_proportional_editing_falloff_pie", {"type": 'O', "value": 'PRESS', "shift": True})
|
||||
if not params.legacy else
|
||||
("wm.context_cycle_enum", {"type": 'O', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("data_path", 'tool_settings.proportional_edit_falloff'), ("wrap", True)]})
|
||||
{"properties": [("data_path", "tool_settings.proportional_edit_falloff"), ("wrap", True)]})
|
||||
),
|
||||
("wm.context_toggle", {"type": 'O', "value": 'PRESS'},
|
||||
{"properties": [("data_path", toggle_data_path)]}),
|
||||
*(() if not connected else (
|
||||
("wm.context_toggle", {"type": 'O', "value": 'PRESS', "alt": True},
|
||||
{"properties": [("data_path", 'tool_settings.use_proportional_connected')]}),
|
||||
{"properties": [("data_path", "tool_settings.use_proportional_connected")]}),
|
||||
))
|
||||
]
|
||||
|
||||
@@ -718,13 +718,13 @@ def km_window(params):
|
||||
# NDOF settings
|
||||
op_panel("USERPREF_PT_ndof_settings", {"type": 'NDOF_BUTTON_MENU', "value": 'PRESS'}),
|
||||
("wm.context_scale_float", {"type": 'NDOF_BUTTON_PLUS', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'preferences.inputs.ndof_sensitivity'), ("value", 1.1)]}),
|
||||
{"properties": [("data_path", "preferences.inputs.ndof_sensitivity"), ("value", 1.1)]}),
|
||||
("wm.context_scale_float", {"type": 'NDOF_BUTTON_MINUS', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'preferences.inputs.ndof_sensitivity'), ("value", 1.0 / 1.1)]}),
|
||||
{"properties": [("data_path", "preferences.inputs.ndof_sensitivity"), ("value", 1.0 / 1.1)]}),
|
||||
("wm.context_scale_float", {"type": 'NDOF_BUTTON_PLUS', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("data_path", 'preferences.inputs.ndof_sensitivity'), ("value", 1.5)]}),
|
||||
{"properties": [("data_path", "preferences.inputs.ndof_sensitivity"), ("value", 1.5)]}),
|
||||
("wm.context_scale_float", {"type": 'NDOF_BUTTON_MINUS', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("data_path", 'preferences.inputs.ndof_sensitivity'), ("value", 2.0 / 3.0)]}),
|
||||
{"properties": [("data_path", "preferences.inputs.ndof_sensitivity"), ("value", 2.0 / 3.0)]}),
|
||||
("info.reports_display_update", {"type": 'TIMER_REPORT', "value": 'ANY', "any": True}, None),
|
||||
])
|
||||
|
||||
@@ -880,7 +880,7 @@ def km_screen_editing(params):
|
||||
if params.legacy:
|
||||
items.extend([
|
||||
("wm.context_toggle", {"type": 'F9', "value": 'PRESS', "alt": True},
|
||||
{"properties": [("data_path", 'space_data.show_region_header')]})
|
||||
{"properties": [("data_path", "space_data.show_region_header")]})
|
||||
])
|
||||
|
||||
return keymap
|
||||
@@ -1040,7 +1040,7 @@ def km_mask_editing(params):
|
||||
("mask.new", {"type": 'N', "value": 'PRESS', "alt": True}, None),
|
||||
op_menu("MASK_MT_add", {"type": 'A', "value": 'PRESS', "shift": True}),
|
||||
*_template_items_proportional_editing(
|
||||
params, connected=False, toggle_data_path='tool_settings.use_proportional_edit_mask'),
|
||||
params, connected=False, toggle_data_path="tool_settings.use_proportional_edit_mask"),
|
||||
("mask.add_vertex_slide", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True}, None),
|
||||
("mask.add_feather_vertex_slide", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True, "ctrl": True}, None),
|
||||
("mask.delete", {"type": 'X', "value": 'PRESS'}, None),
|
||||
@@ -1388,17 +1388,17 @@ def km_uv_editor(params):
|
||||
op_menu("IMAGE_MT_uvs_snap", {"type": 'S', "value": 'PRESS', "shift": True})
|
||||
),
|
||||
*_template_items_proportional_editing(
|
||||
params, connected=False, toggle_data_path='tool_settings.use_proportional_edit'),
|
||||
params, connected=False, toggle_data_path="tool_settings.use_proportional_edit"),
|
||||
|
||||
# Transform Actions.
|
||||
*_template_items_transform_actions(params, use_mirror=True, use_shear=True),
|
||||
|
||||
("wm.context_toggle", {"type": 'TAB', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("data_path", 'tool_settings.use_snap_uv')]}),
|
||||
{"properties": [("data_path", "tool_settings.use_snap_uv")]}),
|
||||
("wm.context_menu_enum", {"type": 'TAB', "value": 'PRESS', "shift": True, "ctrl": True},
|
||||
{"properties": [("data_path", 'tool_settings.snap_uv_element')]}),
|
||||
{"properties": [("data_path", "tool_settings.snap_uv_element")]}),
|
||||
("wm.context_toggle", {"type": 'ACCENT_GRAVE', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.show_gizmo')]}),
|
||||
{"properties": [("data_path", "space_data.show_gizmo")]}),
|
||||
("wm.context_toggle", {"type": 'Z', "value": 'PRESS', "alt": True, "shift": True},
|
||||
{"properties": [("data_path", "space_data.overlay.show_overlays")]}),
|
||||
*_template_items_context_menu("IMAGE_MT_uvs_context_menu", params.context_menu_event),
|
||||
@@ -1680,7 +1680,7 @@ def km_view3d(params):
|
||||
# Transform (handled by `_template_items_transform_actions`).
|
||||
# Snapping.
|
||||
("wm.context_toggle", {"type": 'TAB', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("data_path", 'tool_settings.use_snap')]}),
|
||||
{"properties": [("data_path", "tool_settings.use_snap")]}),
|
||||
op_panel(
|
||||
"VIEW3D_PT_snapping",
|
||||
{"type": 'TAB', "value": 'PRESS', "shift": True, "ctrl": True},
|
||||
@@ -1697,7 +1697,7 @@ def km_view3d(params):
|
||||
# New pie menus.
|
||||
items.extend([
|
||||
("wm.context_toggle", {"type": 'ACCENT_GRAVE', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.show_gizmo')]}),
|
||||
{"properties": [("data_path", "space_data.show_gizmo")]}),
|
||||
op_menu_pie("VIEW3D_MT_pivot_pie", {"type": 'PERIOD', "value": 'PRESS'}),
|
||||
op_menu_pie("VIEW3D_MT_orientations_pie", {"type": 'COMMA', "value": 'PRESS'}),
|
||||
op_menu_pie(
|
||||
@@ -1750,31 +1750,31 @@ def km_view3d(params):
|
||||
{"properties": [("texture_space", True)]}),
|
||||
# Old pivot.
|
||||
("wm.context_set_enum", {"type": 'COMMA', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'tool_settings.transform_pivot_point'), ("value", 'BOUNDING_BOX_CENTER')]}),
|
||||
{"properties": [("data_path", "tool_settings.transform_pivot_point"), ("value", 'BOUNDING_BOX_CENTER')]}),
|
||||
("wm.context_set_enum", {"type": 'COMMA', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'tool_settings.transform_pivot_point'), ("value", 'MEDIAN_POINT')]}),
|
||||
{"properties": [("data_path", "tool_settings.transform_pivot_point"), ("value", 'MEDIAN_POINT')]}),
|
||||
("wm.context_toggle", {"type": 'COMMA', "value": 'PRESS', "alt": True},
|
||||
{"properties": [("data_path", 'tool_settings.use_transform_pivot_point_align')]}),
|
||||
{"properties": [("data_path", "tool_settings.use_transform_pivot_point_align")]}),
|
||||
("wm.context_toggle", {"type": 'SPACE', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.show_gizmo_context')]}),
|
||||
{"properties": [("data_path", "space_data.show_gizmo_context")]}),
|
||||
("wm.context_set_enum", {"type": 'PERIOD', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'tool_settings.transform_pivot_point'), ("value", 'CURSOR')]}),
|
||||
{"properties": [("data_path", "tool_settings.transform_pivot_point"), ("value", 'CURSOR')]}),
|
||||
("wm.context_set_enum", {"type": 'PERIOD', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'tool_settings.transform_pivot_point'), ("value", 'INDIVIDUAL_ORIGINS')]}),
|
||||
{"properties": [("data_path", "tool_settings.transform_pivot_point"), ("value", 'INDIVIDUAL_ORIGINS')]}),
|
||||
("wm.context_set_enum", {"type": 'PERIOD', "value": 'PRESS', "alt": True},
|
||||
{"properties": [("data_path", 'tool_settings.transform_pivot_point'), ("value", 'ACTIVE_ELEMENT')]}),
|
||||
{"properties": [("data_path", "tool_settings.transform_pivot_point"), ("value", 'ACTIVE_ELEMENT')]}),
|
||||
# Old shading.
|
||||
("wm.context_toggle_enum", {"type": 'Z', "value": 'PRESS'},
|
||||
{"properties": [
|
||||
("data_path", 'space_data.shading.type'), ("value_1", 'WIREFRAME'), ("value_2", 'SOLID'),
|
||||
("data_path", "space_data.shading.type"), ("value_1", 'WIREFRAME'), ("value_2", 'SOLID'),
|
||||
]}),
|
||||
("wm.context_toggle_enum", {"type": 'Z', "value": 'PRESS', "shift": True},
|
||||
{"properties": [
|
||||
("data_path", 'space_data.shading.type'), ("value_1", 'RENDERED'), ("value_2", 'SOLID'),
|
||||
("data_path", "space_data.shading.type"), ("value_1", 'RENDERED'), ("value_2", 'SOLID'),
|
||||
]}),
|
||||
("wm.context_toggle_enum", {"type": 'Z', "value": 'PRESS', "alt": True},
|
||||
{"properties": [
|
||||
("data_path", 'space_data.shading.type'), ("value_1", 'MATERIAL'), ("value_2", 'SOLID'),
|
||||
("data_path", "space_data.shading.type"), ("value_1", 'MATERIAL'), ("value_2", 'SOLID'),
|
||||
]}),
|
||||
])
|
||||
|
||||
@@ -1810,7 +1810,7 @@ def km_graph_editor_generic(params):
|
||||
("anim.channels_select_filter", {"type": 'F', "value": 'PRESS', "ctrl": True}, None),
|
||||
*_template_items_hide_reveal_actions("graph.hide", "graph.reveal"),
|
||||
("wm.context_set_enum", {"type": 'TAB', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'area.type'), ("value", 'DOPESHEET_EDITOR')]}),
|
||||
{"properties": [("data_path", "area.type"), ("value", 'DOPESHEET_EDITOR')]}),
|
||||
])
|
||||
|
||||
return keymap
|
||||
@@ -1826,7 +1826,7 @@ def km_graph_editor(params):
|
||||
|
||||
items.extend([
|
||||
("wm.context_toggle", {"type": 'H', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.show_handles')]}),
|
||||
{"properties": [("data_path", "space_data.show_handles")]}),
|
||||
("graph.clickselect", {"type": params.select_mouse, "value": 'PRESS'},
|
||||
{"properties": [("deselect_all", not params.legacy)]}),
|
||||
("graph.clickselect", {"type": params.select_mouse, "value": 'PRESS', "alt": True},
|
||||
@@ -1919,7 +1919,7 @@ def km_graph_editor(params):
|
||||
("transform.rotate", {"type": 'R', "value": 'PRESS'}, None),
|
||||
("transform.resize", {"type": 'S', "value": 'PRESS'}, None),
|
||||
*_template_items_proportional_editing(
|
||||
params, connected=False, toggle_data_path='tool_settings.use_proportional_fcurve'),
|
||||
params, connected=False, toggle_data_path="tool_settings.use_proportional_fcurve"),
|
||||
("marker.add", {"type": 'M', "value": 'PRESS'}, None),
|
||||
*_template_items_context_menu("GRAPH_MT_context_menu", params.context_menu_event),
|
||||
])
|
||||
@@ -1932,11 +1932,11 @@ def km_graph_editor(params):
|
||||
items.extend([
|
||||
# Old pivot.
|
||||
("wm.context_set_enum", {"type": 'COMMA', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'space_data.pivot_point'), ("value", 'BOUNDING_BOX_CENTER')]}),
|
||||
{"properties": [("data_path", "space_data.pivot_point"), ("value", 'BOUNDING_BOX_CENTER')]}),
|
||||
("wm.context_set_enum", {"type": 'PERIOD', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'space_data.pivot_point'), ("value", 'CURSOR')]}),
|
||||
{"properties": [("data_path", "space_data.pivot_point"), ("value", 'CURSOR')]}),
|
||||
("wm.context_set_enum", {"type": 'PERIOD', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.pivot_point'), ("value", 'INDIVIDUAL_ORIGINS')]}),
|
||||
{"properties": [("data_path", "space_data.pivot_point"), ("value", 'INDIVIDUAL_ORIGINS')]}),
|
||||
])
|
||||
|
||||
if params.select_mouse == 'LEFTMOUSE' and not params.legacy:
|
||||
@@ -2049,14 +2049,14 @@ def km_image(params):
|
||||
*(
|
||||
(("wm.context_set_int",
|
||||
{"type": NUMBERS_1[i], "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'space_data.image.render_slots.active_index'), ("value", i)]})
|
||||
{"properties": [("data_path", "space_data.image.render_slots.active_index"), ("value", i)]})
|
||||
for i in range(9)
|
||||
)
|
||||
),
|
||||
("image.render_border", {"type": 'B', "value": 'PRESS', "ctrl": True}, None),
|
||||
("image.clear_render_border", {"type": 'B', "value": 'PRESS', "ctrl": True, "alt": True}, None),
|
||||
("wm.context_toggle", {"type": 'ACCENT_GRAVE', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.show_gizmo')]}),
|
||||
{"properties": [("data_path", "space_data.show_gizmo")]}),
|
||||
("wm.context_toggle", {"type": 'Z', "value": 'PRESS', "alt": True, "shift": True},
|
||||
{"properties": [("data_path", "space_data.overlay.show_overlays")]}),
|
||||
*_template_items_context_menu("IMAGE_MT_mask_context_menu", params.context_menu_event),
|
||||
@@ -2070,11 +2070,11 @@ def km_image(params):
|
||||
items.extend([
|
||||
# Old pivot.
|
||||
("wm.context_set_enum", {"type": 'COMMA', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'space_data.pivot_point'), ("value", 'CENTER')]}),
|
||||
{"properties": [("data_path", "space_data.pivot_point"), ("value", 'CENTER')]}),
|
||||
("wm.context_set_enum", {"type": 'COMMA', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.pivot_point'), ("value", 'MEDIAN')]}),
|
||||
{"properties": [("data_path", "space_data.pivot_point"), ("value", 'MEDIAN')]}),
|
||||
("wm.context_set_enum", {"type": 'PERIOD', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'space_data.pivot_point'), ("value", 'CURSOR')]}),
|
||||
{"properties": [("data_path", "space_data.pivot_point"), ("value", 'CURSOR')]}),
|
||||
|
||||
("image.view_center_cursor", {"type": 'HOME', "value": 'PRESS', "alt": True}, None),
|
||||
])
|
||||
@@ -2255,9 +2255,9 @@ def km_node_editor(params):
|
||||
{"type": params.select_mouse, "value": 'CLICK_DRAG', "alt": True},
|
||||
{"properties": [("TRANSFORM_OT_translate", [("view2d_edge_pan", True)])]}),
|
||||
("wm.context_toggle", {"type": 'TAB', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("data_path", 'tool_settings.use_snap_node')]}),
|
||||
{"properties": [("data_path", "tool_settings.use_snap_node")]}),
|
||||
("wm.context_menu_enum", {"type": 'TAB', "value": 'PRESS', "shift": True, "ctrl": True},
|
||||
{"properties": [("data_path", 'tool_settings.snap_node_element')]}),
|
||||
{"properties": [("data_path", "tool_settings.snap_node_element")]}),
|
||||
("wm.context_toggle", {"type": 'Z', "value": 'PRESS', "alt": True, "shift": True},
|
||||
{"properties": [("data_path", "space_data.overlay.show_overlays")]}),
|
||||
*_template_items_context_menu("NODE_MT_context_menu", params.context_menu_event),
|
||||
@@ -2312,7 +2312,7 @@ def km_file_browser(params):
|
||||
toolbar_key={"type": 'T', "value": 'PRESS'},
|
||||
),
|
||||
("wm.context_toggle", {"type": 'N', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'space_data.show_region_tool_props')]}),
|
||||
{"properties": [("data_path", "space_data.show_region_tool_props")]}),
|
||||
("file.parent", {"type": 'UP_ARROW', "value": 'PRESS', "alt": True}, None),
|
||||
("file.previous", {"type": 'LEFT_ARROW', "value": 'PRESS', "alt": True}, None),
|
||||
("file.previous", {"type": 'BUTTON4MOUSE', "value": 'PRESS'}, None),
|
||||
@@ -2325,7 +2325,7 @@ def km_file_browser(params):
|
||||
("file.previous", {"type": 'BACK_SPACE', "value": 'PRESS'}, None),
|
||||
("file.next", {"type": 'BACK_SPACE', "value": 'PRESS', "shift": True}, None),
|
||||
("wm.context_toggle", {"type": 'H', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'space_data.params.show_hidden')]}),
|
||||
{"properties": [("data_path", "space_data.params.show_hidden")]}),
|
||||
("file.directory_new", {"type": 'I', "value": 'PRESS'}, None),
|
||||
("file.rename", {"type": 'F2', "value": 'PRESS'}, None),
|
||||
("file.delete", {"type": 'X', "value": 'PRESS'}, None),
|
||||
@@ -2471,7 +2471,7 @@ def km_dopesheet_generic(params):
|
||||
sidebar_key={"type": 'N', "value": 'PRESS'},
|
||||
),
|
||||
("wm.context_set_enum", {"type": 'TAB', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'area.type'), ("value", 'GRAPH_EDITOR')]}),
|
||||
{"properties": [("data_path", "area.type"), ("value", 'GRAPH_EDITOR')]}),
|
||||
("action.extrapolation_type", {"type": 'E', "value": 'PRESS', "shift": True}, None),
|
||||
])
|
||||
|
||||
@@ -2582,7 +2582,7 @@ def km_dopesheet(params):
|
||||
("transform.transform", {"type": 'T', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("mode", 'TIME_SLIDE')]}),
|
||||
*_template_items_proportional_editing(
|
||||
params, connected=False, toggle_data_path='tool_settings.use_proportional_action'),
|
||||
params, connected=False, toggle_data_path="tool_settings.use_proportional_action"),
|
||||
("marker.add", {"type": 'M', "value": 'PRESS'}, None),
|
||||
("marker.camera_bind", {"type": 'B', "value": 'PRESS', "ctrl": True}, None),
|
||||
*_template_items_context_menu("DOPESHEET_MT_context_menu", params.context_menu_event),
|
||||
@@ -2759,13 +2759,13 @@ def km_text(params):
|
||||
|
||||
items.extend([
|
||||
("wm.context_cycle_int", {"type": 'WHEELUPMOUSE', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.font_size'), ("reverse", False)]}),
|
||||
{"properties": [("data_path", "space_data.font_size"), ("reverse", False)]}),
|
||||
("wm.context_cycle_int", {"type": 'WHEELDOWNMOUSE', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.font_size'), ("reverse", True)]}),
|
||||
{"properties": [("data_path", "space_data.font_size"), ("reverse", True)]}),
|
||||
("wm.context_cycle_int", {"type": 'NUMPAD_PLUS', "value": 'PRESS', "ctrl": True, "repeat": True},
|
||||
{"properties": [("data_path", 'space_data.font_size'), ("reverse", False)]}),
|
||||
{"properties": [("data_path", "space_data.font_size"), ("reverse", False)]}),
|
||||
("wm.context_cycle_int", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "ctrl": True, "repeat": True},
|
||||
{"properties": [("data_path", 'space_data.font_size'), ("reverse", True)]}),
|
||||
{"properties": [("data_path", "space_data.font_size"), ("reverse", True)]}),
|
||||
])
|
||||
|
||||
if not params.legacy:
|
||||
@@ -2907,9 +2907,9 @@ def km_sequencercommon(params):
|
||||
sidebar_key={"type": 'N', "value": 'PRESS'},
|
||||
),
|
||||
("wm.context_toggle", {"type": 'O', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("data_path", 'scene.sequence_editor.show_overlay_frame')]}),
|
||||
{"properties": [("data_path", "scene.sequence_editor.show_overlay_frame")]}),
|
||||
("wm.context_toggle_enum", {"type": 'TAB', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.view_type'), ("value_1", 'SEQUENCER'), ("value_2", 'PREVIEW')]}),
|
||||
{"properties": [("data_path", "space_data.view_type"), ("value_1", 'SEQUENCER'), ("value_2", 'PREVIEW')]}),
|
||||
("sequencer.refresh_all", {"type": 'E', "value": 'PRESS', "ctrl": True}, None),
|
||||
])
|
||||
|
||||
@@ -3029,7 +3029,7 @@ def km_sequencer(params):
|
||||
op_menu_pie("SEQUENCER_MT_view_pie", {"type": 'ACCENT_GRAVE', "value": 'PRESS'}),
|
||||
("sequencer.slip", {"type": 'S', "value": 'PRESS'}, None),
|
||||
("wm.context_set_int", {"type": 'O', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'scene.sequence_editor.overlay_frame'), ("value", 0)]}),
|
||||
{"properties": [("data_path", "scene.sequence_editor.overlay_frame"), ("value", 0)]}),
|
||||
("transform.seq_slide", {"type": 'G', "value": 'PRESS'},
|
||||
{"properties": [("view2d_edge_pan", True)]}),
|
||||
("transform.seq_slide", {"type": params.select_mouse, "value": 'CLICK_DRAG'},
|
||||
@@ -3044,7 +3044,7 @@ def km_sequencer(params):
|
||||
("sequencer.select_side_of_frame", {"type": 'RIGHT_BRACKET', "value": 'PRESS'},
|
||||
{"properties": [("side", 'RIGHT')]}),
|
||||
("wm.context_toggle", {"type": 'TAB', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("data_path", 'tool_settings.use_snap_sequencer')]}),
|
||||
{"properties": [("data_path", "tool_settings.use_snap_sequencer")]}),
|
||||
("wm.context_toggle", {"type": 'Z', "value": 'PRESS', "alt": True, "shift": True},
|
||||
{"properties": [("data_path", "space_data.show_overlays")]}),
|
||||
*_template_items_context_menu("SEQUENCER_MT_context_menu", params.context_menu_event),
|
||||
@@ -3116,7 +3116,7 @@ def km_sequencerpreview(params):
|
||||
# New pie menus.
|
||||
items.extend([
|
||||
("wm.context_toggle", {"type": 'ACCENT_GRAVE', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.show_gizmo')]}),
|
||||
{"properties": [("data_path", "space_data.show_gizmo")]}),
|
||||
op_menu_pie("SEQUENCER_MT_pivot_pie", {"type": 'PERIOD', "value": 'PRESS'}),
|
||||
("wm.context_toggle", {"type": 'Z', "value": 'PRESS', "alt": True, "shift": True},
|
||||
{"properties": [("data_path", "space_data.show_overlays")]}),
|
||||
@@ -3182,13 +3182,13 @@ def km_console(_params):
|
||||
("console.move", {"type": 'END', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("type", 'LINE_END'), ("select", True)]}),
|
||||
("wm.context_cycle_int", {"type": 'WHEELUPMOUSE', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.font_size'), ("reverse", False)]}),
|
||||
{"properties": [("data_path", "space_data.font_size"), ("reverse", False)]}),
|
||||
("wm.context_cycle_int", {"type": 'WHEELDOWNMOUSE', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.font_size'), ("reverse", True)]}),
|
||||
{"properties": [("data_path", "space_data.font_size"), ("reverse", True)]}),
|
||||
("wm.context_cycle_int", {"type": 'NUMPAD_PLUS', "value": 'PRESS', "ctrl": True, "repeat": True},
|
||||
{"properties": [("data_path", 'space_data.font_size'), ("reverse", False)]}),
|
||||
{"properties": [("data_path", "space_data.font_size"), ("reverse", False)]}),
|
||||
("wm.context_cycle_int", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "ctrl": True, "repeat": True},
|
||||
{"properties": [("data_path", 'space_data.font_size'), ("reverse", True)]}),
|
||||
{"properties": [("data_path", "space_data.font_size"), ("reverse", True)]}),
|
||||
("console.move", {"type": 'LEFT_ARROW', "value": 'PRESS', "repeat": True},
|
||||
{"properties": [("type", 'PREVIOUS_CHARACTER')]}),
|
||||
("console.move", {"type": 'LEFT_ARROW', "value": 'PRESS', "repeat": True, "shift": True},
|
||||
@@ -3262,7 +3262,7 @@ def km_clip(params):
|
||||
("clip.track_markers", {"type": 'T', "value": 'PRESS', "shift": True, "ctrl": True},
|
||||
{"properties": [("backwards", True), ("sequence", True)]}),
|
||||
("wm.context_toggle_enum", {"type": 'TAB', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'space_data.mode'), ("value_1", 'TRACKING'), ("value_2", 'MASK')]}),
|
||||
{"properties": [("data_path", "space_data.mode"), ("value_1", 'TRACKING'), ("value_2", 'MASK')]}),
|
||||
("clip.prefetch", {"type": 'P', "value": 'PRESS'}, None),
|
||||
op_menu_pie("CLIP_MT_tracking_pie", {"type": 'E', "value": 'PRESS'}),
|
||||
op_menu_pie("CLIP_MT_solving_pie", {"type": 'S', "value": 'PRESS', "shift": True}),
|
||||
@@ -3360,11 +3360,11 @@ def km_clip_editor(params):
|
||||
("clip.join_tracks", {"type": 'J', "value": 'PRESS', "ctrl": True}, None),
|
||||
("clip.lock_selection_toggle", {"type": 'L', "value": 'PRESS'}, None),
|
||||
("wm.context_toggle", {"type": 'D', "value": 'PRESS', "alt": True},
|
||||
{"properties": [("data_path", 'space_data.show_disabled')]}),
|
||||
{"properties": [("data_path", "space_data.show_disabled")]}),
|
||||
("wm.context_toggle", {"type": 'S', "value": 'PRESS', "alt": True},
|
||||
{"properties": [("data_path", 'space_data.show_marker_search')]}),
|
||||
{"properties": [("data_path", "space_data.show_marker_search")]}),
|
||||
("wm.context_toggle", {"type": 'M', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'space_data.use_mute_footage')]}),
|
||||
{"properties": [("data_path", "space_data.use_mute_footage")]}),
|
||||
("transform.translate", {"type": 'G', "value": 'PRESS'}, None),
|
||||
("transform.translate", {"type": params.select_mouse, "value": 'CLICK_DRAG'}, None),
|
||||
("transform.resize", {"type": 'S', "value": 'PRESS'}, None),
|
||||
@@ -3389,13 +3389,13 @@ def km_clip_editor(params):
|
||||
items.extend([
|
||||
# Old pivot.
|
||||
("wm.context_set_enum", {"type": 'COMMA', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'space_data.pivot_point'), ("value", 'BOUNDING_BOX_CENTER')]}),
|
||||
{"properties": [("data_path", "space_data.pivot_point"), ("value", 'BOUNDING_BOX_CENTER')]}),
|
||||
("wm.context_set_enum", {"type": 'COMMA', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.pivot_point'), ("value", 'MEDIAN_POINT')]}),
|
||||
{"properties": [("data_path", "space_data.pivot_point"), ("value", 'MEDIAN_POINT')]}),
|
||||
("wm.context_set_enum", {"type": 'PERIOD', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'space_data.pivot_point'), ("value", 'CURSOR')]}),
|
||||
{"properties": [("data_path", "space_data.pivot_point"), ("value", 'CURSOR')]}),
|
||||
("wm.context_set_enum", {"type": 'PERIOD', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.pivot_point'), ("value", 'INDIVIDUAL_ORIGINS')]}),
|
||||
{"properties": [("data_path", "space_data.pivot_point"), ("value", 'INDIVIDUAL_ORIGINS')]}),
|
||||
|
||||
("clip.view_center_cursor", {"type": 'HOME', "value": 'PRESS', "alt": True}, None),
|
||||
])
|
||||
@@ -3425,7 +3425,7 @@ def km_clip_graph_editor(params):
|
||||
("clip.graph_view_all", {"type": 'NDOF_BUTTON_FIT', "value": 'PRESS'}, None),
|
||||
("clip.graph_center_current_frame", {"type": 'NUMPAD_0', "value": 'PRESS'}, None),
|
||||
("wm.context_toggle", {"type": 'L', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'space_data.lock_time_cursor')]}),
|
||||
{"properties": [("data_path", "space_data.lock_time_cursor")]}),
|
||||
("clip.clear_track_path", {"type": 'T', "value": 'PRESS', "alt": True},
|
||||
{"properties": [("action", 'REMAINED'), ("clear_active", True)]}),
|
||||
("clip.clear_track_path", {"type": 'T', "value": 'PRESS', "shift": True},
|
||||
@@ -3581,7 +3581,7 @@ def km_animation(_params):
|
||||
items.extend([
|
||||
# Frame management.
|
||||
("wm.context_toggle", {"type": 'T', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.show_seconds')]}),
|
||||
{"properties": [("data_path", "space_data.show_seconds")]}),
|
||||
# Preview range.
|
||||
("anim.previewrange_set", {"type": 'P', "value": 'PRESS'}, None),
|
||||
("anim.previewrange_clear", {"type": 'P', "value": 'PRESS', "alt": True}, None),
|
||||
@@ -3740,9 +3740,9 @@ def _gpencil_legacy_selection(params, *, alt_select=False):
|
||||
def _gpencil_legacy_display():
|
||||
return [
|
||||
("wm.context_toggle", {"type": 'Q', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("data_path", 'space_data.overlay.use_gpencil_edit_lines')]}),
|
||||
{"properties": [("data_path", "space_data.overlay.use_gpencil_edit_lines")]}),
|
||||
("wm.context_toggle", {"type": 'Q', "value": 'PRESS', "shift": True, "alt": True},
|
||||
{"properties": [("data_path", 'space_data.overlay.use_gpencil_multiedit_line_only')]}),
|
||||
{"properties": [("data_path", "space_data.overlay.use_gpencil_multiedit_line_only")]}),
|
||||
]
|
||||
|
||||
|
||||
@@ -3824,10 +3824,10 @@ def km_gpencil_legacy_stroke_edit_mode(params):
|
||||
|
||||
# Proportional editing.
|
||||
*_template_items_proportional_editing(
|
||||
params, connected=True, toggle_data_path='tool_settings.use_proportional_edit'),
|
||||
params, connected=True, toggle_data_path="tool_settings.use_proportional_edit"),
|
||||
# Curve edit mode toggle.
|
||||
("wm.context_toggle", {"type": 'U', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'gpencil_data.use_curve_edit')]}),
|
||||
{"properties": [("data_path", "gpencil_data.use_curve_edit")]}),
|
||||
# Add menu
|
||||
("object.gpencil_add", {"type": 'A', "value": 'PRESS', "shift": True}, None),
|
||||
# Vertex group menu
|
||||
@@ -3880,10 +3880,10 @@ def km_gpencil_legacy_stroke_paint_mode(params):
|
||||
items.extend([
|
||||
# Brush strength
|
||||
("wm.radial_control", {"type": 'F', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("data_path_primary", 'tool_settings.gpencil_paint.brush.gpencil_settings.pen_strength')]}),
|
||||
{"properties": [("data_path_primary", "tool_settings.gpencil_paint.brush.gpencil_settings.pen_strength")]}),
|
||||
# Brush size
|
||||
("wm.radial_control", {"type": 'F', "value": 'PRESS'},
|
||||
{"properties": [("data_path_primary", 'tool_settings.gpencil_paint.brush.size')]}),
|
||||
{"properties": [("data_path_primary", "tool_settings.gpencil_paint.brush.size")]}),
|
||||
# Increase/Decrease brush size
|
||||
("brush.scale_size", {"type": 'LEFT_BRACKET', "value": 'PRESS', "repeat": True},
|
||||
{"properties": [("scalar", 0.9)]}),
|
||||
@@ -4046,17 +4046,17 @@ def km_gpencil_legacy_stroke_sculpt_mode(params):
|
||||
*_template_items_select_lasso(params, "gpencil.select_lasso"),
|
||||
# Selection mode
|
||||
("wm.context_toggle", {"type": 'ONE', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'scene.tool_settings.use_gpencil_select_mask_point')]}),
|
||||
{"properties": [("data_path", "scene.tool_settings.use_gpencil_select_mask_point")]}),
|
||||
("wm.context_toggle", {"type": 'TWO', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'scene.tool_settings.use_gpencil_select_mask_stroke')]}),
|
||||
{"properties": [("data_path", "scene.tool_settings.use_gpencil_select_mask_stroke")]}),
|
||||
("wm.context_toggle", {"type": 'THREE', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'scene.tool_settings.use_gpencil_select_mask_segment')]}),
|
||||
{"properties": [("data_path", "scene.tool_settings.use_gpencil_select_mask_segment")]}),
|
||||
# Brush strength
|
||||
("wm.radial_control", {"type": 'F', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("data_path_primary", 'tool_settings.gpencil_sculpt_paint.brush.strength')]}),
|
||||
{"properties": [("data_path_primary", "tool_settings.gpencil_sculpt_paint.brush.strength")]}),
|
||||
# Brush size
|
||||
("wm.radial_control", {"type": 'F', "value": 'PRESS'},
|
||||
{"properties": [("data_path_primary", 'tool_settings.gpencil_sculpt_paint.brush.size')]}),
|
||||
{"properties": [("data_path_primary", "tool_settings.gpencil_sculpt_paint.brush.size")]}),
|
||||
# Increase/Decrease brush size
|
||||
("brush.scale_size", {"type": 'LEFT_BRACKET', "value": 'PRESS', "repeat": True},
|
||||
{"properties": [("scalar", 0.9)]}),
|
||||
@@ -4286,13 +4286,13 @@ def km_gpencil_legacy_stroke_weight_mode(params):
|
||||
items.extend([
|
||||
# Brush strength
|
||||
("wm.radial_control", {"type": 'F', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("data_path_primary", 'tool_settings.gpencil_weight_paint.brush.strength')]}),
|
||||
{"properties": [("data_path_primary", "tool_settings.gpencil_weight_paint.brush.strength")]}),
|
||||
# Brush size
|
||||
("wm.radial_control", {"type": 'F', "value": 'PRESS'},
|
||||
{"properties": [("data_path_primary", 'tool_settings.gpencil_weight_paint.brush.size')]}),
|
||||
{"properties": [("data_path_primary", "tool_settings.gpencil_weight_paint.brush.size")]}),
|
||||
# Brush weight
|
||||
("wm.radial_control", {"type": 'F', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path_primary", 'tool_settings.gpencil_weight_paint.brush.weight')]}),
|
||||
{"properties": [("data_path_primary", "tool_settings.gpencil_weight_paint.brush.weight")]}),
|
||||
# Increase/Decrease brush size
|
||||
("brush.scale_size", {"type": 'LEFT_BRACKET', "value": 'PRESS', "repeat": True},
|
||||
{"properties": [("scalar", 0.9)]}),
|
||||
@@ -4414,19 +4414,19 @@ def km_gpencil_legacy_stroke_vertex_mode(params):
|
||||
*_template_items_select_lasso(params, "gpencil.select_lasso"),
|
||||
# Selection mode
|
||||
("wm.context_toggle", {"type": 'ONE', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'scene.tool_settings.use_gpencil_vertex_select_mask_point')]}),
|
||||
{"properties": [("data_path", "scene.tool_settings.use_gpencil_vertex_select_mask_point")]}),
|
||||
("wm.context_toggle", {"type": 'TWO', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'scene.tool_settings.use_gpencil_vertex_select_mask_stroke')]}),
|
||||
{"properties": [("data_path", "scene.tool_settings.use_gpencil_vertex_select_mask_stroke")]}),
|
||||
("wm.context_toggle", {"type": 'THREE', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'scene.tool_settings.use_gpencil_vertex_select_mask_segment')]}),
|
||||
{"properties": [("data_path", "scene.tool_settings.use_gpencil_vertex_select_mask_segment")]}),
|
||||
# Brush strength
|
||||
("wm.radial_control", {"type": 'F', "value": 'PRESS', "shift": True},
|
||||
{"properties": [
|
||||
("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.gpencil_settings.pen_strength'),
|
||||
("data_path_primary", "tool_settings.gpencil_vertex_paint.brush.gpencil_settings.pen_strength"),
|
||||
]}),
|
||||
# Brush size
|
||||
("wm.radial_control", {"type": 'F', "value": 'PRESS'},
|
||||
{"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.size')]}),
|
||||
{"properties": [("data_path_primary", "tool_settings.gpencil_vertex_paint.brush.size")]}),
|
||||
# Increase/Decrease brush size
|
||||
("brush.scale_size", {"type": 'LEFT_BRACKET', "value": 'PRESS', "repeat": True},
|
||||
{"properties": [("scalar", 0.9)]}),
|
||||
@@ -4476,11 +4476,11 @@ def km_gpencil_legacy_stroke_vertex_draw(_params):
|
||||
# Brush strength
|
||||
("wm.radial_control", {"type": 'F', "value": 'PRESS', "shift": True},
|
||||
{"properties": [
|
||||
("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.gpencil_settings.pen_strength'),
|
||||
("data_path_primary", "tool_settings.gpencil_vertex_paint.brush.gpencil_settings.pen_strength"),
|
||||
]}),
|
||||
# Brush size
|
||||
("wm.radial_control", {"type": 'F', "value": 'PRESS'},
|
||||
{"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.size')]}),
|
||||
{"properties": [("data_path_primary", "tool_settings.gpencil_vertex_paint.brush.size")]}),
|
||||
])
|
||||
|
||||
return keymap
|
||||
@@ -4501,11 +4501,11 @@ def km_gpencil_legacy_stroke_vertex_blur(_params):
|
||||
# Brush strength
|
||||
("wm.radial_control", {"type": 'F', "value": 'PRESS', "shift": True},
|
||||
{"properties": [
|
||||
("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.gpencil_settings.pen_strength'),
|
||||
("data_path_primary", "tool_settings.gpencil_vertex_paint.brush.gpencil_settings.pen_strength"),
|
||||
]}),
|
||||
# Brush size
|
||||
("wm.radial_control", {"type": 'F', "value": 'PRESS'},
|
||||
{"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.size')]}),
|
||||
{"properties": [("data_path_primary", "tool_settings.gpencil_vertex_paint.brush.size")]}),
|
||||
])
|
||||
|
||||
return keymap
|
||||
@@ -4528,11 +4528,11 @@ def km_gpencil_legacy_stroke_vertex_average(_params):
|
||||
# Brush strength
|
||||
("wm.radial_control", {"type": 'F', "value": 'PRESS', "shift": True},
|
||||
{"properties": [
|
||||
("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.gpencil_settings.pen_strength')],
|
||||
("data_path_primary", "tool_settings.gpencil_vertex_paint.brush.gpencil_settings.pen_strength")],
|
||||
}),
|
||||
# Brush size
|
||||
("wm.radial_control", {"type": 'F', "value": 'PRESS'},
|
||||
{"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.size')]}),
|
||||
{"properties": [("data_path_primary", "tool_settings.gpencil_vertex_paint.brush.size")]}),
|
||||
])
|
||||
|
||||
return keymap
|
||||
@@ -4553,11 +4553,11 @@ def km_gpencil_legacy_stroke_vertex_smear(_params):
|
||||
# Brush strength
|
||||
("wm.radial_control", {"type": 'F', "value": 'PRESS', "shift": True},
|
||||
{"properties": [
|
||||
("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.gpencil_settings.pen_strength'),
|
||||
("data_path_primary", "tool_settings.gpencil_vertex_paint.brush.gpencil_settings.pen_strength"),
|
||||
]}),
|
||||
# Brush size
|
||||
("wm.radial_control", {"type": 'F', "value": 'PRESS'},
|
||||
{"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.size')]}),
|
||||
{"properties": [("data_path_primary", "tool_settings.gpencil_vertex_paint.brush.size")]}),
|
||||
])
|
||||
|
||||
return keymap
|
||||
@@ -4577,7 +4577,7 @@ def km_gpencil_legacy_stroke_vertex_replace(_params):
|
||||
{"properties": [("wait_for_input", False)]}),
|
||||
# Brush size
|
||||
("wm.radial_control", {"type": 'F', "value": 'PRESS'},
|
||||
{"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.size')]}),
|
||||
{"properties": [("data_path_primary", "tool_settings.gpencil_vertex_paint.brush.size")]}),
|
||||
])
|
||||
|
||||
return keymap
|
||||
@@ -4641,10 +4641,10 @@ def km_grease_pencil_brush_stroke(_params):
|
||||
{"properties": [("mode", 'ERASE')]}),
|
||||
# Brush size
|
||||
("wm.radial_control", {"type": 'F', "value": 'PRESS'},
|
||||
{"properties": [("data_path_primary", 'tool_settings.gpencil_paint.brush.size')]}),
|
||||
{"properties": [("data_path_primary", "tool_settings.gpencil_paint.brush.size")]}),
|
||||
# Brush strength
|
||||
("wm.radial_control", {"type": 'F', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("data_path_primary", 'tool_settings.gpencil_paint.brush.strength')]}),
|
||||
{"properties": [("data_path_primary", "tool_settings.gpencil_paint.brush.strength")]}),
|
||||
# Increase/Decrease brush size
|
||||
("brush.scale_size", {"type": 'LEFT_BRACKET', "value": 'PRESS', "repeat": True},
|
||||
{"properties": [("scalar", 0.9)]}),
|
||||
@@ -4704,7 +4704,7 @@ def km_grease_pencil_edit_mode(params):
|
||||
|
||||
# Proportional editing.
|
||||
*_template_items_proportional_editing(
|
||||
params, connected=True, toggle_data_path='tool_settings.use_proportional_edit'),
|
||||
params, connected=True, toggle_data_path="tool_settings.use_proportional_edit"),
|
||||
|
||||
# Cyclical set
|
||||
("grease_pencil.cyclical_set", {"type": 'F', "value": 'PRESS'}, {"properties": [("type", "CLOSE")]}),
|
||||
@@ -4784,11 +4784,11 @@ def km_grease_pencil_sculpt_mode(params):
|
||||
"shift": True}, {"properties": [("mode", 'SMOOTH')]}),
|
||||
# Selection mode
|
||||
("wm.context_toggle", {"type": 'ONE', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'scene.tool_settings.use_gpencil_select_mask_point')]}),
|
||||
{"properties": [("data_path", "scene.tool_settings.use_gpencil_select_mask_point")]}),
|
||||
("wm.context_toggle", {"type": 'TWO', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'scene.tool_settings.use_gpencil_select_mask_stroke')]}),
|
||||
{"properties": [("data_path", "scene.tool_settings.use_gpencil_select_mask_stroke")]}),
|
||||
("wm.context_toggle", {"type": 'THREE', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'scene.tool_settings.use_gpencil_select_mask_segment')]}),
|
||||
{"properties": [("data_path", "scene.tool_settings.use_gpencil_select_mask_segment")]}),
|
||||
*_template_paint_radial_control("gpencil_sculpt_paint"),
|
||||
op_asset_shelf_popup(
|
||||
"VIEW3D_AST_brush_gpencil_sculpt",
|
||||
@@ -4824,7 +4824,7 @@ def km_grease_pencil_weight_paint(params):
|
||||
# Radial controls
|
||||
*_template_paint_radial_control("gpencil_weight_paint"),
|
||||
("wm.radial_control", {"type": 'F', "value": 'PRESS', "ctrl": True},
|
||||
radial_control_properties("gpencil_weight_paint", 'weight', 'use_unified_weight')),
|
||||
radial_control_properties("gpencil_weight_paint", "weight", "use_unified_weight")),
|
||||
# Toggle Add/Subtract for weight draw tool
|
||||
("grease_pencil.weight_toggle_direction", {"type": 'D', "value": 'PRESS'}, None),
|
||||
# Sample weight
|
||||
@@ -4877,11 +4877,11 @@ def km_grease_pencil_vertex_paint(params):
|
||||
{"properties": [("scalar", 1.0 / 0.9)]}),
|
||||
# Selection mode
|
||||
("wm.context_toggle", {"type": 'ONE', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'scene.tool_settings.use_gpencil_vertex_select_mask_point')]}),
|
||||
{"properties": [("data_path", "scene.tool_settings.use_gpencil_vertex_select_mask_point")]}),
|
||||
("wm.context_toggle", {"type": 'TWO', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'scene.tool_settings.use_gpencil_vertex_select_mask_stroke')]}),
|
||||
{"properties": [("data_path", "scene.tool_settings.use_gpencil_vertex_select_mask_stroke")]}),
|
||||
("wm.context_toggle", {"type": 'THREE', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'scene.tool_settings.use_gpencil_vertex_select_mask_segment')]}),
|
||||
{"properties": [("data_path", "scene.tool_settings.use_gpencil_vertex_select_mask_segment")]}),
|
||||
# Radial controls
|
||||
*_template_paint_radial_control("gpencil_vertex_paint"),
|
||||
# Context menu
|
||||
@@ -4956,7 +4956,7 @@ def km_object_mode(params):
|
||||
|
||||
items.extend([
|
||||
*_template_items_proportional_editing(
|
||||
params, connected=False, toggle_data_path='tool_settings.use_proportional_edit_objects'),
|
||||
params, connected=False, toggle_data_path="tool_settings.use_proportional_edit_objects"),
|
||||
*_template_items_select_actions(params, "object.select_all"),
|
||||
("object.select_more", {"type": 'NUMPAD_PLUS', "value": 'PRESS', "ctrl": True, "repeat": True}, None),
|
||||
("object.select_less", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "ctrl": True, "repeat": True}, None),
|
||||
@@ -4996,7 +4996,7 @@ def km_object_mode(params):
|
||||
("object.duplicate_move_linked", {"type": 'D', "value": 'PRESS', "alt": True}, None),
|
||||
("object.join", {"type": 'J', "value": 'PRESS', "ctrl": True}, None),
|
||||
("wm.context_toggle", {"type": 'PERIOD', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'tool_settings.use_transform_data_origin')]}),
|
||||
{"properties": [("data_path", "tool_settings.use_transform_data_origin")]}),
|
||||
("anim.keyframe_insert_menu", {"type": 'K', "value": 'PRESS'}, {"properties": [("always_prompt", True)]}),
|
||||
("anim.keyframe_delete_v3d", {"type": 'I', "value": 'PRESS', "alt": True}, None),
|
||||
("anim.keying_set_active_set", {"type": 'K', "value": 'PRESS', "shift": True}, None),
|
||||
@@ -5215,9 +5215,9 @@ def km_paint_curve(params):
|
||||
|
||||
|
||||
def radial_control_properties(paint, prop, secondary_prop, secondary_rotation=False, color=False, zoom=False):
|
||||
brush_path = 'tool_settings.' + paint + '.brush'
|
||||
unified_path = 'tool_settings.unified_paint_settings'
|
||||
rotation = 'mask_texture_slot.angle' if secondary_rotation else 'texture_slot.angle'
|
||||
brush_path = "tool_settings." + paint + ".brush"
|
||||
unified_path = "tool_settings.unified_paint_settings"
|
||||
rotation = "mask_texture_slot.angle" if secondary_rotation else "texture_slot.angle"
|
||||
return {
|
||||
"properties": [
|
||||
("data_path_primary", brush_path + '.' + prop),
|
||||
@@ -5228,7 +5228,7 @@ def radial_control_properties(paint, prop, secondary_prop, secondary_rotation=Fa
|
||||
("fill_color_path", brush_path + '.color' if color else ''),
|
||||
("fill_color_override_path", unified_path + '.color' if color else ''),
|
||||
("fill_color_override_test_path", unified_path + '.use_unified_color' if color else ''),
|
||||
("zoom_path", 'space_data.zoom' if zoom else ''),
|
||||
("zoom_path", "space_data.zoom" if zoom else ''),
|
||||
("image_id", brush_path + ''),
|
||||
("secondary_tex", secondary_rotation),
|
||||
],
|
||||
@@ -5243,23 +5243,23 @@ def _template_paint_radial_control(paint, rotation=False, secondary_rotation=Fal
|
||||
items.extend([
|
||||
("wm.radial_control", {"type": 'F', "value": 'PRESS'},
|
||||
radial_control_properties(
|
||||
paint, 'size', 'use_unified_size', secondary_rotation=secondary_rotation, color=color, zoom=zoom)),
|
||||
paint, "size", "use_unified_size", secondary_rotation=secondary_rotation, color=color, zoom=zoom)),
|
||||
("wm.radial_control", {"type": 'F', "value": 'PRESS', "shift": True},
|
||||
radial_control_properties(
|
||||
paint, 'strength', 'use_unified_strength', secondary_rotation=secondary_rotation, color=color)),
|
||||
paint, "strength", "use_unified_strength", secondary_rotation=secondary_rotation, color=color)),
|
||||
])
|
||||
|
||||
if rotation:
|
||||
items.extend([
|
||||
("wm.radial_control", {"type": 'F', "value": 'PRESS', "ctrl": True},
|
||||
radial_control_properties(paint, 'texture_slot.angle', None, color=color)),
|
||||
radial_control_properties(paint, "texture_slot.angle", None, color=color)),
|
||||
])
|
||||
|
||||
if secondary_rotation:
|
||||
items.extend([
|
||||
("wm.radial_control", {"type": 'F', "value": 'PRESS', "ctrl": True, "alt": True},
|
||||
radial_control_properties(
|
||||
paint, 'mask_texture_slot.angle', None, secondary_rotation=secondary_rotation, color=color)),
|
||||
paint, "mask_texture_slot.angle", None, secondary_rotation=secondary_rotation, color=color)),
|
||||
])
|
||||
|
||||
return items
|
||||
@@ -5311,13 +5311,13 @@ def _template_view3d_paint_mask_select_loop(params):
|
||||
return [
|
||||
("paint.face_select_loop",
|
||||
{"type": params.select_mouse, "value": 'PRESS', "alt": True},
|
||||
{"properties": [('extend', False), ('select', True)]}),
|
||||
{"properties": [("extend", False), ("select", True)]}),
|
||||
("paint.face_select_loop",
|
||||
{"type": params.select_mouse, "value": 'PRESS', "alt": True, "shift": True},
|
||||
{"properties": [('extend', True), ('select', True)]}),
|
||||
{"properties": [("extend", True), ("select", True)]}),
|
||||
("paint.face_select_loop",
|
||||
{"type": params.select_mouse, "value": 'PRESS', "alt": True, "shift": True, "ctrl": True},
|
||||
{"properties": [('extend', True), ('select', False)]}),
|
||||
{"properties": [("extend", True), ("select", False)]}),
|
||||
]
|
||||
|
||||
|
||||
@@ -5476,11 +5476,11 @@ def km_image_paint(params):
|
||||
("brush.stencil_control", {"type": 'RIGHTMOUSE', "value": 'PRESS', "ctrl": True, "alt": True},
|
||||
{"properties": [("mode", 'ROTATION'), ("texmode", 'SECONDARY')]}),
|
||||
("wm.context_toggle", {"type": 'ONE', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'image_paint_object.data.use_paint_mask')]}),
|
||||
{"properties": [("data_path", "image_paint_object.data.use_paint_mask")]}),
|
||||
("wm.context_toggle", {"type": 'S', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("data_path", 'tool_settings.image_paint.brush.use_smooth_stroke')]}),
|
||||
{"properties": [("data_path", "tool_settings.image_paint.brush.use_smooth_stroke")]}),
|
||||
("wm.context_menu_enum", {"type": 'E', "value": 'PRESS', "alt": True},
|
||||
{"properties": [("data_path", 'tool_settings.image_paint.brush.stroke_method')]}),
|
||||
{"properties": [("data_path", "tool_settings.image_paint.brush.stroke_method")]}),
|
||||
*_template_items_context_panel("VIEW3D_PT_paint_texture_context_menu", params.context_menu_event),
|
||||
op_asset_shelf_popup(
|
||||
"VIEW3D_AST_brush_texture_paint",
|
||||
@@ -5533,11 +5533,11 @@ def km_vertex_paint(params):
|
||||
("brush.stencil_control", {"type": 'RIGHTMOUSE', "value": 'PRESS', "ctrl": True, "alt": True},
|
||||
{"properties": [("mode", 'ROTATION'), ("texmode", 'SECONDARY')]}),
|
||||
("wm.context_toggle", {"type": 'ONE', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'vertex_paint_object.data.use_paint_mask')]}),
|
||||
{"properties": [("data_path", "vertex_paint_object.data.use_paint_mask")]}),
|
||||
("wm.context_toggle", {"type": 'S', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("data_path", 'tool_settings.vertex_paint.brush.use_smooth_stroke')]}),
|
||||
{"properties": [("data_path", "tool_settings.vertex_paint.brush.use_smooth_stroke")]}),
|
||||
("wm.context_menu_enum", {"type": 'E', "value": 'PRESS', "alt": True},
|
||||
{"properties": [("data_path", 'tool_settings.vertex_paint.brush.stroke_method')]}),
|
||||
{"properties": [("data_path", "tool_settings.vertex_paint.brush.stroke_method")]}),
|
||||
("paint.face_vert_reveal", {"type": 'H', "value": 'PRESS', "alt": True}, None),
|
||||
*_template_items_context_panel("VIEW3D_PT_paint_vertex_context_menu", params.context_menu_event),
|
||||
op_asset_shelf_popup(
|
||||
@@ -5551,7 +5551,7 @@ def km_vertex_paint(params):
|
||||
else:
|
||||
items.append(
|
||||
("wm.context_toggle", {"type": 'TWO', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'vertex_paint_object.data.use_paint_mask_vertex')]})
|
||||
{"properties": [("data_path", "vertex_paint_object.data.use_paint_mask_vertex")]})
|
||||
)
|
||||
|
||||
return keymap
|
||||
@@ -5587,17 +5587,17 @@ def km_weight_paint(params):
|
||||
{"properties": [("scalar", 1.0 / 0.9)]}),
|
||||
*_template_paint_radial_control("weight_paint"),
|
||||
("wm.radial_control", {"type": 'F', "value": 'PRESS', "ctrl": True},
|
||||
radial_control_properties("weight_paint", 'weight', 'use_unified_weight')),
|
||||
radial_control_properties("weight_paint", "weight", "use_unified_weight")),
|
||||
("wm.context_menu_enum", {"type": 'E', "value": 'PRESS', "alt": True},
|
||||
{"properties": [("data_path", 'tool_settings.vertex_paint.brush.stroke_method')]}),
|
||||
{"properties": [("data_path", "tool_settings.vertex_paint.brush.stroke_method")]}),
|
||||
("wm.context_toggle", {"type": 'ONE', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'weight_paint_object.data.use_paint_mask')]}),
|
||||
{"properties": [("data_path", "weight_paint_object.data.use_paint_mask")]}),
|
||||
("wm.context_toggle", {"type": 'TWO', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'weight_paint_object.data.use_paint_mask_vertex')]}),
|
||||
{"properties": [("data_path", "weight_paint_object.data.use_paint_mask_vertex")]}),
|
||||
("wm.context_toggle", {"type": 'THREE', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'weight_paint_object.data.use_paint_bone_selection')]}),
|
||||
{"properties": [("data_path", "weight_paint_object.data.use_paint_bone_selection")]}),
|
||||
("wm.context_toggle", {"type": 'S', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("data_path", 'tool_settings.weight_paint.brush.use_smooth_stroke')]}),
|
||||
{"properties": [("data_path", "tool_settings.weight_paint.brush.use_smooth_stroke")]}),
|
||||
op_menu_pie("VIEW3D_MT_wpaint_vgroup_lock_pie", {"type": 'K', "value": 'PRESS'}),
|
||||
("paint.face_vert_reveal", {"type": 'H', "value": 'PRESS', "alt": True}, None),
|
||||
*_template_items_context_panel("VIEW3D_PT_paint_weight_context_menu", params.context_menu_event),
|
||||
@@ -5797,9 +5797,9 @@ def km_sculpt(params):
|
||||
{"properties": [("mode", 'SURFACE')]}),
|
||||
# Menus
|
||||
("wm.context_menu_enum", {"type": 'E', "value": 'PRESS', "alt": True},
|
||||
{"properties": [("data_path", 'tool_settings.sculpt.brush.stroke_method')]}),
|
||||
{"properties": [("data_path", "tool_settings.sculpt.brush.stroke_method")]}),
|
||||
("wm.context_toggle", {"type": 'S', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("data_path", 'tool_settings.sculpt.brush.use_smooth_stroke')]}),
|
||||
{"properties": [("data_path", "tool_settings.sculpt.brush.use_smooth_stroke")]}),
|
||||
op_menu_pie("VIEW3D_MT_sculpt_mask_edit_pie", {"type": 'A', "value": 'PRESS'}),
|
||||
op_menu_pie("VIEW3D_MT_sculpt_automasking_pie", {"type": 'A', "alt": True, "value": 'PRESS'}),
|
||||
op_menu_pie("VIEW3D_MT_sculpt_face_sets_edit_pie", {"type": 'W', "value": 'PRESS', "alt": True}),
|
||||
@@ -6031,7 +6031,7 @@ def km_edit_mesh(params):
|
||||
op_menu("VIEW3D_MT_edit_mesh_normals", {"type": 'N', "value": 'PRESS', "alt": True}),
|
||||
("object.vertex_group_remove_from", {"type": 'G', "value": 'PRESS', "ctrl": True, "alt": True}, None),
|
||||
*_template_items_proportional_editing(
|
||||
params, connected=True, toggle_data_path='tool_settings.use_proportional_edit'),
|
||||
params, connected=True, toggle_data_path="tool_settings.use_proportional_edit"),
|
||||
*_template_items_context_menu("VIEW3D_MT_edit_mesh_context_menu", params.context_menu_event),
|
||||
])
|
||||
|
||||
@@ -6173,7 +6173,7 @@ def km_edit_metaball(params):
|
||||
*_template_items_select_actions(params, "mball.select_all"),
|
||||
("mball.select_similar", {"type": 'G', "value": 'PRESS', "shift": True}, None),
|
||||
*_template_items_proportional_editing(
|
||||
params, connected=True, toggle_data_path='tool_settings.use_proportional_edit'),
|
||||
params, connected=True, toggle_data_path="tool_settings.use_proportional_edit"),
|
||||
*_template_items_context_menu("VIEW3D_MT_edit_metaball_context_menu", params.context_menu_event),
|
||||
])
|
||||
|
||||
@@ -6200,7 +6200,7 @@ def km_edit_lattice(params):
|
||||
("lattice.flip", {"type": 'F', "value": 'PRESS', "alt": True}, None),
|
||||
op_menu("VIEW3D_MT_hook", {"type": 'H', "value": 'PRESS', "ctrl": True}),
|
||||
*_template_items_proportional_editing(
|
||||
params, connected=False, toggle_data_path='tool_settings.use_proportional_edit'),
|
||||
params, connected=False, toggle_data_path="tool_settings.use_proportional_edit"),
|
||||
*_template_items_context_menu("VIEW3D_MT_edit_lattice_context_menu", params.context_menu_event),
|
||||
])
|
||||
|
||||
@@ -6231,9 +6231,9 @@ def km_edit_particle(params):
|
||||
("particle.brush_edit", {"type": 'LEFTMOUSE', "value": 'PRESS'}, None),
|
||||
("particle.brush_edit", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True}, None),
|
||||
("wm.radial_control", {"type": 'F', "value": 'PRESS'},
|
||||
{"properties": [("data_path_primary", 'tool_settings.particle_edit.brush.size')]}),
|
||||
{"properties": [("data_path_primary", "tool_settings.particle_edit.brush.size")]}),
|
||||
("wm.radial_control", {"type": 'F', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("data_path_primary", 'tool_settings.particle_edit.brush.strength')]}),
|
||||
{"properties": [("data_path_primary", "tool_settings.particle_edit.brush.strength")]}),
|
||||
("particle.weight_set", {"type": 'K', "value": 'PRESS', "shift": True}, None),
|
||||
*(
|
||||
(("wm.context_set_enum",
|
||||
@@ -6243,7 +6243,7 @@ def km_edit_particle(params):
|
||||
)
|
||||
),
|
||||
*_template_items_proportional_editing(
|
||||
params, connected=False, toggle_data_path='tool_settings.use_proportional_edit'),
|
||||
params, connected=False, toggle_data_path="tool_settings.use_proportional_edit"),
|
||||
*_template_items_context_menu("VIEW3D_MT_particle_context_menu", params.context_menu_event),
|
||||
*_template_items_transform_actions(params),
|
||||
])
|
||||
@@ -6405,7 +6405,7 @@ def km_edit_curve_legacy(params):
|
||||
("object.vertex_parent_set", {"type": 'P', "value": 'PRESS', "ctrl": True}, None),
|
||||
op_menu("VIEW3D_MT_hook", {"type": 'H', "value": 'PRESS', "ctrl": True}),
|
||||
*_template_items_proportional_editing(
|
||||
params, connected=True, toggle_data_path='tool_settings.use_proportional_edit'),
|
||||
params, connected=True, toggle_data_path="tool_settings.use_proportional_edit"),
|
||||
*_template_items_context_menu("VIEW3D_MT_edit_curve_context_menu", params.context_menu_event),
|
||||
])
|
||||
|
||||
@@ -6436,7 +6436,7 @@ def km_edit_curves(params):
|
||||
("curves.select_more", {"type": 'NUMPAD_PLUS', "value": 'PRESS', "ctrl": True, "repeat": True}, None),
|
||||
("curves.select_less", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "ctrl": True, "repeat": True}, None),
|
||||
*_template_items_proportional_editing(
|
||||
params, connected=True, toggle_data_path='tool_settings.use_proportional_edit'),
|
||||
params, connected=True, toggle_data_path="tool_settings.use_proportional_edit"),
|
||||
("curves.tilt_clear", {"type": 'T', "value": 'PRESS', "alt": True}, None),
|
||||
op_tool_optional(
|
||||
("transform.tilt", {"type": 'T', "value": 'PRESS', "ctrl": True}, None),
|
||||
@@ -7689,7 +7689,7 @@ def km_3d_view_tool_scale(params):
|
||||
|
||||
|
||||
def km_3d_view_tool_shear(params):
|
||||
# Don't use 'tool_maybe_tweak_value' since we would loose tweak direction support.
|
||||
# Don't use "tool_maybe_tweak_value" since we would loose tweak direction support.
|
||||
return (
|
||||
"3D View Tool: Shear",
|
||||
{"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
|
||||
@@ -9426,6 +9426,7 @@ def generate_keymaps(params=None):
|
||||
km_3d_view_tool_paint_grease_pencil_eyedropper(params),
|
||||
]
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Refactoring (Testing Only)
|
||||
#
|
||||
|
||||
@@ -205,13 +205,13 @@ def km_window(params):
|
||||
# NDOF settings
|
||||
op_panel("USERPREF_PT_ndof_settings", {"type": 'NDOF_BUTTON_MENU', "value": 'PRESS'}),
|
||||
("wm.context_scale_float", {"type": 'NDOF_BUTTON_PLUS', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'preferences.inputs.ndof_sensitivity'), ("value", 1.1)]}),
|
||||
{"properties": [("data_path", "preferences.inputs.ndof_sensitivity"), ("value", 1.1)]}),
|
||||
("wm.context_scale_float", {"type": 'NDOF_BUTTON_MINUS', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'preferences.inputs.ndof_sensitivity'), ("value", 1.0 / 1.1)]}),
|
||||
{"properties": [("data_path", "preferences.inputs.ndof_sensitivity"), ("value", 1.0 / 1.1)]}),
|
||||
("wm.context_scale_float", {"type": 'NDOF_BUTTON_PLUS', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("data_path", 'preferences.inputs.ndof_sensitivity'), ("value", 1.5)]}),
|
||||
{"properties": [("data_path", "preferences.inputs.ndof_sensitivity"), ("value", 1.5)]}),
|
||||
("wm.context_scale_float", {"type": 'NDOF_BUTTON_MINUS', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("data_path", 'preferences.inputs.ndof_sensitivity'), ("value", 2.0 / 3.0)]}),
|
||||
{"properties": [("data_path", "preferences.inputs.ndof_sensitivity"), ("value", 2.0 / 3.0)]}),
|
||||
("info.reports_display_update", {"type": 'TIMER_REPORT', "value": 'ANY', "any": True}, None),
|
||||
])
|
||||
|
||||
@@ -610,9 +610,9 @@ def km_uv_editor(params):
|
||||
op_menu_pie("IMAGE_MT_uvs_snap_pie", {"type": 'X', "value": 'PRESS', "shift": True}),
|
||||
*_template_items_context_menu("IMAGE_MT_uvs_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS'}),
|
||||
("wm.context_toggle", {"type": 'B', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'tool_settings.use_proportional_edit')]}),
|
||||
{"properties": [("data_path", "tool_settings.use_proportional_edit")]}),
|
||||
("wm.context_toggle", {"type": 'X', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'tool_settings.use_snap')]}),
|
||||
{"properties": [("data_path", "tool_settings.use_snap")]}),
|
||||
# Tools
|
||||
op_tool_cycle("builtin.select_box", {"type": 'Q', "value": 'PRESS'}),
|
||||
op_tool_cycle("builtin.move", {"type": 'W', "value": 'PRESS'}),
|
||||
@@ -637,11 +637,11 @@ def km_view3d_generic(_params):
|
||||
|
||||
items.extend([
|
||||
("wm.context_toggle", {"type": 'LEFT_BRACKET', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.show_region_toolbar')]}),
|
||||
{"properties": [("data_path", "space_data.show_region_toolbar")]}),
|
||||
("wm.context_toggle", {"type": 'RIGHT_BRACKET', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.show_region_ui')]}),
|
||||
{"properties": [("data_path", "space_data.show_region_ui")]}),
|
||||
("wm.context_toggle", {"type": 'SPACE', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("data_path", 'space_data.show_region_asset_shelf')]}),
|
||||
{"properties": [("data_path", "space_data.show_region_asset_shelf")]}),
|
||||
])
|
||||
|
||||
return keymap
|
||||
@@ -771,7 +771,7 @@ def km_view3d(params):
|
||||
op_menu_pie("VIEW3D_MT_orientations_pie", {"type": 'COMMA', "value": 'PRESS'}),
|
||||
("view3d.toggle_xray", {"type": 'X', "value": 'PRESS', "alt": True}, None),
|
||||
("wm.context_toggle", {"type": 'X', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'tool_settings.use_snap')]}),
|
||||
{"properties": [("data_path", "tool_settings.use_snap")]}),
|
||||
])
|
||||
|
||||
return keymap
|
||||
@@ -789,7 +789,7 @@ def km_mask_editing(params):
|
||||
("wm.search_menu", {"type": 'TAB', "value": 'PRESS'}, None),
|
||||
("mask.new", {"type": 'N', "value": 'PRESS', "alt": True}, None),
|
||||
("wm.context_toggle", {"type": 'B', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'tool_settings.use_proportional_edit_mask')]}),
|
||||
{"properties": [("data_path", "tool_settings.use_proportional_edit_mask")]}),
|
||||
("mask.add_vertex_slide", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True}, None),
|
||||
("mask.add_feather_vertex_slide", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True, "ctrl": True}, None),
|
||||
("mask.delete", {"type": 'BACK_SPACE', "value": 'PRESS'}, None),
|
||||
@@ -908,9 +908,9 @@ def km_graph_editor(params):
|
||||
items.extend([
|
||||
("wm.search_menu", {"type": 'TAB', "value": 'PRESS'}, None),
|
||||
("wm.context_toggle", {"type": 'LEFT_BRACKET', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.show_region_channels')]}),
|
||||
{"properties": [("data_path", "space_data.show_region_channels")]}),
|
||||
("wm.context_toggle", {"type": 'RIGHT_BRACKET', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.show_region_ui')]}),
|
||||
{"properties": [("data_path", "space_data.show_region_ui")]}),
|
||||
*_template_items_animation(),
|
||||
("graph.cursor_set", {"type": 'RIGHTMOUSE', "value": 'PRESS', "ctrl": True}, None),
|
||||
("graph.clickselect", {"type": 'LEFTMOUSE', "value": 'PRESS'},
|
||||
@@ -971,9 +971,9 @@ def km_graph_editor(params):
|
||||
("transform.rotate", {"type": 'E', "value": 'PRESS'}, None),
|
||||
("transform.resize", {"type": 'R', "value": 'PRESS'}, None),
|
||||
("wm.context_toggle", {"type": 'B', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'tool_settings.use_proportional_fcurve')]}),
|
||||
{"properties": [("data_path", "tool_settings.use_proportional_fcurve")]}),
|
||||
("wm.context_menu_enum", {"type": 'X', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'space_data.auto_snap')]}),
|
||||
{"properties": [("data_path", "space_data.auto_snap")]}),
|
||||
("marker.add", {"type": 'M', "value": 'PRESS'}, None),
|
||||
op_menu_pie("GRAPH_MT_snap_pie", {"type": 'X', "value": 'PRESS', "shift": True}),
|
||||
])
|
||||
@@ -992,9 +992,9 @@ def km_image_generic(params):
|
||||
items.extend([
|
||||
op_panel("TOPBAR_PT_name", {"type": 'RET', "value": 'PRESS'}, [("keep_open", False)]),
|
||||
("wm.context_toggle", {"type": 'LEFT_BRACKET', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.show_region_toolbar')]}),
|
||||
{"properties": [("data_path", "space_data.show_region_toolbar")]}),
|
||||
("wm.context_toggle", {"type": 'RIGHT_BRACKET', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.show_region_ui')]}),
|
||||
{"properties": [("data_path", "space_data.show_region_ui")]}),
|
||||
("wm.search_menu", {"type": 'TAB', "value": 'PRESS'}, None),
|
||||
("image.new", {"type": 'N', "value": 'PRESS', "alt": True}, None),
|
||||
("image.open", {"type": 'O', "value": 'PRESS', "alt": True}, None),
|
||||
@@ -1087,9 +1087,9 @@ def km_node_generic(_params):
|
||||
("wm.search_single_menu", {"type": 'TAB', "value": 'PRESS'},
|
||||
{"properties": [("menu_idname", 'NODE_MT_add')]}),
|
||||
("wm.context_toggle", {"type": 'LEFT_BRACKET', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.show_region_toolbar')]}),
|
||||
{"properties": [("data_path", "space_data.show_region_toolbar")]}),
|
||||
("wm.context_toggle", {"type": 'RIGHT_BRACKET', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.show_region_ui')]}),
|
||||
{"properties": [("data_path", "space_data.show_region_ui")]}),
|
||||
])
|
||||
|
||||
return keymap
|
||||
@@ -1179,7 +1179,7 @@ def km_node_editor(params):
|
||||
("node.move_detach_links_release", {"type": params.action_mouse, "value": 'CLICK_DRAG', "alt": True}, None),
|
||||
("node.move_detach_links", {"type": 'LEFTMOUSE', "value": 'CLICK_DRAG', "alt": True}, None),
|
||||
("wm.context_toggle", {"type": 'X', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'tool_settings.use_snap_node')]}),
|
||||
{"properties": [("data_path", "tool_settings.use_snap_node")]}),
|
||||
])
|
||||
|
||||
return keymap
|
||||
@@ -1228,7 +1228,7 @@ def km_file_browser(params):
|
||||
|
||||
items.extend([
|
||||
("wm.context_toggle", {"type": 'RIGHT_BRACKET', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.show_region_tool_props')]}),
|
||||
{"properties": [("data_path", "space_data.show_region_tool_props")]}),
|
||||
("file.parent", {"type": 'UP_ARROW', "value": 'PRESS', "alt": True}, None),
|
||||
("file.parent", {"type": 'UP_ARROW', "value": 'PRESS', "ctrl": True}, None),
|
||||
("file.previous", {"type": 'LEFT_ARROW', "value": 'PRESS', "alt": True}, None),
|
||||
@@ -1243,13 +1243,13 @@ def km_file_browser(params):
|
||||
("file.previous", {"type": 'BACK_SPACE', "value": 'PRESS'}, None),
|
||||
("file.next", {"type": 'BACK_SPACE', "value": 'PRESS', "shift": True}, None),
|
||||
("wm.context_toggle", {"type": 'H', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'space_data.params.show_hidden')]}),
|
||||
{"properties": [("data_path", "space_data.params.show_hidden")]}),
|
||||
("file.directory_new", {"type": 'I', "value": 'PRESS'}, None),
|
||||
("file.rename", {"type": 'F2', "value": 'PRESS'}, None),
|
||||
("file.delete", {"type": 'DEL', "value": 'PRESS'}, None),
|
||||
("file.smoothscroll", {"type": 'TIMER1', "value": 'ANY', "any": True}, None),
|
||||
("wm.context_toggle", {"type": 'T', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'space_data.show_region_toolbar')]}),
|
||||
{"properties": [("data_path", "space_data.show_region_toolbar")]}),
|
||||
("file.bookmark_add", {"type": 'B', "value": 'PRESS', "ctrl": True}, None),
|
||||
("file.filenum", {"type": 'NUMPAD_PLUS', "value": 'PRESS', "repeat": True},
|
||||
{"properties": [("increment", 1)]}),
|
||||
@@ -1374,9 +1374,9 @@ def km_dopesheet_generic(params):
|
||||
op_panel("TOPBAR_PT_name", {"type": 'RET', "value": 'PRESS'}, [("keep_open", False)]),
|
||||
("wm.search_menu", {"type": 'TAB', "value": 'PRESS'}, None),
|
||||
("wm.context_toggle", {"type": 'LEFT_BRACKET', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.show_region_channels')]}),
|
||||
{"properties": [("data_path", "space_data.show_region_channels")]}),
|
||||
("wm.context_toggle", {"type": 'RIGHT_BRACKET', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.show_region_ui')]}),
|
||||
{"properties": [("data_path", "space_data.show_region_ui")]}),
|
||||
])
|
||||
|
||||
return keymap
|
||||
@@ -1437,7 +1437,7 @@ def km_dopesheet(params):
|
||||
("action.select_linked", {"type": 'L', "value": 'PRESS', "ctrl": True}, None),
|
||||
("action.frame_jump", {"type": 'G', "value": 'PRESS', "ctrl": True}, None),
|
||||
("wm.context_menu_enum", {"type": 'X', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'space_data.auto_snap')]}),
|
||||
{"properties": [("data_path", "space_data.auto_snap")]}),
|
||||
op_menu_pie("DOPESHEET_MT_snap_pie", {"type": 'X', "value": 'PRESS', "shift": True}),
|
||||
*_template_items_context_menu("DOPESHEET_MT_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS'}),
|
||||
op_menu("DOPESHEET_MT_delete", {"type": 'BACK_SPACE', "value": 'PRESS'}),
|
||||
@@ -1468,7 +1468,7 @@ def km_dopesheet(params):
|
||||
("transform.transform", {"type": 'T', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("mode", 'TIME_SLIDE')]}),
|
||||
("wm.context_toggle", {"type": 'B', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'tool_settings.use_proportional_action')]}),
|
||||
{"properties": [("data_path", "tool_settings.use_proportional_action")]}),
|
||||
("marker.add", {"type": 'M', "value": 'PRESS'}, None),
|
||||
("anim.start_frame_set", {"type": 'LEFT_ARROW', "value": 'PRESS', "ctrl": True}, None),
|
||||
("anim.end_frame_set", {"type": 'RIGHT_ARROW', "value": 'PRESS', "ctrl": True}, None),
|
||||
@@ -1488,9 +1488,9 @@ def km_nla_generic(params):
|
||||
items.extend([
|
||||
op_panel("TOPBAR_PT_name", {"type": 'RET', "value": 'PRESS'}, [("keep_open", False)]),
|
||||
("wm.context_toggle", {"type": 'LEFT_BRACKET', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.show_region_channels')]}),
|
||||
{"properties": [("data_path", "space_data.show_region_channels")]}),
|
||||
("wm.context_toggle", {"type": 'RIGHT_BRACKET', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.show_region_ui')]}),
|
||||
{"properties": [("data_path", "space_data.show_region_ui")]}),
|
||||
("wm.search_menu", {"type": 'TAB', "value": 'PRESS'}, None),
|
||||
*_template_items_animation(),
|
||||
("nla.tweakmode_enter", {"type": 'LEFTMOUSE', "value": 'DOUBLE_CLICK'}, None),
|
||||
@@ -1603,7 +1603,7 @@ def km_text_generic(params):
|
||||
("text.find", {"type": 'G', "value": 'PRESS', "ctrl": True}, None),
|
||||
("text.replace", {"type": 'H', "value": 'PRESS', "ctrl": True}, None),
|
||||
("wm.context_toggle", {"type": 'I', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.show_region_ui')]}),
|
||||
{"properties": [("data_path", "space_data.show_region_ui")]}),
|
||||
])
|
||||
|
||||
return keymap
|
||||
@@ -1631,13 +1631,13 @@ def km_text(params):
|
||||
("text.move", {"type": 'RIGHT_ARROW', "value": 'PRESS', "alt": True},
|
||||
{"properties": [("type", 'NEXT_WORD')]}),
|
||||
("wm.context_cycle_int", {"type": 'WHEELUPMOUSE', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.font_size'), ("reverse", False)]}),
|
||||
{"properties": [("data_path", "space_data.font_size"), ("reverse", False)]}),
|
||||
("wm.context_cycle_int", {"type": 'WHEELDOWNMOUSE', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.font_size'), ("reverse", True)]}),
|
||||
{"properties": [("data_path", "space_data.font_size"), ("reverse", True)]}),
|
||||
("wm.context_cycle_int", {"type": 'NUMPAD_PLUS', "value": 'PRESS', "ctrl": True, "repeat": True},
|
||||
{"properties": [("data_path", 'space_data.font_size'), ("reverse", False)]}),
|
||||
{"properties": [("data_path", "space_data.font_size"), ("reverse", False)]}),
|
||||
("wm.context_cycle_int", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "ctrl": True, "repeat": True},
|
||||
{"properties": [("data_path", 'space_data.font_size'), ("reverse", True)]}),
|
||||
{"properties": [("data_path", "space_data.font_size"), ("reverse", True)]}),
|
||||
("text.new", {"type": 'N', "value": 'PRESS', "ctrl": True}, None),
|
||||
])
|
||||
|
||||
@@ -1759,9 +1759,9 @@ def km_sequencercommon(_params):
|
||||
items.extend([
|
||||
op_panel("TOPBAR_PT_name", {"type": 'RET', "value": 'PRESS'}, [("keep_open", False)]),
|
||||
("wm.context_toggle", {"type": 'LEFT_BRACKET', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.show_region_channels')]}),
|
||||
{"properties": [("data_path", "space_data.show_region_channels")]}),
|
||||
("wm.context_toggle", {"type": 'RIGHT_BRACKET', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.show_region_ui')]}),
|
||||
{"properties": [("data_path", "space_data.show_region_ui")]}),
|
||||
])
|
||||
|
||||
return keymap
|
||||
@@ -1867,7 +1867,7 @@ def km_sequencer(params):
|
||||
("sequencer.select_grouped", {"type": 'G', "value": 'PRESS', "shift": True}, None),
|
||||
("sequencer.slip", {"type": 'R', "value": 'PRESS'}, None),
|
||||
("wm.context_set_int", {"type": 'O', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'scene.sequence_editor.overlay_frame'), ("value", 0)]}),
|
||||
{"properties": [("data_path", "scene.sequence_editor.overlay_frame"), ("value", 0)]}),
|
||||
("transform.seq_slide", {"type": 'W', "value": 'PRESS'}, None),
|
||||
("transform.seq_slide", {"type": 'LEFTMOUSE', "value": 'CLICK_DRAG'}, None),
|
||||
("transform.seq_slide", {"type": 'MIDDLEMOUSE', "value": 'CLICK_DRAG'}, None),
|
||||
@@ -1947,13 +1947,13 @@ def km_console(params):
|
||||
("console.move", {"type": 'END', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("type", 'LINE_END'), ("select", True)]}),
|
||||
("wm.context_cycle_int", {"type": 'WHEELUPMOUSE', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.font_size'), ("reverse", False)]}),
|
||||
{"properties": [("data_path", "space_data.font_size"), ("reverse", False)]}),
|
||||
("wm.context_cycle_int", {"type": 'WHEELDOWNMOUSE', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.font_size'), ("reverse", True)]}),
|
||||
{"properties": [("data_path", "space_data.font_size"), ("reverse", True)]}),
|
||||
("wm.context_cycle_int", {"type": 'NUMPAD_PLUS', "value": 'PRESS', "ctrl": True, "repeat": True},
|
||||
{"properties": [("data_path", 'space_data.font_size'), ("reverse", False)]}),
|
||||
{"properties": [("data_path", "space_data.font_size"), ("reverse", False)]}),
|
||||
("wm.context_cycle_int", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "ctrl": True, "repeat": True},
|
||||
{"properties": [("data_path", 'space_data.font_size'), ("reverse", True)]}),
|
||||
{"properties": [("data_path", "space_data.font_size"), ("reverse", True)]}),
|
||||
("console.move", {"type": 'LEFT_ARROW', "value": 'PRESS', "repeat": True},
|
||||
{"properties": [("type", 'PREVIOUS_CHARACTER')]}),
|
||||
("console.move", {"type": 'LEFT_ARROW', "value": 'PRESS', "repeat": True, "shift": True},
|
||||
@@ -2021,7 +2021,7 @@ def km_clip(params):
|
||||
("clip.track_markers", {"type": 'T', "value": 'PRESS', "shift": True, "ctrl": True},
|
||||
{"properties": [("backwards", True), ("sequence", True)]}),
|
||||
("wm.context_toggle_enum", {"type": 'TAB', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'space_data.mode'), ("value_1", 'TRACKING'), ("value_2", 'MASK')]}),
|
||||
{"properties": [("data_path", "space_data.mode"), ("value_1", 'TRACKING'), ("value_2", 'MASK')]}),
|
||||
("clip.solve_camera", {"type": 'S', "value": 'PRESS', "shift": True}, None),
|
||||
("clip.prefetch", {"type": 'P', "value": 'PRESS'}, None),
|
||||
])
|
||||
@@ -2039,9 +2039,9 @@ def km_clip_editor(params):
|
||||
|
||||
items.extend([
|
||||
("wm.context_toggle", {"type": 'LEFT_BRACKET', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.show_region_toolbar')]}),
|
||||
{"properties": [("data_path", "space_data.show_region_toolbar")]}),
|
||||
("wm.context_toggle", {"type": 'RIGHT_BRACKET', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.show_region_ui')]}),
|
||||
{"properties": [("data_path", "space_data.show_region_ui")]}),
|
||||
("wm.search_menu", {"type": 'TAB', "value": 'PRESS'}, None),
|
||||
("clip.view_pan", {"type": 'MIDDLEMOUSE', "value": 'PRESS'}, None),
|
||||
("clip.view_pan", {"type": 'MIDDLEMOUSE', "value": 'PRESS', "shift": True}, None),
|
||||
@@ -2121,13 +2121,13 @@ def km_clip_editor(params):
|
||||
("clip.join_tracks", {"type": 'J', "value": 'PRESS', "ctrl": True}, None),
|
||||
*_template_items_context_menu("CLIP_MT_tracking_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS'}),
|
||||
("wm.context_toggle", {"type": 'L', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'space_data.lock_selection')]}),
|
||||
{"properties": [("data_path", "space_data.lock_selection")]}),
|
||||
("wm.context_toggle", {"type": 'D', "value": 'PRESS', "alt": True},
|
||||
{"properties": [("data_path", 'space_data.show_disabled')]}),
|
||||
{"properties": [("data_path", "space_data.show_disabled")]}),
|
||||
("wm.context_toggle", {"type": 'S', "value": 'PRESS', "alt": True},
|
||||
{"properties": [("data_path", 'space_data.show_marker_search')]}),
|
||||
{"properties": [("data_path", "space_data.show_marker_search")]}),
|
||||
("wm.context_toggle", {"type": 'M', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'space_data.use_mute_footage')]}),
|
||||
{"properties": [("data_path", "space_data.use_mute_footage")]}),
|
||||
("transform.translate", {"type": 'W', "value": 'PRESS'}, None),
|
||||
("transform.translate", {"type": 'LEFTMOUSE', "value": 'CLICK_DRAG'}, None),
|
||||
("transform.resize", {"type": 'R', "value": 'PRESS'}, None),
|
||||
@@ -2175,7 +2175,7 @@ def km_clip_graph_editor(params):
|
||||
("clip.graph_view_all", {"type": 'NDOF_BUTTON_FIT', "value": 'PRESS'}, None),
|
||||
("clip.graph_center_current_frame", {"type": 'NUMPAD_0', "value": 'PRESS'}, None),
|
||||
("wm.context_toggle", {"type": 'L', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'space_data.lock_time_cursor')]}),
|
||||
{"properties": [("data_path", "space_data.lock_time_cursor")]}),
|
||||
("clip.clear_track_path", {"type": 'T', "value": 'PRESS', "alt": True},
|
||||
{"properties": [("action", 'REMAINED'), ("clear_active", True)]}),
|
||||
("clip.clear_track_path", {"type": 'T', "value": 'PRESS', "shift": True},
|
||||
@@ -2225,7 +2225,7 @@ def km_spreadsheet_generic(_params):
|
||||
channels_key={"type": 'T', "value": 'PRESS'},
|
||||
),
|
||||
("wm.context_toggle", {"type": 'RIGHT_BRACKET', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.show_region_ui')]}),
|
||||
{"properties": [("data_path", "space_data.show_region_ui")]}),
|
||||
])
|
||||
|
||||
return keymap
|
||||
@@ -2267,7 +2267,7 @@ def km_animation(params):
|
||||
|
||||
items.extend([
|
||||
("wm.context_toggle", {"type": 'T', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.show_seconds')]}),
|
||||
{"properties": [("data_path", "space_data.show_seconds")]}),
|
||||
])
|
||||
|
||||
return keymap
|
||||
@@ -2380,9 +2380,9 @@ def _gpencil_legacy_selection(params):
|
||||
def _gpencil_legacy_display():
|
||||
return [
|
||||
("wm.context_toggle", {"type": 'Q', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("data_path", 'space_data.overlay.use_gpencil_edit_lines')]}),
|
||||
{"properties": [("data_path", "space_data.overlay.use_gpencil_edit_lines")]}),
|
||||
("wm.context_toggle", {"type": 'Q', "value": 'PRESS', "shift": True, "alt": True},
|
||||
{"properties": [("data_path", 'space_data.overlay.use_gpencil_multiedit_line_only')]}),
|
||||
{"properties": [("data_path", "space_data.overlay.use_gpencil_multiedit_line_only")]}),
|
||||
]
|
||||
|
||||
|
||||
@@ -2434,7 +2434,7 @@ def km_gpencil_legacy_stroke_edit_mode(params):
|
||||
# Transform tools
|
||||
("transform.translate", {"type": 'LEFTMOUSE', "value": 'CLICK_DRAG'}, None),
|
||||
("wm.context_toggle", {"type": 'B', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'tool_settings.use_proportional_edit')]}),
|
||||
{"properties": [("data_path", "tool_settings.use_proportional_edit")]}),
|
||||
# Vertex group menu
|
||||
op_menu("GPENCIL_MT_gpencil_vertex_group", {"type": 'G', "value": 'PRESS', "ctrl": True}),
|
||||
# Select mode
|
||||
@@ -2472,10 +2472,10 @@ def km_gpencil_legacy_stroke_paint_mode(params):
|
||||
items.extend([
|
||||
# Brush strength
|
||||
("wm.radial_control", {"type": 'U', "value": 'PRESS'},
|
||||
{"properties": [("data_path_primary", 'tool_settings.gpencil_paint.brush.gpencil_settings.pen_strength')]}),
|
||||
{"properties": [("data_path_primary", "tool_settings.gpencil_paint.brush.gpencil_settings.pen_strength")]}),
|
||||
# Brush properties
|
||||
("wm.radial_control", {"type": 'S', "value": 'PRESS'},
|
||||
{"properties": [("data_path_primary", 'tool_settings.gpencil_paint.brush.size')]}),
|
||||
{"properties": [("data_path_primary", "tool_settings.gpencil_paint.brush.size")]}),
|
||||
("brush.scale_size", {"type": 'LEFT_BRACKET', "value": 'PRESS', "repeat": True},
|
||||
{"properties": [("scalar", 0.9)]}),
|
||||
("brush.scale_size", {"type": 'RIGHT_BRACKET', "value": 'PRESS', "repeat": True},
|
||||
@@ -2633,11 +2633,11 @@ def km_gpencil_legacy_stroke_sculpt_mode(params):
|
||||
items.extend([
|
||||
# Selection Modes
|
||||
("wm.context_toggle", {"type": 'ONE', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'tool_settings.use_gpencil_select_mask_point')]}),
|
||||
{"properties": [("data_path", "tool_settings.use_gpencil_select_mask_point")]}),
|
||||
("wm.context_toggle", {"type": 'TWO', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'tool_settings.use_gpencil_select_mask_stroke')]}),
|
||||
{"properties": [("data_path", "tool_settings.use_gpencil_select_mask_stroke")]}),
|
||||
("wm.context_toggle", {"type": 'THREE', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'tool_settings.use_gpencil_select_mask_segment')]}),
|
||||
{"properties": [("data_path", "tool_settings.use_gpencil_select_mask_segment")]}),
|
||||
# Normal Selection
|
||||
("gpencil.select", {"type": 'LEFTMOUSE', "value": 'CLICK', "shift": True, "alt": True},
|
||||
{"properties": [("deselect_all", True), ("toggle", True), ("use_shift_extend", False)]}),
|
||||
@@ -2647,13 +2647,13 @@ def km_gpencil_legacy_stroke_sculpt_mode(params):
|
||||
*_gpencil_legacy_selection(params),
|
||||
# Brush properties
|
||||
("wm.radial_control", {"type": 'U', "value": 'PRESS'},
|
||||
{"properties": [("data_path_primary", 'tool_settings.gpencil_sculpt_paint.brush.strength')]}),
|
||||
{"properties": [("data_path_primary", "tool_settings.gpencil_sculpt_paint.brush.strength")]}),
|
||||
("brush.scale_size", {"type": 'LEFT_BRACKET', "value": 'PRESS', "repeat": True},
|
||||
{"properties": [("scalar", 0.9)]}),
|
||||
("brush.scale_size", {"type": 'RIGHT_BRACKET', "value": 'PRESS', "repeat": True},
|
||||
{"properties": [("scalar", 1.0 / 0.9)]}),
|
||||
("wm.radial_control", {"type": 'S', "value": 'PRESS'},
|
||||
{"properties": [("data_path_primary", 'tool_settings.gpencil_sculpt_paint.brush.size')]}),
|
||||
{"properties": [("data_path_primary", "tool_settings.gpencil_sculpt_paint.brush.size")]}),
|
||||
# Copy
|
||||
("gpencil.copy", {"type": 'C', "value": 'PRESS', "ctrl": True}, None),
|
||||
# Display
|
||||
@@ -2873,16 +2873,16 @@ def km_gpencil_legacy_stroke_weight_mode(params):
|
||||
items.extend([
|
||||
# Brush strength
|
||||
("wm.radial_control", {"type": 'U', "value": 'PRESS'},
|
||||
{"properties": [("data_path_primary", 'tool_settings.gpencil_weight_paint.brush.strength')]}),
|
||||
{"properties": [("data_path_primary", "tool_settings.gpencil_weight_paint.brush.strength")]}),
|
||||
# Brush size
|
||||
("wm.radial_control", {"type": 'S', "value": 'PRESS'},
|
||||
{"properties": [("data_path_primary", 'tool_settings.gpencil_weight_paint.brush.size')]}),
|
||||
{"properties": [("data_path_primary", "tool_settings.gpencil_weight_paint.brush.size")]}),
|
||||
("brush.scale_size", {"type": 'LEFT_BRACKET', "value": 'PRESS', "repeat": True},
|
||||
{"properties": [("scalar", 0.9)]}),
|
||||
("brush.scale_size", {"type": 'RIGHT_BRACKET', "value": 'PRESS', "repeat": True},
|
||||
{"properties": [("scalar", 1.0 / 0.9)]}),
|
||||
("wm.radial_control", {"type": 'F', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path_primary", 'tool_settings.gpencil_weight_paint.brush.weight')]}),
|
||||
{"properties": [("data_path_primary", "tool_settings.gpencil_weight_paint.brush.weight")]}),
|
||||
# Weight sample
|
||||
("gpencil.weight_sample", {"type": 'I', "value": 'PRESS'}, None),
|
||||
# Tools
|
||||
@@ -2984,11 +2984,11 @@ def km_gpencil_legacy_stroke_vertex_mode(params):
|
||||
items.extend([
|
||||
# Selection Modes
|
||||
("wm.context_toggle", {"type": 'ONE', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'tool_settings.use_gpencil_vertex_select_mask_point')]}),
|
||||
{"properties": [("data_path", "tool_settings.use_gpencil_vertex_select_mask_point")]}),
|
||||
("wm.context_toggle", {"type": 'TWO', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'tool_settings.use_gpencil_vertex_select_mask_stroke')]}),
|
||||
{"properties": [("data_path", "tool_settings.use_gpencil_vertex_select_mask_stroke")]}),
|
||||
("wm.context_toggle", {"type": 'THREE', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'tool_settings.use_gpencil_vertex_select_mask_segment')]}),
|
||||
{"properties": [("data_path", "tool_settings.use_gpencil_vertex_select_mask_segment")]}),
|
||||
# Normal Selection
|
||||
("gpencil.select", {"type": 'LEFTMOUSE', "value": 'CLICK', "shift": True, "alt": True},
|
||||
{"properties": [("deselect_all", True), ("toggle", True), ("use_shift_extend", False)]}),
|
||||
@@ -2999,11 +2999,11 @@ def km_gpencil_legacy_stroke_vertex_mode(params):
|
||||
# Brush strength
|
||||
("wm.radial_control", {"type": 'U', "value": 'PRESS'},
|
||||
{"properties": [
|
||||
("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.gpencil_settings.pen_strength'),
|
||||
("data_path_primary", "tool_settings.gpencil_vertex_paint.brush.gpencil_settings.pen_strength"),
|
||||
]}),
|
||||
# Brush size
|
||||
("wm.radial_control", {"type": 'S', "value": 'PRESS'},
|
||||
{"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.size')]}),
|
||||
{"properties": [("data_path_primary", "tool_settings.gpencil_vertex_paint.brush.size")]}),
|
||||
("brush.scale_size", {"type": 'LEFT_BRACKET', "value": 'PRESS', "repeat": True},
|
||||
{"properties": [("scalar", 0.9)]}),
|
||||
("brush.scale_size", {"type": 'RIGHT_BRACKET', "value": 'PRESS', "repeat": True},
|
||||
@@ -3051,11 +3051,11 @@ def km_gpencil_legacy_stroke_vertex_draw(params):
|
||||
# Brush strength
|
||||
("wm.radial_control", {"type": 'U', "value": 'PRESS'},
|
||||
{"properties": [
|
||||
("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.gpencil_settings.pen_strength'),
|
||||
("data_path_primary", "tool_settings.gpencil_vertex_paint.brush.gpencil_settings.pen_strength"),
|
||||
]}),
|
||||
# Brush size
|
||||
("wm.radial_control", {"type": 'S', "value": 'PRESS'},
|
||||
{"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.size')]}),
|
||||
{"properties": [("data_path_primary", "tool_settings.gpencil_vertex_paint.brush.size")]}),
|
||||
])
|
||||
|
||||
return keymap
|
||||
@@ -3076,12 +3076,12 @@ def km_gpencil_legacy_stroke_vertex_blur(params):
|
||||
# Brush strength
|
||||
("wm.radial_control", {"type": 'U', "value": 'PRESS'},
|
||||
{"properties": [
|
||||
("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.gpencil_settings.pen_strength'),
|
||||
("data_path_primary", "tool_settings.gpencil_vertex_paint.brush.gpencil_settings.pen_strength"),
|
||||
]}),
|
||||
# Brush size
|
||||
("wm.radial_control", {"type": 'S', "value": 'PRESS'},
|
||||
{"properties": [
|
||||
("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.size'),
|
||||
("data_path_primary", "tool_settings.gpencil_vertex_paint.brush.size"),
|
||||
]}),
|
||||
])
|
||||
|
||||
@@ -3105,11 +3105,11 @@ def km_gpencil_legacy_stroke_vertex_average(params):
|
||||
# Brush strength
|
||||
("wm.radial_control", {"type": 'U', "value": 'PRESS'},
|
||||
{"properties": [
|
||||
("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.gpencil_settings.pen_strength'),
|
||||
("data_path_primary", "tool_settings.gpencil_vertex_paint.brush.gpencil_settings.pen_strength"),
|
||||
]}),
|
||||
# Brush size
|
||||
("wm.radial_control", {"type": 'S', "value": 'PRESS'},
|
||||
{"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.size')]}),
|
||||
{"properties": [("data_path_primary", "tool_settings.gpencil_vertex_paint.brush.size")]}),
|
||||
])
|
||||
|
||||
return keymap
|
||||
@@ -3130,11 +3130,11 @@ def km_gpencil_legacy_stroke_vertex_smear(params):
|
||||
# Brush strength
|
||||
("wm.radial_control", {"type": 'U', "value": 'PRESS', "shift": True},
|
||||
{"properties": [
|
||||
("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.gpencil_settings.pen_strength'),
|
||||
("data_path_primary", "tool_settings.gpencil_vertex_paint.brush.gpencil_settings.pen_strength"),
|
||||
]}),
|
||||
# Brush size
|
||||
("wm.radial_control", {"type": 'S', "value": 'PRESS'},
|
||||
{"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.size')]}),
|
||||
{"properties": [("data_path_primary", "tool_settings.gpencil_vertex_paint.brush.size")]}),
|
||||
])
|
||||
|
||||
return keymap
|
||||
@@ -3154,7 +3154,7 @@ def km_gpencil_legacy_stroke_vertex_replace(params):
|
||||
{"properties": [("wait_for_input", False)]}),
|
||||
# Brush size
|
||||
("wm.radial_control", {"type": 'S', "value": 'PRESS'},
|
||||
{"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.size')]}),
|
||||
{"properties": [("data_path_primary", "tool_settings.gpencil_vertex_paint.brush.size")]}),
|
||||
])
|
||||
|
||||
return keymap
|
||||
@@ -3318,7 +3318,7 @@ def km_object_mode(params):
|
||||
("object.parent_set", {"type": 'P', "value": 'PRESS'}, None),
|
||||
|
||||
("wm.context_toggle", {"type": 'B', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'tool_settings.use_proportional_edit_objects')]}),
|
||||
{"properties": [("data_path", "tool_settings.use_proportional_edit_objects")]}),
|
||||
("object.parent_clear", {"type": 'P', "value": 'PRESS', "shift": True}, None),
|
||||
("object.location_clear", {"type": 'W', "value": 'PRESS', "alt": True},
|
||||
{"properties": [("clear_delta", False)]}),
|
||||
@@ -3436,7 +3436,7 @@ def km_curve(params):
|
||||
{"properties": [("unselected", True)]}),
|
||||
*_template_items_context_menu("VIEW3D_MT_edit_curve_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS'}),
|
||||
("wm.context_toggle", {"type": 'B', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'tool_settings.use_proportional_edit')]}),
|
||||
{"properties": [("data_path", "tool_settings.use_proportional_edit")]}),
|
||||
# Tools
|
||||
*_template_items_basic_tools(),
|
||||
op_tool_cycle("builtin.extrude", {"type": 'E', "value": 'PRESS', "ctrl": True}),
|
||||
@@ -3451,21 +3451,21 @@ def km_curve(params):
|
||||
|
||||
|
||||
def radial_control_properties(paint, prop, secondary_prop, secondary_rotation=False, color=False, zoom=False):
|
||||
brush_path = 'tool_settings.' + paint + '.brush'
|
||||
unified_path = 'tool_settings.unified_paint_settings'
|
||||
rotation = 'mask_texture_slot.angle' if secondary_rotation else 'texture_slot.angle'
|
||||
brush_path = "tool_settings." + paint + ".brush"
|
||||
unified_path = "tool_settings.unified_paint_settings"
|
||||
rotation = "mask_texture_slot.angle" if secondary_rotation else "texture_slot.angle"
|
||||
return {
|
||||
"properties": [
|
||||
("data_path_primary", brush_path + '.' + prop),
|
||||
("data_path_secondary", unified_path + '.' + prop if secondary_prop else ''),
|
||||
("use_secondary", unified_path + '.' + secondary_prop if secondary_prop else ''),
|
||||
("rotation_path", brush_path + '.' + rotation),
|
||||
("color_path", brush_path + '.cursor_color_add'),
|
||||
("fill_color_path", brush_path + '.color' if color else ''),
|
||||
("fill_color_override_path", unified_path + '.color' if color else ''),
|
||||
("fill_color_override_test_path", unified_path + '.use_unified_color' if color else ''),
|
||||
("zoom_path", 'space_data.zoom' if zoom else ''),
|
||||
("image_id", brush_path + ''),
|
||||
("data_path_primary", brush_path + "." + prop),
|
||||
("data_path_secondary", unified_path + "." + prop if secondary_prop else ""),
|
||||
("use_secondary", unified_path + "." + secondary_prop if secondary_prop else ""),
|
||||
("rotation_path", brush_path + "." + rotation),
|
||||
("color_path", brush_path + ".cursor_color_add"),
|
||||
("fill_color_path", brush_path + ".color" if color else ""),
|
||||
("fill_color_override_path", unified_path + ".color" if color else ""),
|
||||
("fill_color_override_test_path", unified_path + ".use_unified_color" if color else ""),
|
||||
("zoom_path", "space_data.zoom" if zoom else ""),
|
||||
("image_id", brush_path + ""),
|
||||
("secondary_tex", secondary_rotation),
|
||||
],
|
||||
}
|
||||
@@ -3486,34 +3486,34 @@ def _template_paint_radial_control(
|
||||
items.extend([
|
||||
("wm.radial_control", {"type": 'S', "value": 'PRESS'},
|
||||
radial_control_properties(
|
||||
paint, 'size', 'use_unified_size', secondary_rotation=secondary_rotation, color=color, zoom=zoom)),
|
||||
paint, "size", "use_unified_size", secondary_rotation=secondary_rotation, color=color, zoom=zoom)),
|
||||
("wm.radial_control", {"type": 'U', "value": 'PRESS'},
|
||||
radial_control_properties(
|
||||
paint, 'strength', 'use_unified_strength', secondary_rotation=secondary_rotation, color=color)),
|
||||
paint, "strength", "use_unified_strength", secondary_rotation=secondary_rotation, color=color)),
|
||||
])
|
||||
|
||||
if rotation:
|
||||
items.extend([
|
||||
("wm.radial_control", {"type": 'F', "value": 'PRESS', "ctrl": True},
|
||||
radial_control_properties(paint, 'texture_slot.angle', None, color=color)),
|
||||
radial_control_properties(paint, "texture_slot.angle", None, color=color)),
|
||||
])
|
||||
|
||||
if secondary_rotation:
|
||||
items.extend([
|
||||
("wm.radial_control", {"type": 'F', "value": 'PRESS', "ctrl": True, "alt": True},
|
||||
radial_control_properties(
|
||||
paint, 'mask_texture_slot.angle', None, secondary_rotation=secondary_rotation, color=color)),
|
||||
paint, "mask_texture_slot.angle", None, secondary_rotation=secondary_rotation, color=color)),
|
||||
])
|
||||
|
||||
if weight:
|
||||
items.extend([
|
||||
("wm.radial_control", {"type": 'F', "value": 'PRESS', "ctrl": True, "alt": True},
|
||||
radial_control_properties(
|
||||
paint, 'mask_texture_slot.angle', None, secondary_rotation=secondary_rotation, color=color)),
|
||||
paint, "mask_texture_slot.angle", None, secondary_rotation=secondary_rotation, color=color)),
|
||||
|
||||
("wm.radial_control", {"type": 'F', "value": 'PRESS', "ctrl": True},
|
||||
radial_control_properties(
|
||||
paint, 'weight', 'use_unified_weight'))
|
||||
paint, "weight", "use_unified_weight"))
|
||||
])
|
||||
|
||||
return items
|
||||
@@ -3559,10 +3559,10 @@ def km_image_paint(params):
|
||||
{"properties": [("mode", 'ROTATION'), ("texmode", 'SECONDARY')]}),
|
||||
# Mask Modes
|
||||
("wm.context_toggle", {"type": 'ONE', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'image_paint_object.data.use_paint_mask')]}),
|
||||
{"properties": [("data_path", "image_paint_object.data.use_paint_mask")]}),
|
||||
# Stabilize Strokes
|
||||
("wm.context_toggle", {"type": 'L', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'tool_settings.image_paint.brush.use_smooth_stroke')]}),
|
||||
{"properties": [("data_path", "tool_settings.image_paint.brush.use_smooth_stroke")]}),
|
||||
# Context menu.
|
||||
*_template_items_context_panel("VIEW3D_PT_paint_texture_context_menu",
|
||||
{"type": 'RIGHTMOUSE', "value": 'PRESS'}),
|
||||
@@ -3617,12 +3617,12 @@ def km_vertex_paint(params):
|
||||
{"properties": [("mode", 'ROTATION'), ("texmode", 'SECONDARY')]}),
|
||||
# Mask Modes
|
||||
("wm.context_toggle", {"type": 'ONE', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'vertex_paint_object.data.use_paint_mask')]}),
|
||||
{"properties": [("data_path", "vertex_paint_object.data.use_paint_mask")]}),
|
||||
("wm.context_toggle", {"type": 'TWO', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'vertex_paint_object.data.use_paint_mask_vertex')]}),
|
||||
{"properties": [("data_path", "vertex_paint_object.data.use_paint_mask_vertex")]}),
|
||||
# Stabilize Stroke
|
||||
("wm.context_toggle", {"type": 'L', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'tool_settings.vertex_paint.brush.use_smooth_stroke')]}),
|
||||
{"properties": [("data_path", "tool_settings.vertex_paint.brush.use_smooth_stroke")]}),
|
||||
# Context menu.
|
||||
*_template_items_context_panel("VIEW3D_PT_paint_vertex_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS'}),
|
||||
# Tools
|
||||
@@ -3664,12 +3664,12 @@ def km_weight_paint(params):
|
||||
*_template_paint_radial_control("weight_paint", weight=True),
|
||||
# Mask Modes
|
||||
("wm.context_toggle", {"type": 'ONE', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'weight_paint_object.data.use_paint_mask')]}),
|
||||
{"properties": [("data_path", "weight_paint_object.data.use_paint_mask")]}),
|
||||
("wm.context_toggle", {"type": 'TWO', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'weight_paint_object.data.use_paint_mask_vertex')]}),
|
||||
{"properties": [("data_path", "weight_paint_object.data.use_paint_mask_vertex")]}),
|
||||
# Stabilize Stroke
|
||||
("wm.context_toggle", {"type": 'L', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'tool_settings.weight_paint.brush.use_smooth_stroke')]}),
|
||||
{"properties": [("data_path", "tool_settings.weight_paint.brush.use_smooth_stroke")]}),
|
||||
# Context menu.
|
||||
*_template_items_context_panel("VIEW3D_PT_paint_weight_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS'}),
|
||||
# For combined weight paint + pose mode.
|
||||
@@ -3698,7 +3698,7 @@ def km_sculpt(params):
|
||||
|
||||
items.extend([
|
||||
# Sculpt Pivot
|
||||
("sculpt.set_pivot_position", {"type": 'RIGHTMOUSE', 'value': 'PRESS', "shift": True},
|
||||
("sculpt.set_pivot_position", {"type": 'RIGHTMOUSE', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("mode", 'SURFACE')]}),
|
||||
# Brush strokes
|
||||
("sculpt.brush_stroke", {"type": 'LEFTMOUSE', "value": 'PRESS'},
|
||||
@@ -3794,7 +3794,7 @@ def km_sculpt(params):
|
||||
{"properties": [("mode", 'ROTATION'), ("texmode", 'SECONDARY')]}),
|
||||
# Stabilize Stroke
|
||||
("wm.context_toggle", {"type": 'L', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'tool_settings.sculpt.brush.use_smooth_stroke')]}),
|
||||
{"properties": [("data_path", "tool_settings.sculpt.brush.use_smooth_stroke")]}),
|
||||
# Tools
|
||||
# This is the only mode without an Annotate shortcut.
|
||||
# The multi-resolution shortcuts took precedence instead.
|
||||
@@ -3867,7 +3867,7 @@ def km_mesh(params):
|
||||
("mesh.dissolve_mode", {"type": 'BACK_SPACE', "value": 'PRESS', "ctrl": True}, None),
|
||||
("mesh.dissolve_mode", {"type": 'DEL', "value": 'PRESS', "ctrl": True}, None),
|
||||
("wm.context_toggle", {"type": 'B', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'tool_settings.use_proportional_edit')]}),
|
||||
{"properties": [("data_path", "tool_settings.use_proportional_edit")]}),
|
||||
# Menus.
|
||||
*_template_items_context_menu("VIEW3D_MT_edit_mesh_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS'}),
|
||||
# Tools
|
||||
@@ -3969,7 +3969,7 @@ def km_metaball(params):
|
||||
("mball.select_similar", {"type": 'G', "value": 'PRESS', "shift": True}, None),
|
||||
*_template_items_context_menu("VIEW3D_MT_edit_metaball_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS'}),
|
||||
("wm.context_toggle", {"type": 'B', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'tool_settings.use_proportional_edit')]}),
|
||||
{"properties": [("data_path", "tool_settings.use_proportional_edit")]}),
|
||||
# Tools
|
||||
*_template_items_basic_tools(),
|
||||
])
|
||||
@@ -3996,7 +3996,7 @@ def km_lattice(params):
|
||||
("object.vertex_parent_set", {"type": 'P', "value": 'PRESS', "ctrl": True}, None),
|
||||
*_template_items_context_menu("VIEW3D_MT_edit_lattice_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS'}),
|
||||
("wm.context_toggle", {"type": 'B', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'tool_settings.use_proportional_edit')]}),
|
||||
{"properties": [("data_path", "tool_settings.use_proportional_edit")]}),
|
||||
# Tools
|
||||
op_tool_cycle("builtin.select_box", {"type": 'Q', "value": 'PRESS'}),
|
||||
op_tool_cycle("builtin.move", {"type": 'W', "value": 'PRESS'}),
|
||||
@@ -4040,11 +4040,11 @@ def km_particle(params):
|
||||
("particle.brush_edit", {"type": 'LEFTMOUSE', "value": 'PRESS'}, None),
|
||||
("particle.brush_edit", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True}, None),
|
||||
("wm.radial_control", {"type": 'S', "value": 'PRESS'},
|
||||
{"properties": [("data_path_primary", 'tool_settings.particle_edit.brush.size')]}),
|
||||
{"properties": [("data_path_primary", "tool_settings.particle_edit.brush.size")]}),
|
||||
("wm.radial_control", {"type": 'U', "value": 'PRESS'},
|
||||
{"properties": [("data_path_primary", 'tool_settings.particle_edit.brush.strength')]}),
|
||||
{"properties": [("data_path_primary", "tool_settings.particle_edit.brush.strength")]}),
|
||||
("wm.context_toggle", {"type": 'B', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'tool_settings.use_proportional_edit')]}),
|
||||
{"properties": [("data_path", "tool_settings.use_proportional_edit")]}),
|
||||
*_template_items_context_menu("VIEW3D_MT_particle_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS'}),
|
||||
])
|
||||
|
||||
@@ -4175,7 +4175,7 @@ def km_curves(params):
|
||||
("curves.delete", {"type": 'DEL', "value": 'PRESS'}, None),
|
||||
# Proportional Editing
|
||||
("wm.context_toggle", {"type": 'B', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'tool_settings.use_proportional_edit')]}),
|
||||
{"properties": [("data_path", "tool_settings.use_proportional_edit")]}),
|
||||
# Tools
|
||||
*_template_items_basic_tools(),
|
||||
op_tool_cycle("builtin.annotate", {"type": 'D', "value": 'PRESS'}),
|
||||
|
||||
@@ -282,7 +282,7 @@ class DATA_PT_motion_paths_display(MotionPathButtonsPanel_display, Panel):
|
||||
|
||||
|
||||
class DATA_PT_armature_animation(ArmatureButtonsPanel, PropertiesAnimationMixin, PropertyPanel, Panel):
|
||||
_animated_id_context_property = 'armature'
|
||||
_animated_id_context_property = "armature"
|
||||
|
||||
|
||||
class DATA_PT_custom_props_arm(ArmatureButtonsPanel, PropertyPanel, Panel):
|
||||
|
||||
@@ -178,7 +178,7 @@ class DATA_PT_curves_animation(DataButtonsPanel, PropertiesAnimationMixin, Prope
|
||||
'BLENDER_EEVEE_NEXT',
|
||||
'BLENDER_WORKBENCH',
|
||||
}
|
||||
_animated_id_context_property = 'curves'
|
||||
_animated_id_context_property = "curves"
|
||||
|
||||
|
||||
class DATA_PT_custom_props_curves(DataButtonsPanel, PropertyPanel, Panel):
|
||||
|
||||
@@ -414,7 +414,7 @@ class DATA_PT_gpencil_canvas(DataButtonsPanel, Panel):
|
||||
|
||||
|
||||
class DATA_PT_gpencil_animation(DataButtonsPanel, PropertiesAnimationMixin, PropertyPanel, Panel):
|
||||
_animated_id_context_property = 'gpencil'
|
||||
_animated_id_context_property = "gpencil"
|
||||
|
||||
|
||||
class DATA_PT_custom_props_gpencil(DataButtonsPanel, PropertyPanel, Panel):
|
||||
|
||||
@@ -395,7 +395,7 @@ class DATA_PT_grease_pencil_settings(DataButtonsPanel, Panel):
|
||||
|
||||
|
||||
class DATA_PT_grease_pencil_animation(DataButtonsPanel, PropertiesAnimationMixin, PropertyPanel, Panel):
|
||||
_animated_id_context_property = 'grease_pencil'
|
||||
_animated_id_context_property = "grease_pencil"
|
||||
|
||||
|
||||
class DATA_PT_grease_pencil_custom_props(DataButtonsPanel, PropertyPanel, Panel):
|
||||
|
||||
@@ -385,7 +385,7 @@ class DATA_PT_lightprobe_animation(DataButtonsPanel, PropertiesAnimationMixin, P
|
||||
'BLENDER_EEVEE_NEXT',
|
||||
'BLENDER_EEVEE',
|
||||
}
|
||||
_animated_id_context_property = 'lightprobe'
|
||||
_animated_id_context_property = "lightprobe"
|
||||
|
||||
|
||||
classes = (
|
||||
|
||||
@@ -120,7 +120,7 @@ class DATA_PT_metaball_element(DataButtonsPanel, Panel):
|
||||
|
||||
|
||||
class DATA_PT_metaball_animation(DataButtonsPanel, PropertiesAnimationMixin, PropertyPanel, Panel):
|
||||
_animated_id_context_property = 'meta_ball'
|
||||
_animated_id_context_property = "meta_ball"
|
||||
|
||||
|
||||
class DATA_PT_custom_props_metaball(DataButtonsPanel, PropertyPanel, Panel):
|
||||
|
||||
@@ -133,7 +133,7 @@ class DATA_PT_speaker_animation(DataButtonsPanel, PropertiesAnimationMixin, Prop
|
||||
'BLENDER_EEVEE_NEXT',
|
||||
'BLENDER_WORKBENCH',
|
||||
}
|
||||
_animated_id_context_property = 'speaker'
|
||||
_animated_id_context_property = "speaker"
|
||||
|
||||
|
||||
class DATA_PT_custom_props_speaker(DataButtonsPanel, PropertyPanel, Panel):
|
||||
|
||||
@@ -215,7 +215,7 @@ class DATA_PT_volume_animation(DataButtonsPanel, PropertiesAnimationMixin, Prope
|
||||
'BLENDER_EEVEE_NEXT',
|
||||
'BLENDER_WORKBENCH',
|
||||
}
|
||||
_animated_id_context_property = 'volume'
|
||||
_animated_id_context_property = "volume"
|
||||
|
||||
|
||||
class DATA_PT_custom_props_volume(DataButtonsPanel, PropertyPanel, Panel):
|
||||
|
||||
@@ -227,7 +227,7 @@ class MATERIAL_PT_gpencil_preview(GPMaterialButtonsPanel, Panel):
|
||||
|
||||
|
||||
class MATERIAL_PT_gpencil_animation(GPMaterialButtonsPanel, PropertiesAnimationMixin, PropertyPanel, Panel):
|
||||
_animated_id_context_property = 'material'
|
||||
_animated_id_context_property = "material"
|
||||
|
||||
|
||||
class MATERIAL_PT_gpencil_custom_props(GPMaterialButtonsPanel, PropertyPanel, Panel):
|
||||
|
||||
@@ -422,7 +422,7 @@ class OBJECT_PT_visibility(ObjectButtonsPanel, Panel):
|
||||
|
||||
|
||||
class OBJECT_PT_animation(ObjectButtonsPanel, PropertiesAnimationMixin, PropertyPanel, Panel):
|
||||
_animated_id_context_property = 'object'
|
||||
_animated_id_context_property = "object"
|
||||
|
||||
|
||||
class OBJECT_PT_custom_props(ObjectButtonsPanel, PropertyPanel, Panel):
|
||||
|
||||
@@ -2285,7 +2285,7 @@ class PARTICLE_PT_animation(ParticleButtonsPanel, PropertiesAnimationMixin, Prop
|
||||
|
||||
@classmethod
|
||||
def _animated_id(cls, context):
|
||||
psys = getattr(context, 'particle_system', None)
|
||||
psys = getattr(context, "particle_system", None)
|
||||
return psys and psys.settings
|
||||
|
||||
|
||||
|
||||
@@ -442,7 +442,7 @@ class SCENE_PT_eevee_next_light_probes(SceneButtonsPanel, Panel):
|
||||
|
||||
|
||||
class SCENE_PT_animation(SceneButtonsPanel, PropertiesAnimationMixin, PropertyPanel, Panel):
|
||||
_animated_id_context_property = 'scene'
|
||||
_animated_id_context_property = "scene"
|
||||
|
||||
|
||||
class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel, Panel):
|
||||
|
||||
@@ -93,7 +93,7 @@ class PropertiesAnimationMixin:
|
||||
|
||||
@classmethod
|
||||
def _animated_id(cls, context):
|
||||
assert cls._animated_id_context_property, f'set _animated_id_context_property on {cls}'
|
||||
assert cls._animated_id_context_property, "set _animated_id_context_property on {!r}".format(cls)
|
||||
|
||||
# If the pinned ID is of a different type, there could still be a an ID
|
||||
# for which to show this panel. For example, a camera object can be
|
||||
|
||||
@@ -9,5 +9,5 @@ filename = "my_script.py"
|
||||
|
||||
filepath = os.path.join(os.path.dirname(bpy.data.filepath), filename)
|
||||
global_namespace = {"__file__": filepath, "__name__": "__main__"}
|
||||
with open(filepath, 'rb') as file:
|
||||
with open(filepath, "rb") as file:
|
||||
exec(compile(file.read(), filepath, 'exec'), global_namespace)
|
||||
|
||||
@@ -3,7 +3,7 @@ import bpy
|
||||
|
||||
def write_some_data(context, filepath, use_some_setting):
|
||||
print("running write_some_data...")
|
||||
f = open(filepath, 'w', encoding='utf-8')
|
||||
f = open(filepath, "w", encoding='utf-8')
|
||||
f.write("Hello World {:s}".format(use_some_setting))
|
||||
f.close()
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import bpy
|
||||
|
||||
def read_some_data(context, filepath, use_some_setting):
|
||||
print("running read_some_data...")
|
||||
f = open(filepath, 'r', encoding='utf-8')
|
||||
f = open(filepath, "r", encoding="utf-8")
|
||||
data = f.read()
|
||||
f.close()
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
# - provide a fixed list of previews to select from
|
||||
# - provide a dynamic list of preview (eg. calculated from reading a directory)
|
||||
#
|
||||
# For the above use cases, see the template 'ui_previews_dynamic_enum.py"
|
||||
# For the above use cases, see the template `ui_previews_dynamic_enum.py`.
|
||||
|
||||
|
||||
import os
|
||||
|
||||
Reference in New Issue
Block a user