mirror of
https://github.com/3b1b/manim.git
synced 2025-11-14 05:27:44 +00:00
Remove extract_scene use of an All_SCENES list
This commit is contained in:
parent
d9fcbea823
commit
4fa782b8b5
1 changed files with 7 additions and 12 deletions
|
|
@ -64,8 +64,6 @@ def is_child_scene(obj, module):
|
|||
return False
|
||||
if obj == Scene:
|
||||
return False
|
||||
if not obj.__module__.startswith(module.__name__):
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
|
|
@ -120,16 +118,13 @@ def get_scenes_to_render(scene_classes, config):
|
|||
|
||||
|
||||
def get_scene_classes_from_module(module):
|
||||
if hasattr(module, "ALL_SCENE_CLASSES"):
|
||||
return module.ALL_SCENE_CLASSES
|
||||
else:
|
||||
return [
|
||||
member[1]
|
||||
for member in inspect.getmembers(
|
||||
module,
|
||||
lambda x: is_child_scene(x, module)
|
||||
)
|
||||
]
|
||||
return [
|
||||
member[1]
|
||||
for member in inspect.getmembers(
|
||||
module,
|
||||
lambda x: is_child_scene(x, module)
|
||||
)
|
||||
]
|
||||
|
||||
|
||||
def main(config):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue