18 Commits

Author SHA1 Message Date
9ae5b4dee3 Use addict.Dict for scene config 2024-12-11 10:33:50 -06:00
fce92347fa Replace get_global_config() with manim_config, and make it an addict Dict 2024-12-11 09:50:17 -06:00
8744c878f4 Make log_level configurable in default_config 2024-12-10 20:12:38 -06:00
8cf95ec9a4 Move ReloadManager logic into __main__.py
Since the reload logic no longer relies on any state, the relevant loop is simple enough that it feels clearest to include it in the main entry point file.
2024-12-10 15:46:17 -06:00
cd744024ea Minor reorganization of ReloadManager.retrieve_scenes_and_run 2024-12-10 14:20:43 -06:00
6d0b23f914 Slightly simplify ReloadManager 2024-12-09 16:14:27 -06:00
bf81d94362 Don't make reload_manager a global variable 2024-12-09 15:54:16 -06:00
1fa17030a2 Add reload() command for interactive scene reloading (#2240)
* Init reload command (lots of things not working yet)

* Add back in class line (accidentally deleted)

* Add back in key modifiers (accidentally deleted)

* Unpack tuple from changed `get_module`

* Init MainRunManager & respawn IPython shell

* Init cleanup of scenes from manager

* Restore string quotes

* Still take `self.preview` into account

* Remove left-over code from module experimentation

* Remove double window activation

* Reset scenes array in RunManager

* Move self.args None check up

* Use first available window

* Don't use constructor for RunManager

* Use self. syntax

* Init moderngl context manually

* Add some comments for failed attempts to reset scene

* Reuse existing shell (this fixed the bug 🎉)

* Remove unused code

* Remove unnecessary intermediate ReloadSceneException

* Allow users to finally exit

* Rename main_run_manager to reload_manager

* Add docstrings to `ReloadManager`

* Improve reset management in window

* Clarify why we use magic exit_raise command

* Add comment about window reuse

* Improve docstrings in ReloadManager & handle case of 0 scenes

* Set scene and title earlier

* Run linter suggestions
2024-11-26 10:09:43 -08:00
9ef9961d0e Sort imports 2022-04-12 19:19:59 +08:00
e9afb0ee33 Fix tiny PEP errors 2021-11-30 11:28:26 -08:00
e10f850d0d add cli flag to specify log level 2021-10-16 21:01:39 +08:00
0e574882b3 Refactor #1637 (#1650)
* Refactor #1637

* Refactor #1637

* Refactor #1637

* Refactor #1637

* Refactor #1637

* Refactor #1637

* Update config.py

Co-authored-by: 鹤翔万里 <tonycrane@foxmail.com>
2021-10-16 13:04:52 +08:00
ed99427a3b print version when start 2021-10-07 17:42:23 +08:00
ef5253f1bc add cli flag -v to show version info 2021-10-06 17:54:28 +08:00
41120b096e Add support for debugger launch 2021-04-09 20:17:21 +08:00
b48ce3f1de Remove whitespace 2021-02-25 08:48:50 -08:00
e3d09d161c add auto config guide 2021-02-07 17:45:18 +08:00
2394bdc2e6 refactor __init__.py and __main__.py 2021-02-07 17:43:05 +08:00