Have SceneFileWriter handle a location for saved mobjects

This commit is contained in:
Grant Sanderson 2022-04-20 21:51:18 -07:00
parent 5a34ca1fba
commit a3579eab41

View file

@ -78,6 +78,8 @@ class SceneFileWriter(object):
self.partial_movie_directory = guarantee_existence(os.path.join(
movie_dir, "partial_movie_files", scene_name,
))
# A place to save mobjects
self.saved_mobject_directory = os.path.join(out_dir, "mobjects")
def get_default_module_directory(self) -> str:
path, _ = os.path.splitext(self.input_file_path)
@ -119,6 +121,12 @@ class SceneFileWriter(object):
def get_movie_file_path(self) -> str:
return self.movie_file_path
def get_saved_mobject_directory(self) -> str:
return guarantee_existence(os.path.join(
self.saved_mobject_directory,
str(self.scene),
))
# Sound
def init_audio(self) -> None:
self.includes_sound: bool = False