Model.morphlistupdate#
- Model.morphlistupdate(mode, start, finish)#
Clears or compresses the morphs on the undo/redo list, for the given range. If start and finish are both set to zero, the entire list will be affected. If a morph is cleared while still applied to the model, the morph will not be removed during clearing and thus will end up being permanently applied.
The API functions
Model.hm_morph_getinfo_()will return the current value of the counter and the total number of morphs on the undo/redo list.- Parameters:
mode (int) –
The type of update to perform. Valid values are:
0 - Clear selected morphs
1 - Compress selected morphs
start (int) – Starting morph number (1 or higher).
finish (int) – Finishing morph number (1 or higher).
Examples#
Clear morphs with IDs 1, 2, and 3 from the morph list#import hm import hm.entities as ent model = hm.Model() model.morphkrigmanual(mode=0) model.morphlistupdate(mode=0,start=1,finish=3)
Compress the morphs with IDs 1, 2 and 3 into a single morph. If the morph list contained more morphs, the first morph will be the same as the first three morphs applied simultaneously followed by the rest of the morphs on the list#import hm import hm.entities as ent model = hm.Model() model.morphkrigmanual(mode=0) model.morphlistupdate(mode=1,start=1,finish=3)