From 2d0257562fdfe18842d35ade823f80676269f0a3 Mon Sep 17 00:00:00 2001 From: Grant Sanderson Date: Sun, 12 Apr 2020 09:53:29 -0700 Subject: [PATCH] End scenes after embed --- manimlib/scene/scene.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/manimlib/scene/scene.py b/manimlib/scene/scene.py index 7bc34bb3..5d1960cc 100644 --- a/manimlib/scene/scene.py +++ b/manimlib/scene/scene.py @@ -120,6 +120,8 @@ class Scene(Container): # Stack depth of 2 means the shell will use # the namespace of the caller, not this method shell(stack_depth=2) + # End scene when exiting an embed. + raise EndSceneEarlyException() def __str__(self): return self.__class__.__name__