Shape Keys: Add operator to update keys from selected objects

This operator is very similar to the existing "Join as Shapes" operator,
which updates or adds shape key array values with the positions of
objects with the same name, but instead of creating new shape keys,
it just updates existing ones. The new operator is called "Update from
Objects" in the UI.

Internally, some logic was moved to a poll function shared between the
two operators, and a new argument for whether to ensure keys exist was
added to their shared implementation.

Part of #135095.

Pull Request: https://projects.blender.org/blender/blender/pulls/136853
This commit is contained in:
Hans Goudey
2025-04-30 20:07:25 +02:00
committed by Hans Goudey
parent 79c318f692
commit 12e626f31f
6 changed files with 77 additions and 43 deletions

View File

@@ -66,6 +66,7 @@ class MESH_MT_shape_key_context_menu(Menu):
layout.operator("object.shape_key_mirror", text="Mirror Shape Key (Topology)").use_topology = True
layout.separator()
layout.operator("object.join_shapes")
layout.operator("object.update_shapes")
layout.operator("object.shape_key_transfer")
layout.separator()
props = layout.operator("object.shape_key_remove", icon='X', text="Delete All Shape Keys")