Interface Deformers


@CubismEditor public interface Deformers
Deformers in one Cubism model.
  • Method Summary

    Modifier and Type
    Method
    Description
    all()
    Returns every deformer in the model, in host order.
    default void
    Applies deformer to its child elements through the native command path on the reviewed Editors.
    createRotation(String name, Part parent, int index)
    Creates a Rotation Deformer with name under parent at index (negative = append; null parent = model root).
    default WarpDeformer
    createWarp(String name, Part parent, int index, int rows, int columns)
    Creates a Warp Deformer with name and rows×columns grid under parent at index (negative = append; null parent = model root).
    default WarpDeformer
    createWarp(String name, Part parent, int index, Optional<DeformerId> target, WarpGrid grid)
    Creates a Warp directly with its final grid and target deformer, in one creation edit.
     
    default void
    remove(Deformer deformer)
    Deletes deformer through the native selection + native DELETE command path.
  • Method Details

    • all

      List<Deformer> all()
      Returns every deformer in the model, in host order.
    • find

      Deformer find(DeformerId id)
      Throws:
      NoSuchElementException - when the ID is absent
    • createWarp

      default WarpDeformer createWarp(String name, Part parent, int index, int rows, int columns)
      Creates a Warp Deformer with name and rows×columns grid under parent at index (negative = append; null parent = model root).

      The native two-phase flow is used: construct CWarpDeformerSource → set grid → add to the Deformer source set → attach to the Part tree, all admitted into one native Undo entry.

      Throws:
      IllegalArgumentException - when name is blank or rows/columns are not positive
    • createWarp

      default WarpDeformer createWarp(String name, Part parent, int index, Optional<DeformerId> target, WarpGrid grid)
      Creates a Warp directly with its final grid and target deformer, in one creation edit. The Part tree parent and target deformer are independent. Grid points are already in the target deformer coordinate space (canvas space when the target is empty); this method performs no coordinate conversion. No default grid is published first.
      Throws:
      NoSuchElementException - when the target deformer is absent from this model
    • createRotation

      default RotationDeformer createRotation(String name, Part parent, int index)
      Creates a Rotation Deformer with name under parent at index (negative = append; null parent = model root).
      Throws:
      IllegalArgumentException - when name is blank
    • remove

      default void remove(Deformer deformer)
      Deletes deformer through the native selection + native DELETE command path.
    • applyToChildren

      @CubismEditor({"5.0.00","5.0.01","5.0.02","5.0.03","5.0.04","5.0.05","5.0.06","5.1.00","5.1.01","5.1.02","5.1.03","5.2.00","5.2.01","5.2.02","5.2.03","5.3.00","5.3.01","5.3.02","5.3.03","5.3.04"}) default void applyToChildren(Deformer deformer)
      Applies deformer to its child elements through the native command path on the reviewed Editors. The host owns the child-element semantics.