mirror of
https://github.com/3b1b/manim.git
synced 2025-09-19 04:41:56 +00:00
Replace IGNORE_MANIMLIB_MODULES constant with a piece of global configuration
This commit is contained in:
parent
8706ba1589
commit
950ac31b9b
2 changed files with 4 additions and 3 deletions
|
@ -58,3 +58,4 @@ camera_resolutions:
|
|||
fps: 30
|
||||
embed_exception_mode: "Verbose"
|
||||
embed_error_sound: False
|
||||
ignore_manimlib_modules_on_reload: True
|
||||
|
|
|
@ -6,12 +6,11 @@ import os
|
|||
import sys
|
||||
import sysconfig
|
||||
|
||||
from manimlib.config import get_global_config
|
||||
from manimlib.logger import log
|
||||
|
||||
Module = importlib.util.types.ModuleType
|
||||
|
||||
IGNORE_MANIMLIB_MODULES = True
|
||||
|
||||
|
||||
class ModuleLoader:
|
||||
"""
|
||||
|
@ -143,7 +142,8 @@ class ModuleLoader:
|
|||
|
||||
Only user-defined modules are reloaded, see `is_user_defined_module()`.
|
||||
"""
|
||||
if IGNORE_MANIMLIB_MODULES and module.__name__.startswith("manimlib"):
|
||||
ignore_manimlib_modules = get_global_config()["ignore_manimlib_modules_on_reload"]
|
||||
if ignore_manimlib_modules and module.__name__.startswith("manimlib"):
|
||||
return
|
||||
|
||||
if not hasattr(module, "__dict__"):
|
||||
|
|
Loading…
Add table
Reference in a new issue