From 4abf93e2aadb62a37e339dc66ad13676251d34f1 Mon Sep 17 00:00:00 2001 From: Grant Sanderson Date: Tue, 12 Jan 2021 12:33:59 -1000 Subject: [PATCH] Remove MovingCameraScene --- manimlib/imports.py | 1 - manimlib/scene/moving_camera_scene.py | 31 --------------------------- 2 files changed, 32 deletions(-) delete mode 100644 manimlib/scene/moving_camera_scene.py diff --git a/manimlib/imports.py b/manimlib/imports.py index 83966a34..b51b2ee5 100644 --- a/manimlib/imports.py +++ b/manimlib/imports.py @@ -67,7 +67,6 @@ from manimlib.once_useful_constructs.graph_theory import * from manimlib.once_useful_constructs.light import * from manimlib.scene.graph_scene import * -from manimlib.scene.moving_camera_scene import * from manimlib.scene.reconfigurable_scene import * from manimlib.scene.scene import * from manimlib.scene.sample_space_scene import * diff --git a/manimlib/scene/moving_camera_scene.py b/manimlib/scene/moving_camera_scene.py deleted file mode 100644 index 7ad2c165..00000000 --- a/manimlib/scene/moving_camera_scene.py +++ /dev/null @@ -1,31 +0,0 @@ -from manimlib.camera.moving_camera import MovingCamera -from manimlib.scene.scene import Scene -from manimlib.utils.iterables import list_update -from manimlib.utils.family_ops import extract_mobject_family_members - - -class MovingCameraScene(Scene): - CONFIG = { - "camera_class": MovingCamera - } - - def setup(self): - Scene.setup(self) - assert(isinstance(self.camera, MovingCamera)) - self.camera_frame = self.camera.frame - # Hmm, this currently relies on the fact that MovingCamera - # willd default to a full-sized frame. Is that okay? - return self - - def get_moving_mobjects(self, *animations): - moving_mobjects = Scene.get_moving_mobjects(self, *animations) - all_moving_mobjects = extract_mobject_family_members( - moving_mobjects - ) - movement_indicators = self.camera.get_mobjects_indicating_movement() - for movement_indicator in movement_indicators: - if movement_indicator in all_moving_mobjects: - # When one of these is moving, the camera should - # consider all mobjects to be moving - return list_update(self.mobjects, moving_mobjects) - return moving_mobjects