Model.morphstoremorphvolumes#
- Model.morphstoremorphvolumes(mode)#
Stores or restores a copy of current morph volumes and handles.
- Parameters:
mode (int) –
1 - Store morph volumes
2 - Restore morph volumes
3 - Free memory used for storage
Example#
Store the current morph volumes and handles#import hm import hm.entities as ent model = hm.Model() model.morphstoremorphvolumes(mode=1)
Note
This function either stores a copy of all the morph volumes and handles in the database, restores that copy - replacing the current entities in the database, or clears the memory where the stored copy was kept. This is how HyperMorph enables the reject function for the extensive changes which can result from morph volume creation or updating.
Typical usage would be to call this function with
mode = 1, call any function which modifies morph volumes, and then call this function withmode = 2if you wish to reject the changes. Be sure to call this function withmode = 3to free up the memory used for storage.