From 92ca920c52b90dd5552fc43582b0a965d7d173bb Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 20 Jul 2022 10:45:23 +0200 Subject: Add a 'Apply and Delete All' operation to shapekeys. Adds a new option to the 'Delete ShpaKeys' operator, which first applies the current mix to the object data, before removing all shapekeys. Request from @JulienKaspar from Blender studio. Reviewed By: JulienKaspar Differential Revision: https://developer.blender.org/D15443 --- release/scripts/startup/bl_ui/properties_data_mesh.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'release') diff --git a/release/scripts/startup/bl_ui/properties_data_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py index 2fc949f4aae..80b9b773d9b 100644 --- a/release/scripts/startup/bl_ui/properties_data_mesh.py +++ b/release/scripts/startup/bl_ui/properties_data_mesh.py @@ -58,7 +58,12 @@ class MESH_MT_shape_key_context_menu(Menu): layout.operator("object.join_shapes") layout.operator("object.shape_key_transfer") layout.separator() - layout.operator("object.shape_key_remove", icon='X', text="Delete All Shape Keys").all = True + op = layout.operator("object.shape_key_remove", icon='X', text="Delete All Shape Keys") + op.all = True + op.apply_mix = False + op = layout.operator("object.shape_key_remove", text="Apply All Shape Keys") + op.all = True + op.apply_mix = True layout.separator() layout.operator("object.shape_key_move", icon='TRIA_UP_BAR', text="Move to Top").type = 'TOP' layout.operator("object.shape_key_move", icon='TRIA_DOWN_BAR', text="Move to Bottom").type = 'BOTTOM' -- cgit v1.2.3