Mesh Edit: implement an operator to smooth shape key deformation. #110275

Open
Alexander Gavrilov wants to merge 1 commits from angavrilov:pr-shapekey-smoothing into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.

1 Commits

Author SHA1 Message Date
Alexander Gavrilov d1db9b82eb Mesh Edit: implement an operator to smooth shape key deformation.
Similar to the difference between Corrective Smooth and simple Smooth
modifiers, when editing shape keys it sometimes makes sense to smooth
the deformation defined by the key rather than the final shape.

This implements a simple shape key smoothing operator, accessible
via the Vertex menu next to Blend From Shape. The operator applies
a simple iterative smoothing process (identical to the one implemented
by the Smooth tool) to the offsets of vertices from the relative basis
key rather than their positions.

In order to provide more flexibility for dealing with shape keys
intended to be used in conjunction with other ones, the operator
provides an option to modify the relative basis used for smoothing
via selecting another key. The following modes are supported:

Only Active Key:
  The default mode smoothes the deformation of the key itself.
  The additional reference key is not used.

Include Key:
  Includes the deformation of the reference key into the smoothing.

  This can be used when the key currently being edited is intended to
  be applied on top of another one to smooth their combined deformation.

Exclude Key:
  This excludes the deformation of the reference key from smoothing.

  Intended for the opposite case of smoothing the difference between
  two keys being intended to be used alternatively to each other.

Relative To Key:
  This effectively overrides the Relative To setting of the active key,
  simply replacing the basis key for the purpose of this operator only.

  If both keys have the same Relative To basis, this mode behaves
  the same as Exclude Key.

Like ordinary Smooth, the operator supports locking smoothing of certain
axis directions. In addition, it supports restricting direction based on
the vertex normal to allow separately smoothing volume and topology.
2024-01-19 17:23:16 +02:00