Utilities for scene caching.
Constructor for JSONEncoder, with sensible defaults.
Remove some keys from camera_object.__dict__ that are very heavy and useless for the caching functionality.
Camera) – The camera object used in the scene
Camera.__dict__ but cleaned.
get_hash_from_play_call(scene_object, camera_object, animations_list, current_mobjects_list)¶
Take the list of animations and a list of mobjects and output their hashes. This is meant to be used for scene.play function.
A string concatenation of the respective hashes of camera_object, animations_list and current_mobjects_list, separated by _.
get_hash_from_wait_call(scene_object, camera_object, wait_time, stop_condition_function, current_mobjects_list)¶
Take a wait time, a boolean function as a stop condition and a list of mobjects, and then output their individual hashes. This is meant to be used for scene.wait function.
A concatenation of the respective hashes of animations_list and `current_mobjects_list, separated by _.