Model.morphshapepreview#

Model.morphshapepreview(collection, mode)#

Applies (with a multiplier of one) or unapplies selected shapes.

Parameters:
  • collection (Collection) – The collection containing the input shape entities.

  • mode (int) –

    0 - Unsets the preview flag and unapplies the shape for shapes which have their preview flag set

    1 - Sets the preview flag and applies the shape for shapes which have their preview flag unset

    2 - Toggles the preview flags and applies or unapplies the shapes be set to shapes

Example#

Set the preview flag for the shapes with IDs 11,12,13 and apply them to the model#
import hm
import hm.entities as ent

model = hm.Model()

model.morphshapepreview(
    collection=hm.Collection(model, ent.Shape, [11, 12, 13]), mode=1
)